How to change current drawing surface...

BlitzMax Forums/BlitzMax Programming/How to change current drawing surface...

Russell(Posted 2006) [#1]
All I want to do is create an image in memory, draw some shapes on it in the current mask color and then blit THAT image onto the current backbuffer so only certain parts show through (the parts where the mask color is).

I've done this in other versions of Blitz, but I'll be damned if I can figure out how to do it in BlitzMax! I thought, at first, that using LockImage() made the image in question the current drawing surface, and it does, in a way, although not with all commands (For example, DrawOval(), DrawRect(0 etc draw to the backbuffer regardless).

Maybe I'll figure it out on my own, but I thought I'd ask anyway...

Thanks!
Russell


Dreamora(Posted 2006) [#2]
You can not.
there is no buffer you can draw to in default Max2D.

You have to draw to backbuffer and grab into a pixmap you use as image.

You could thought use Render 2 Texture. Indiepath was kind enough to make the source opensource and you can find it here on the boards. (this just will cut out some stone age intel users as those chips do not features this simple DX9 feature but thats not much of a problem. those cards perform really bad with 3D anyway and BM has 3D only even in 2D)


Russell(Posted 2006) [#3]
Oy! A bit of a pain in the gulliver, eh brother? Oh well, guess I'll have to do it that way. Would like to see that ability in a (near) future version of BMax, though...

Thanks, Dreamora
Russell


Will(Posted 2006) [#4]
"this just will cut out some stone age intel users"

Does it cut out mac users as well?