GLBasic forum

Main forum => GLBasic - en => Topic started by: josemym2 on 2010-May-29

Title: it´s posible resize the viewport?
Post by: josemym2 on 2010-May-29
I have all my game in 400x240, and i need to resize al the screen to the gp2x resolution (320x240). itÃ,´s posible?

I test with any result with CREATESCREEN and GRABSPRITE ...

Please help, i donÃ,´t want to resize all sprites...
Title: Re: it´s posible resize the viewport?
Post by: Moru on 2010-May-29
Here is an example on how to do this:

http://www.glbasic.com/forum/index.php?topic=4238.msg31406#msg31406
Title: Re: it´s posible resize the viewport?
Post by: josemym2 on 2010-May-29
yes i do, but the problem is (i think) when i use the SETSCREEN 320,240,0 the image strech only 320x240, no the iphone screen

example:

Code (glbasic) Select

SETSCREEN 320,240,0 //resolution of GP2x
main:
CREATESCREEN 0,999,[iphone width], [iphone height]
USESCREEN 0
// do keyb control, collision control ... etc
// paint sprites
USESCREEN -1

STRECHSPRITE 999,0,0,320,240
SHOWSCREEN

GOTO main


When i compiled for a GP2x, is necesary force the screen resolution with SETSCREEN (i havenÃ,´t got a GP2x to test) or the console only show this resolution?, and if the image is bigger the rest of image is hidden?.
Title: Re: it´s posible resize the viewport?
Post by: Moru on 2010-May-30
Setscreen should not do anything on GP2X, it only shows one resolution that I have noticed at least. If I use bigger resolution it usually just cuts off the lower and right side. I'm not sure CREATESCREEN can create a screen bigger than the resolution of the GP2X screen though so not sure this is a solution for you. But I'm sure there was a discussion about it on the boards a few years ago.