Hi there,
I'm currently working on a game that uses the 320 x 240 resolution as it's base. I want to be able to grab the 320 x 240 screen as a sprite and resize it to a factor of 2, 3 or 4 to cater for larger resolutions.
Only problem is that GLBasic seems to add some anti-aliasing or blurriness to the sprite once it's resized and when I stretch to an integer factor I just want a straight pixel resize so as not to spoil the integrity of the pixelart :)
Is this possible? Any help much appreciated.
As long as you use SMOOTHSHADING FALSE, there should be no anti-aliasing...
That seems to work, thanks!
Any idea why the 'VIEWPORT' command sets this back to 'TRUE' again each time it's called? This behaviour isn't documented in the manual and I can't see any reason why it would need to do this.
Hi plbonovox.
I´m working with the same issues too on another thread.
Other then the smoothshading false, I was also recommended by ampos to use createscreen instead of grabsprite for the scaling routines.
Somewhere around the forum you will also find many threads on scaling your game/apps to multiple resolutions.
Welcome.
Quote from: PJBonoVox on 2011-Nov-17
That seems to work, thanks!
Any idea why the 'VIEWPORT' command sets this back to 'TRUE' again each time it's called? This behaviour isn't documented in the manual and I can't see any reason why it would need to do this.
Sure its not on SHOWSCREEN ?
Quote from: MrTAToad on 2011-Nov-17
Sure its not on SHOWSCREEN ?
Positive. Unless I use SMOOTHSHADING = FALSE after each call to the VIEWPORT command, subsequent scaling is done with anti-aliasing on.
Have you tried putting SMOOTHSHADING before the VIEWPORT command ?
VIEWPORT did reset it. It called an X_MAKE2D, which is what you get with SHOWSCREEN.
I fixed that for the next update. Sorry.
ahh... :)