"Viewport" opposite?
BlitzPlus Forums/BlitzPlus Programming/"Viewport" opposite?
| ||
Hi! I was wondering if it is possible to tell blitz that it should "exclude" a set viewport region from drawing? Instead of drawing only inside the x,y,width,height region I need a function that will only draw stuff "outside/around" it. Any thoughts? |
| ||
I don't think you can. How about copying the viewport to a temp bitmap and then drawing your image and pasting the temp image back over it with DrawBlock (don't need DrawImage as no masking required). This is a brute force approach. |
| ||
That would certainly be the easiest and sane way. |
| ||
I'm using this method already. The problem you won't gain any speed benefit from this, as you always draw/calculate the whole screen and copy the viewport part backwards. My idea was only to draw stuff around the viewport as the rest is not needed (hidden). Seems I have to rewrite my background drawing functions to exclude the viewport part used. Thanks for your help guys. |
| ||
Seems I have to rewrite my background drawing functions to exclude the viewport part used. That's how Windows does it. |
| ||
wmpaint Problem is if you are writing your own drawing functions they *may* not be as fast as the blitz ones, so it could actually work out slower. |
| ||
No risk, no fun. :) |
| ||
There is also the phrase "reinventing the wheel" ;-). |
| ||
Yepp, but sometimes it feels good make sth on your own. - Rather than simply copy stuff. ;) |
| ||
Yeah I used to make all my own 3D routines and stuff but never got any games finished. It is good to find out how stuff works at core level, but then commericially it makes sense to use someone else's hard work. |