Author Topic: Changing bpp from application?  (Read 1696 times)

Offline Texugo

  • byte
  • *
  • Posts: 6
    • View Profile
Changing bpp from application?
« on: June 14, 2011, 06:46:38 am »
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:

Code: [Select]
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


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11983
    • View Profile
    • http://www.jpct.net
Re: Changing bpp from application?
« Reply #1 on: June 14, 2011, 01:13:49 pm »
You can adjust this in Config. Have a look here:

http://www.jpct.net/doc/com/threed/jpct/Config.html#glColorDepth

Offline Texugo

  • byte
  • *
  • Posts: 6
    • View Profile
Re: Changing bpp from application?
« Reply #2 on: June 14, 2011, 03:36:34 pm »
Aye Captain
Thax 4 quick response  :D
I've change some configurations before instantiate FrameBuffer. My code is the same of Hello World.

Code: [Select]
...
                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...

Code: [Select]
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11983
    • View Profile
    • http://www.jpct.net
Re: Changing bpp from application?
« Reply #3 on: June 14, 2011, 05:41:51 pm »
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.

Offline Texugo

  • byte
  • *
  • Posts: 6
    • View Profile
Re: Changing bpp from application? [SOLVED]
« Reply #4 on: June 15, 2011, 06:50:17 am »
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   ;)