Fullscreen Window Clipping

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Steve Elliott
Enthusiast
Enthusiast
Posts: 109
Joined: Sun Jan 01, 2006 9:34 pm
Location: Wales, UK

Fullscreen Window Clipping

Post by Steve Elliott »

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
Project S: loading...
Intel Core2 Duo E7200 @ 2.53Ghz, 3Gb RAM Intel G45 Express