Grabimage alternative?

BlitzMax Forums/BlitzMax Beginners Area/Grabimage alternative?

Ant(Posted 2006) [#1]
Hi, in my project I need to grab a section of the screen and rotate it. I've coded this using grabimage and it works perfectly well, until I start drawing a background underneath it - as it (unsurprisingly) grabs and rotates the background image also. In addition to this I know that when I start adding visual effects to the screen, that they will also be grabbed and rotated as grabimage captures everything within the specified area. Essentially, I only want to grab a specific group of images to rotate and not everything else that is drawn to the screen (such as particales, backdrop etc). Can anyone help!?

Thanks


Dreamora(Posted 2006) [#2]
The simplest way to go is draw them first, grab them and cls afterwards again.

The only other solution would be indiespaths render2texture module, but that does not work with 1.18


Ant(Posted 2006) [#3]
Not sure if that's going to be possible. Is there no way of drawing something to another buffer and grabbing that - I remember from my murky past that darkbasic used to have additional 'screens' you could open up, draw to, manipulate and then close.....is there an equivalent in BMax? Another 'area' I could write to (as the player selects which area of the scren to rotate)and grab?

Thanks for the help


Dreamora(Posted 2006) [#4]
No, BM does not have any buffers like Blitz3D to do so. (thats mostly due to OpenGL that does not know of SystemRAM surfaces I think)
Only indiepaths render2texture is a work around. But indiepath hasn't compiled them for 1.18 yet ...


Ant(Posted 2006) [#5]
Hmm...haven't explored OpenGL yet..soI don't think Indiepaths solution would be of use to me. Surely this could be done via banks?


Dreamora(Posted 2006) [#6]
And how would you do it using banks? Rotating the pixmap in CPU (with matrices) and sending it pixel per pixel to the bank? That solution would be worlds slower than draw to the backbuffer and grab it from there as this is done through the graphics hardware.


TartanTangerine (was Indiepath)(Posted 2006) [#7]
ok ok, I got 1.18 I'll compile in the next few days :D