Clipped drawing??

BlitzPlus Forums/BlitzPlus Beginners Area/Clipped drawing??

Amiga(Posted 2006) [#1]
Let's say you want to draw an image or array of tiles which is for an example 800 * 600 in size, but you will draw to an screen that is 640 * 480. Does the "DrawImage" command clipp the drawing to just 640 * 480, or waste time and draw the entire image or tiles in 800 * 600.
I have an old DirectX programming book, there you could use something called Clipped regions. Is that the same as the Blitz "Viewport x,y,height,width" command.
Or does the "DrawImage" command have that as default????.


Grey Alien(Posted 2006) [#2]
I'm pretty sure that it DOES clip. It certainly doesn't go wrong if you draw off the screen. If you are worried about speed, you could do a test of drawing the full image half of screen, and then using your own clipping to see if it's faster. One thing I know, if you lock buffers and use WritePixelFast etc, these are NOT clipped and writing off the screen can cause memory access violations.


Amiga(Posted 2006) [#3]
Thanks for that you took your time to answer me, Grey Alien.


Grey Alien(Posted 2006) [#4]
You're welcome. Did you find out anything useful?