Page 1 of 1

How to access the address of the pixel buffer

PostPosted: Feb 1, 2008 @ 8:42pm
by eugraphics
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

PostPosted: Feb 1, 2008 @ 8:53pm
by eugraphics
Is this it? GetSysApiSurface()

PostPosted: Feb 2, 2008 @ 11:12am
by edge
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.