Changing bpp from application?

Started by Texugo, June 14, 2011, 06:46:38 AM

Previous topic - Next topic

Texugo

Hi buddies ... a new dummy on the block :-)

I'm on Ubuntu 10.10 - 64 bits and a GeForce 9600.
I try the Hello World and have this problem:


Software renderer (OpenGL mode) initialized
Software renderer disposed
Can't find desired videomode (800 x 600 x 32) - searching for alternatives
Can't find alternative videomode (800 x 600 x 32) - trying something else
[ Tue Jun 14 01:24:04 BRT 2011 ] - ERROR: Can't find any suitable videomode!
[ Tue Jun 14 01:24:04 BRT 2011 ] - ERROR: Can't set videomode - try different settings!
Exception in thread "main" java.lang.IllegalStateException: Cannot determine close requested state of uncreated window
at org.lwjgl.opengl.Display.isCloseRequested(Display.java:577)
at Main.loop(Main.java:39)
at Main.main(Main.java:15)


I came to forum and saw another topic with the same problem. The solution were change bpp from 24 to 32 but ... how to make it? I try in my nvidia settings and it tell me the max bpp is 24 :-|
There's some way to change it in FrameBuffer configuration?
Thanx


EgonOlsen


Texugo

Aye Captain
Thax 4 quick response  :D
I've change some configurations before instantiate FrameBuffer. My code is the same of Hello World.


...
                Config.setParameterValue("glColorDepth", 24);
Config.setParameterValue("glFullscreen", false);
Config.setParameterValue("glTextureDepth", 24);
buffer = new FrameBuffer(1024, 768, FrameBuffer.SAMPLINGMODE_NORMAL);
buffer.disableRenderer(IRenderer.RENDERER_SOFTWARE);
buffer.enableRenderer(IRenderer.RENDERER_OPENGL);
...


But for some weirdo reason i'still stuck. The output is...


Java version is: 1.6.0_20
-> support for BufferedImage
Version helper for 1.5+ initialized!
-> using BufferedImage
Software renderer (OpenGL mode) initialized
Software renderer disposed
Can't find desired videomode (1024 x 768 x 24) - searching for alternatives
Can't find alternative videomode (1024 x 768 x 24) - trying something else
[ Tue Jun 14 10:26:39 BRT 2011 ] - ERROR: Can't find any suitable videomode!
[ Tue Jun 14 10:26:39 BRT 2011 ] - ERROR: Can't set videomode - try different settings!
Exception in thread "main" java.lang.IllegalStateException: Cannot determine close requested state of uncreated window
at org.lwjgl.opengl.Display.isCloseRequested(Display.java:577)
at Main.loop(Main.java:45)
at Main.main(Main.java:15)


lwjgl cannot create a window ...  :-\
Some ideas? A alternative configuration maybe?
Thanx

EgonOlsen

Some Linux installations report only one resolution and that's the resolution of the desktop. I think you can somehow add additional resolutions to your X config. You may want to set Config.glVerbose to true to see the resolutions reported by the driver.

Texugo

Aye ... you're right!
I'm using Twin Monitors and seems to be a bug about it in Ubuntu 10.10. But using Config.glVerbose=true i can see a suitable video mode and now everything runs calm in Camelot.

Thanx   ;)