Is there anything Imagebuffer like in Bmax?

BlitzMax Forums/BlitzMax Programming/Is there anything Imagebuffer like in Bmax?

Sanctus(Posted 2007) [#1]
Hello!
Is there anything Imagebuffer like in Bmax?
I searched on the forums but I didn't get anything...


CS_TBL(Posted 2007) [#2]
Not that I know of, instead: in TPixmap we trust..


Sanctus(Posted 2007) [#3]
And how would I use that?


CS_TBL(Posted 2007) [#4]
from the head:
local pm:tpixmap=lockimage(yourimage)
writepixel pm,x,y,ARGB
unlockimage yourimage


but check out the manual to be sure.

Note that this pixmap thing is all low-level stuff, afaik there's nothing like 'DrawRect', 'Line', 'Oval', etc. Ofcoz, you could do your own line routine using a bresenham algo..


Sanctus(Posted 2007) [#5]
Thank you


tonyg(Posted 2007) [#6]
searched on the forums but I didn't get anything...

Just need to check.
You put 'imagebuffer' or 'imagebuffers' into the Blitzmax forum search and nothing came back?
There are quite a few solutions although nothing I would consider 'nice'. Since Indiepath's RTT module isn't working at 1.24 and HighGfx has disappeared for OGL the best solution is either pixmap.paste for no-alpha or memcopy (I have something in the code archive which does it) or draw/grab which is slow.
I might look at this again but I'm still gobsmacked that BRL have no interest in providing it.


Sanctus(Posted 2007) [#7]
Well I will play with PixelMaps for now...
And I exactly searched for "imagebuffer" and only got weird things...


ninjarat(Posted 2007) [#8]
How about OpenGL framebuffer... speaking of which, how do you use that?


smilertoo(Posted 2007) [#9]
There was a render to texture module done by indiepath that would let you mimic it.


Raz(Posted 2007) [#10]
I used this to take a full screengrab, it was very last minute but did what I needed (almost certainly a better 'proper' way though)

BackingImage:TImage = CreateImage(800,600)
GrabImage BackingImage,0,0