GLBasic forum

Feature request => 2D => Topic started by: Havard on 2009-Aug-06

Title: Support Fullscreen at lower resolutions or make windows scalable
Post by: Havard on 2009-Aug-06
Title says it all really.  For retroremakes it would be helpful to support fullscreen at 320x200, 320x240 etc

or

Could you make windows scalable so that they can be dragged to any size on the desktop?
Title: Re: Support Fullscreen at lower resolutions or make windows scalable
Post by: TheFive17 on 2009-Aug-06
Do your graphics on a low resolution 3rd screen, then scale it to fullscreen.

Edit:
To be preciser:

- use CREATESCREEN screenID, spriteID, 320, 240 to create a virtual screen with the resolution of 320x240
- call SCREENSIZE screenX, screenY to get the current screen width and height
- before drawing your game stuff call USESCREEN screenID
- after drawing your game stuff call USESCREEN -1
- then call STRETCHSPRITE spriteID, 0, 0, screenX, screenY

Be happy with blocky retro graphics at FullHD  :good:
Title: Re: Support Fullscreen at lower resolutions or make windows scalable
Post by: Ian Price on 2009-Aug-07
Or draw your screen as normal, then call the following function instead of using SHOWSCREEN

Code: (glbasic) [Select]
GLOBAL platform$

platform$=PLATFORMINFO$("device")

IF platform$="DESKTOP" THEN SETSCREEN 640,480,1





// Scale screen
FUNCTION scale:

IF platform$="DESKTOP"
 LOCAL temp% = GENSPRITE() // get temp image sprite slot
 GRABSPRITE temp%,0,0,320,240 // grab to that sprite

 SMOOTHSHADING FALSE
 ZOOMSPRITE temp%,160,120,2,2 // stretch it
 GRABSPRITE temp%,0,0,0,0 // delete temp image
ENDIF

SHOWSCREEN

ENDFUNCTION

Simples. :)
Title: Re: Support Fullscreen at lower resolutions or make windows scalable
Post by: Havard on 2009-Aug-07
Ah - but which is quicker?
Title: Re: Support Fullscreen at lower resolutions or make windows scalable
Post by: Schranz0r on 2009-Aug-07
i think the first one