Full screen not working?

BlitzMax Forums/BlitzMax Beginners Area/Full screen not working?

Idiot(Posted 2006) [#1]
Am I missing something? Shouldn't this code produce an 800x600 full screen?


Graphics 800,600

Repeat
	Cls
	
	DrawText ("what",0,0)
	
	Flip

Until MouseHit(1)



Perturbatio(Posted 2006) [#2]
The default depth for the graphics command is 0.


Idiot(Posted 2006) [#3]
I'm confused then... it used to be the default would auto detect if 32 was usable, and if not to use 16. I don't want to force it to use 16 if 32 bit color is available.


JazzieB(Posted 2006) [#4]
There's two ways of approaching this...

1. Default to 16, but allow the user to change it to 24 or 32 later, either via a config file or from an options screen within the game itself.

2. Use the various graphics commands to determine the highest bitdepth available and set it...

Global scrDepth=32
If Not GraphicsModeExists(scrWidth,scrHeight,scrDepth) Then
	If GraphicsModeExists(scrWidth,scrHeight,24) Then
		scrDepth=24
	ElseIf GraphicsModeExists(scrWidth,scrHeight,16) Then
		scrDepth=16
	Else
		RuntimeError "This game requires a 16 bit graphics card or higher."
	EndIf
EndIf

Graphics scrWidth,scrHeight,scrDepth

I tend to use the second method more than most, but it doesn't matter really as long as the end-user is aware of how to change it if they want to. Using a bitdepth of 32bpp may cause the game to run slow on some low-end systems.


Idiot(Posted 2006) [#5]
Thanks.