Fullscreen Window Clipping
Posted: Tue Aug 29, 2006 6:43 pm
A feature I've found useful in other languages, is where the user can set the window size for fullscreen games - and therefore anything outside that window isn't drawn - like the current internal system that crops objects (or parts of objects) if they go outside the screen resolution.
Basically you can set the window size temporarily so several sprites at once can be clipped, or create several windows within your game.
Like in my chess program I want to clip the shadows at the back of the board - because the shadows overlap onto the tiled background and this is unrealistic. With this new command I could just tell PureBASIC this is the new draw area - don't draw outside that area, draw the shadows (which will all now be clipped) and then reset the window size to match the screen resolution so drawing is not clipped.
I've had to grab and restore quite a large area to achieve what is in the screenshot - which is inefficient (I'm using sprite3d functions).
www.elliottproductions.co.uk/temp/chess.png
Thanks, Steve
Basically you can set the window size temporarily so several sprites at once can be clipped, or create several windows within your game.
Like in my chess program I want to clip the shadows at the back of the board - because the shadows overlap onto the tiled background and this is unrealistic. With this new command I could just tell PureBASIC this is the new draw area - don't draw outside that area, draw the shadows (which will all now be clipped) and then reset the window size to match the screen resolution so drawing is not clipped.
I've had to grab and restore quite a large area to achieve what is in the screenshot - which is inefficient (I'm using sprite3d functions).
www.elliottproductions.co.uk/temp/chess.png
Thanks, Steve