LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Nop on December 14, 2006, 15:58:05

Title: White Screen (beta 4)
Post by: Nop on December 14, 2006, 15:58:05
When updating from LWJGL beta 3 to beta 4, on a certain machine my application shows just a completely white screen. I can tell from the server connection that the application is functioning, only the screen is completely white. I doublechecked by returning to beta 3 and everything is running smoothly then, so it is definitely a problem with beta 4.

So far it has occurred on only one machine.

Any ideas?
Title: Re: White Screen (beta 4)
Post by: Matzon on December 15, 2006, 08:36:15
OS, gfx card etc ?
Title: Re: White Screen (beta 4)
Post by: Nop on December 18, 2006, 08:33:23

Sorry, here are the specs:

Computer:
Microsoft Windows XP Professional
OS Service Pack Service Pack 2
DirectX 4.09.00.0904 (DirectX 9.0c)

Graphics card SiS 741 (128 MB)
SiS 330 Mirage Integrated
Driver: 6.14.10.3700
05.10.2005


CPU Typ Unknown, 1500 MHz (9 x 167) 2200+
Motherboard Name ASRock K7S41 (2 PCI, 1 AGP, 1 AMR, 2 DDR DIMM, Audio, Video, LAN)
Motherboard Chipsatz SiS 741
Arbeitsspeicher 384 MB (PC2700 DDR SDRAM)
BIOS Typ AMI (03/10/06)
Title: Re: White Screen (beta 4)
Post by: Matzon on December 18, 2006, 12:11:58
I'm not sure what changes that could have caused that... elias, do you have a clue ?
that said, SIS gfx cards are notoriously crap :(
Title: Re: White Screen (beta 4)
Post by: Nop on December 18, 2006, 14:23:30
Yes, we have found quite some SIS cards that need massaging the drivers before they work. But in this case, I can switch back and forth between beta 3 (working) and beta 4 (white screen), so we didn't try to change anything about the machine so far.
Title: Re: White Screen (beta 4)
Post by: Nop on December 21, 2006, 12:12:31
Any ideas about this?
Title: Re: White Screen (beta 4)
Post by: Matzon on December 21, 2006, 12:27:20
I'll try and get Elias on it, since he's the only one that modified the internals between 3 and 4
Title: Re: White Screen (beta 4)
Post by: elias on December 21, 2006, 13:44:03
Bah, stupid SIS cards. I'm not sure what went wrong in beta4, but fortunately the changes in that area (windows opengl) were limited. Can I ask you to test your application in windowed mode?

- elias
Title: Re: White Screen (beta 4)
Post by: elias on December 21, 2006, 14:11:26
And another thing: are you using pbuffer or multisampling in the PixelFormat?

- elias
Title: Re: White Screen (beta 4)
Post by: Nop on December 21, 2006, 14:14:17
I'll check about the windowed mode.

I don't think I am using any of that - at least I don't know what it is :-)
Title: Re: White Screen (beta 4)
Post by: elias on December 21, 2006, 14:15:34
Are you using gamma, then? And can I see your initialization code that creates the Display? Do any of the standard LWJGL tests work?

- elias
Title: Re: White Screen (beta 4)
Post by: elias on December 21, 2006, 15:31:23
I can't find any specific suspect from the beta3->beta4 diffs, so instead I disabled a few features that could (theoretically) cause problems for you. I'd also like to know if this is a problem with the SVN HEAD version too. Please test:

http://download.oddlabs.com/elias/lwjgl.jar
http://download.oddlabs.com/elias/lwjgl.dll

- elias
Title: Re: White Screen (beta 4)
Post by: elias on December 22, 2006, 10:54:47
Ok, I did some more tweaking to make LWJGL opengl init code in windows simpler, so here's another version you can try out:

http://download.oddlabs.com/elias/lwjgltest2/lwjgl.jar
http://download.oddlabs.com/elias/lwjgltest2/lwjgl.dll

- elias
Title: Re: White Screen (beta 4)
Post by: Nop on December 22, 2006, 11:11:10

Thank you for your help.

The regular beta4 works in windowed mode, the white screen is shown only in full screen mode.

I have included your second set of libs with my debug client and made it available for testing. I'll let you know about the result.
Title: Re: White Screen (beta 4)
Post by: Nop on December 23, 2006, 11:20:17

The modified library in lwjgltest2 shows the same behaviour as the regular beta4 lib: Windowed mode works ok, full screen shows completely white.
Title: Re: White Screen (beta 4)
Post by: elias on December 23, 2006, 19:49:10
Bummer. I still need some information from you, though:

1. Is it possible that I can access your game client somehow? Preferably with source, but being able to swap lwjgl.jar/dll is sufficient.
2. How is your Display created?
3. Are you doing a setFullscreen(true) before or after create()?
4. How is your PixelFormat constructed? Are you asking for a depth, stencil and alpha buffer (if you use any of those?).
3. I'm trying to simplify the LWJGL init code to match the NeHe tutorials which I assume works pretty much everywhere. Is it possible you could test the second NeHe tutorial (he supplies pre-built exe files) in fullscreen mode?

I did some more tweaking to the lwjgl.jar and dll, in case you want to try them out:

http://odense.kollegienet.dk/~naur/lwjgl.dll
http://odense.kollegienet.dk/~naur/lwjgl.jar

- elias
Title: Re: White Screen (beta 4)
Post by: Nop on December 29, 2006, 18:38:46
Quote from: elias on December 23, 2006, 19:49:10
1. Is it possible that I can access your game client somehow? Preferably with source, but being able to swap lwjgl.jar/dll is sufficient.

I am preparing a test account and configuration. This is a little tricky as the client usually is signed and self-installing via webstart. I'll PM you with the details when it is working.

Quote from: elias on December 23, 2006, 19:49:10
2. How is your Display created?


DisplayMode[] modes = Display.getAvailableDisplayModes();
...
Display.setDisplayMode( modes[i] );
...
Display.create();


Quote from: elias on December 23, 2006, 19:49:10
3. Are you doing a setFullscreen(true) before or after create()?

setFullscreen(true) is called after create() and also after initializing the openGL matrix, viewport etc.

Quote from: elias on December 23, 2006, 19:49:10
4. How is your PixelFormat constructed? Are you asking for a depth, stencil and alpha buffer (if you use any of those?).
I still don't understand the question. A search for PixelFormat brings up no matches in my project. So I guess it uses some sort of default. At what point should a PixelFormat be constructed?
Quote from: elias on December 23, 2006, 19:49:10
3. I'm trying to simplify the LWJGL init code to match the NeHe tutorials which I assume works pretty much everywhere. Is it possible you could test the second NeHe tutorial (he supplies pre-built exe files) in fullscreen mode?
I am not familiar with these tutorials. Can you give me a direct link so I can be sure we are talking about the same thing?
Quote from: elias on December 23, 2006, 19:49:10
I did some more tweaking to the lwjgl.jar and dll, in case you want to try them out:
http://odense.kollegienet.dk/~naur/lwjgl.dll
http://odense.kollegienet.dk/~naur/lwjgl.jar

Thank you for your effort, I have sent them to the player for testing.
Title: Re: White Screen (beta 4)
Post by: elias on December 30, 2006, 10:04:25
Ok, to make diagnosing easier, I'd like you  to try:

1. Calling setFullscreen(true) before Display.create().
2. Only using DisplayModes where getBitsPerPixel() equals that of the initial DisplayMode (the desktop bit depth). Use Display.getDisplayMode() before the first switch (Display.create) to get the default display mode. This makes sure that you don't accidently use e.g. 16 bit for fullscreen and 32 bit for windowed mode.

The no-arg Display.create() uses a default PixelFormat which is fine if you don't enable GL_ALPHA_TEST nor GL_STENCIL_TEST.

This is the link to the code for the second NeHe tutorial:

http://nehe.gamedev.net/data/lessons/vc/lesson02.zip

- elias
Title: Re: White Screen (beta 4)
Post by: Nop on January 03, 2007, 15:57:46

I have made the changes you suggested to the client and I have set up a test account for you.

You should have received the access information by PM.
Title: Re: White Screen (beta 4)
Post by: elias on January 03, 2007, 20:51:56
Thank you. Dores this version still pose problems?

- elias
Title: Re: White Screen (beta 4)
Post by: Nop on January 06, 2007, 20:56:16

No, the player has reported that both modes work in this version.

Do you think it was a matter of the order of initialization? Or rather a mismatched color depth?
Title: Re: White Screen (beta 4)
Post by: elias on January 07, 2007, 08:47:47
Hard to tell for sure, but I'm guessing that the color depth was the problem. The reason I wanted you to swap setFullscreen() and create() was to minimize the number of native calls and display mode switches. With create() first a window and context was created and then, on setFullscreen, the mode would be switched, another (fullscreen) window created and the old context attached to the window. With setFullscreen first create() would make the switch, create a window and context, which is simpler.

I'm glad it works again, rc1 should be out soon without the (apparently) extra hacks I did to test. I'd be happy if you could test that version and report back if you run into problems again.

- elias