PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Write pixels after getting the backbuffer ?!

Hi,

I have a problem with the getbuffer, when I call the getbuffer function
when I try to setpixel it doesn't work.

when I release the buffer then make the same setpixel function it works fine.

So, what's wrong :?:
is the sequence wrong ?
Getbuffer
Setpixel
Release

Thanks in advance,
If you call GetBuffer all drawing operations will be stopped and the surface will be "locked". This is by design. There is no overhead in calling GetBuffer, so release the buffer if you need to call SetPixel and then call GetBuffer again..
blue · 04 May 2004, 08:34 UTC — hmm
Johan, Thanks for your reply,

I just want to understand the benifit of the getbuffer function as you said it locks the surface, but what I need to know is what to do after locking the surface .. we need make some sort of proccessing or manupilation then release the surface .. how ?

Thanks in advance ..
but what I need to know is what to do after locking the surface .. we need make some sort of proccessing or manupilation then release the surface .. how ?


Please check the Plasma sample application for information on how to access the raw surface pixel data.