This site is no longer active and is available for archival purposes only. Registration and login is disabled.

How to access the address of the pixel buffer


How to access the address of the pixel buffer

Postby eugraphics » Feb 1, 2008 @ 8:42pm

I want to manipulate pixels directly, not via GetPixel or PutPixel. How can I access the pixel buffer address? I thought maybe the nativesurf pointer was it but that is private so I cant get to it.

Am I missing something? I assume that I can manipulate a surface in this way because GetInfo() provides the pitch, etc.

Thank you
eugraphics
pm Member
 
Posts: 56
Joined: Dec 3, 2006 @ 6:56pm


Postby eugraphics » Feb 1, 2008 @ 8:53pm

Is this it? GetSysApiSurface()
eugraphics
pm Member
 
Posts: 56
Joined: Dec 3, 2006 @ 6:56pm


Postby edge » Feb 2, 2008 @ 11:12am

Hi,

You can use Lock() to lock the surface memory and receive its pointer. Be sure to quickly call Unlock() afterwards (for example, don't lock the surface over multiple frames).

The GetSysApiSurface() function call is to get the underlying surface if it is created using DirectDraw or the Symbian bitmap manager.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron