Full screen...how to on linux?

Archives Forums/Linux Discussion/Full screen...how to on linux?

ragtag(Posted 2009) [#1]
I started messing with my old Area 51 game on linux, and got it running just fine, except that it doesn't seem to want to do full screen mode anymore. It's full screen by default on OS X and Windows.

Below is the code from the game for switching modes, but this seems to do nothing on linux. Any ideas?

	' Toggle between windowed mode and full screen.	
	If KeyHit( KEY_W ) Then
		Local Depth:Int = GraphicsDepth()
		If GraphicsDepth() = 32 Then
			EndGraphics
			Graphics w, h, 0						
			AutoMidHandle( True )
			SetBlend ALPHABLEND
		Else If GraphicsModeExists(w,h,32) Then
			EndGraphics
			Graphics w, h, 32
			AutoMidHandle( True )
			SetBlend ALPHABLEND
		End If
	End If



xlsior(Posted 2009) [#2]
Are you able to run any other games full-screen under Linux?

Depending on your graphics drivers, it may not support full-screen mode...


ragtag(Posted 2009) [#3]
I tried digesteroids, which I believe runs in full screen on windows, and that was windowed too.

The machine I was testing on has a Intel 945GM Express graphics card, which is not that great. :) I'll have to test it on my workstation with an Nvidia card later. Need to do some more testing.


xlsior(Posted 2009) [#4]
I meant: can you run *any* games full-screen?
(Even anything NOT created in Blitzmax?)


skidracer(Posted 2009) [#5]
Have you tried listing the fullscreen modes that are available?


D4NM4N(Posted 2009) [#6]
sounds like a gfxcard/driver issue, i can fullscreen on all mine, ATI, NVidia, Intel.

If ati/nvidia, are you using the free or proprietry. drivers? (check in system menu under restricted drivers assuming it is ubuntu?) If disabled enable if enabled disable and try again.


ragtag(Posted 2009) [#7]
Print "Available graphics modes"

For mode:TGraphicsMode=EachIn GraphicsModes()
	Print mode.width+", "+mode.height+", "+mode.depth+", "+mode.hertz
Next


Returns

Available graphics modes
1024, 768, 24, 60
800, 600, 24, 60
640, 480, 24, 60


So it seems like it should work with full screen. Tried it on my workstation too (nvidia card), and it was windowed there too. Other applications are able to run in full screen on both computers, so I guess it's just my code. :)


jkrankie(Posted 2009) [#8]
I haven't got fullscreen on Linux working recently. I has worked in the past though, so there's either been some change to Blitzmax or Linux drivers to stop this from working.

Cheers
Charlie


Otus(Posted 2009) [#9]
I haven't got fullscreen on Linux working recently. I has worked in the past though, so there's either been some change to Blitzmax or Linux drivers to stop this from working.


What happens if you run Digesteroids after changing DEPTH to 32 on line 33? Which Linux distro and graphics driver are you using?

BlitzMax 1.34 on Ubuntu Karmic and full screen works fine for me. I have tested the (open source) radeon driver and the (proprietary) Catalyst driver and had no problems with either of those. AFAIK, only the Intel video drivers have recently changed significantly...


ragtag(Posted 2009) [#10]
That did the trick...thanks. Now digesteroids runs full screen, so the problem is with my code.

I'm running Ubuntu Karmic 32bit, with an Intel card. 3D support was more or less broken in Jaunty for Intel cards, but has worked fine so far in Karmic. :)


skidracer(Posted 2009) [#11]
ragtag, I don't understand.

Your system plainly only supports 24 bit depth modes, and yet your code tries to force 32 bit depth and fails???


ragtag(Posted 2009) [#12]
Yep....I guess I've been away from Blitz for too long, I should read through the manual. Changing the code to 24 bit depth, made the game run just fine in full screen mode. :)