LockImage on the backbuffer

BlitzMax Forums/BlitzMax Beginners Area/LockImage on the backbuffer

Scott Shaver(Posted 2005) [#1]
I need fast pixel write access to the backbuffer, like B+ LockBuffer and WritePixelFast. Is there a way to do this in BMax?


Dreamora(Posted 2005) [#2]
use pixmaps
they are optimised for access. Images aren't fast in that type of operations.


ImaginaryHuman(Posted 2005) [#3]
pixmaps don't work on the backbuffer though.


Scott Shaver(Posted 2005) [#4]
Exactly I can't find a way to get the pixmap for the backbuffer. Seems I could use GrabImage and then a pixmap for that but that seems like it would be very slow. Any other options?


tonyg(Posted 2005) [#5]
I can't think of a way to writepixel to the backbuffer. Maybe, whatever it is you want to achieve, can be done a different way?


Scott Shaver(Posted 2005) [#6]
I think it is going to come down to creating an off screen image, getting the pixmap for it, drawing there and then bliting that image to the backbuffer with a color mask. Major pain and will be slow. What I'm doing is converting my B+ sinus scroller routines to BMax.


Dreamora(Posted 2005) [#7]
You can't get the pixmap of a buffer as a pixmap is no image anymore.
But you can grab a pixmap of the backbuffer.

OpenGL does not handle backbuffer or surfaces in the way DirectX does, because of this, this buffer stuff does not work.