noobish question about pixmaps

BlitzMax Forums/BlitzMax Beginners Area/noobish question about pixmaps

Nate the Great(Posted 2009) [#1]
Hi,

Ever since I got blitz max, I have wondered if there is a faster way to get pixels from the back buffer to an image than using grab pixmap and loadimage. It just takes a lot longer than copyrecting to the image buffer in b3d. So am I doing it wrong or is there no faster way? I really dont want to use draw pixmap because I know its much slower and I have heard its buggy? but im not sure of either.


ImaginaryHuman(Posted 2009) [#2]
First time I've heard of it being buggy.

In OpenGL for example, grabpixmap is calling glReadPixels. You could use that yourself and set it up yourself but it's probably about as fast as it gets.


Sledge(Posted 2009) [#3]
I feel your pain -- being able to grab and paste masked, screen-sized images really quickly was great for special fx in B3D. I've certainly found nothing comparably speedy in BMax... have you thought about the B3D SDK?


Nate the Great(Posted 2009) [#4]
I feel your pain -- being able to grab and paste masked, screen-sized images really quickly was great for special fx in B3D.


yeah. I guess that feature just got lost when mark was making blitz max. Is it possible to get it back maybe? I mean bmax is as fast if not faster than a lot of c compilers so maybe I could try to hard-code it.


Sledge(Posted 2009) [#5]
I think it's an OGL limitation, hence the regular 2D module doesn't offer B3D-style image buffers under DX7 because it would break cross-compatibility. That's why I suggested the SDK.


Dreamora(Posted 2009) [#6]
No its a restriction in the targeted OpenGL requirements.
pbuffers / FBOs are an extension but Max2D is targeted at OpenGL 1.1 & DirectX.

There are thought several attempts of render textures which will solve the issue as you just don't draw into the backbuffer anymore but into a texture that you draw then to the backbuffer


Sledge(Posted 2009) [#7]
No its a restriction in the targeted OpenGL requirements.
pbuffers / FBOs are an extension but Max2D is targeted at OpenGL 1.1 & DirectX.
So it's an OGL limitation and hence why the regular 2D module doesn't offer B3D-style image buffers, what with it being targeted at OGL 1.1 'n' all.

...

Oh, sorry, do I have to write that the regular module is targeted at OGL 1.1 every single time I mention Max2d in order to avoid some pedant swooping in and assuming everyone is to thick to have read the documentation now? Well I won't, obviously, but I'll quite happily email you every time I make an implicit rather than explicit reference to OGL 1.1 if you'd like. That way you can get to patronise everyone without me feeling obliged to pre-emptively do it for ya. Oh and one more thing...



























PSYCH! :P


Brucey(Posted 2009) [#8]
...assuming everyone is to thick to have read the documentation


I think it's a big assumption to expect many people to read the documentation, yes. :-p
It doesn't help that the docs are exactly clear on most topics either...

And anyway, why read when you can simply ask :-)


Sledge(Posted 2009) [#9]
That's all very true and I support it wholeheartedly. Dreamora left himself wide open for a razz though -- couldn't resist!