Problems running the effects.glsl tests

Hi, I have some strange problems with the effects.glsl tests. They crash or work incorrectly if I run them as is, from the latest CVS. (updated today)

BUT they all work correctly if I change app.setDialogBehaviour() from ALWAYS_SHOW_PROPS_DIALOG to something that doesn't ask for settings :smiley:



How can this be? It looks as if it runs using the same resolution so I guess the other settings are also the same. :? The same demos work as intended from the homepage despite showing the same dialogbox.



And while on the topic of DialogBehaviour, perhaps some lower resolutions could be added? The lowest one I can pick is 1920x1024@53hz :smiley: I have 2 monitors both running at 1280x1024@75Hz using twinview, and while I do enjoy dual fullscreen I would like to run things at 800x600 windowed sometimes. :slight_smile: Also the refresh-rate is all wrong, both screens use 75Hz, but my only choices are 1920x1024@53Hz, 2080x1024@52Hz, 2304x1024@51Hz and 2560x1024@50Hz.



This is the log from TestBloom


2007-aug-22 12:33:35 com.jme.renderer.lwjgl.LWJGLTextureRenderer <init>
INFO: FBO support detected.
2007-aug-22 12:33:35 com.jme.renderer.lwjgl.LWJGLTextureRenderer initCamera
INFO: Init RTT camera
2007-aug-22 12:33:35 com.jme.renderer.AbstractCamera <init>
INFO: Camera created.
2007-aug-22 12:33:35 com.jme.renderer.lwjgl.LWJGLTextureRenderer setupTexture
INFO: setup tex with id 2: 480,256
2007-aug-22 12:33:35 com.jme.renderer.lwjgl.LWJGLTextureRenderer setupTexture
INFO: setup tex with id 3: 480,256
2007-aug-22 12:33:35 com.jme.renderer.lwjgl.LWJGLTextureRenderer setupTexture
INFO: setup tex with id 4: 480,256
2007-aug-22 12:33:35 com.jme.scene.state.lwjgl.shader.LWJGLShaderUtil updateUniformLocation
ALLVARLIG: Shader uniform [blurIntensityMultiplier] could not be located in shader
2007-aug-22 12:33:35 com.jme.scene.state.lwjgl.shader.LWJGLShaderUtil updateUniformLocation
ALLVARLIG: Shader uniform [sampleDist0] could not be located in shader
2007-aug-22 12:33:35 com.jme.scene.state.lwjgl.shader.LWJGLShaderUtil updateUniformLocation
ALLVARLIG: Shader uniform [RT] could not be located in shader
2007-aug-22 12:33:35 class jmetest.effects.glsl.TestBloom start()
ALLVARLIG: Exception in game loop
org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
   at org.lwjgl.opengl.Util.checkGLError(Util.java:53)
   at org.lwjgl.opengl.Display.swapBuffers(Display.java:591)
   at org.lwjgl.opengl.Display.update(Display.java:609)
   at com.jme.renderer.lwjgl.LWJGLRenderer.displayBackBuffer(LWJGLRenderer.java:514)
   at com.jme.app.BaseGame.start(BaseGame.java:85)
   at jmetest.effects.glsl.TestBloom.main(TestBloom.java:84)
2007-aug-22 12:33:35 com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
2007-aug-22 12:33:35 com.jme.app.BaseGame start
INFO: Application ending.

Hmm, what does your properties.cfg say?

Just this:

#Properties
#Wed Aug 22 16:35:51 GMT+01:00 2007
FREQ=53
RENDERER=LWJGL
WIDTH=1920
HEIGHT=1024
DEPTH=24
FULLSCREEN=false



It updates when I change something in the dialog and doesn't change when I don't show dialog.

I've been trying more tests using glsl and most of them won't work if I'm asked for settings. But each one seem to work if I change ALWAYS_SHOW_PROPS_DIALOG to FIRSTRUN_OR_NOCONFIGFILE_SHOW_PROPS_DIALOG.



But then I found something odd, the TestGLSLShaderAttributes test always works nicely and shows 4 moving squares, each with different colors. The strange thing is that when I run with ALWAYS_SHOW_PROPS_DIALOG they are rather tiny and far apary and when I run with FIRSTRUN_OR_NOCONFIGFILE_SHOW_PROPS_DIALOG they are so big the red and orange ones just slightly overlap now and then…



Perhaps this could help track down the bug?

Hmm…  Maybe.  :?  The only thing I can think of is that somehow different settings are being sent in the two different ways…  either that or the showing of the swing window is throwing off your computer somehow.  What's your setup?

GeForce 7800 GTX/PCI/SSE2 - 2.1.0 NVIDIA 96.31, Ubuntu Feisty and amd64 x2.

Ok, I've found what causes my problem, even if I don't understand why it breaks things. :slight_smile:

If I comment out UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); on LWJGLPropertiesDialog:214 then apparently everything works!



The one that doesn't work is com.sun.java.swing.plaf.gtk.GTKLookAndFeel. I don't know what the default one is but it looks almost as good, atleast better than com.sun.java.swing.plaf.motif.MotifLookAndFeel (which also works)



Now if I could just find out how to get the right refreshrate and some resolution lower than 1920x1024. :smiley:

Maybe LWJGLPropertiesDialog shouldn't by default switch to system L&F, that has led to JMEDesktop problems on linux before (for me, at least), and might even be the cause of JMEDesktop not working on mac - has anybody tried that?

Maybe just for Linux?  I think it is important on Windows (and maybe Mac?) to try to look as integrated as possible to scare away less people.

Good point. Still, can anybody reproduce the mac JMEDesktop issues with CrossPlatformLookAndFeel?

I can only say that jme fully works under linux since i updated to the latest nvidia drivers. (edit: the ones from nvidia download not the ubuntu packaged!)

Before that the glsl shaders and water didn't work even with pbuffer fallback.



On second thought, darkfrog's game settings panel report's 0 stencil bits and some other weird values  :? but that doesn't seem to hurt the tests.