DisplayMode Exception problem with LWJGL

Started by udaykanthr, October 23, 2005, 09:22:09

Previous topic - Next topic

udaykanthr

hi,iam beginner for JOGL programing and found that JOGL is slow and so i skipped to LWJGL but now i got a problem with display mode while executing sample program "WindowCreationTest.java".....
and in case of JOGL anykind of displaymode is supported by Java.......
iam using java1.5.04 and windowsXP........
The ouptput of the program is........
The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Found 36 display modes
Problem retrieving mode with 640x480x32@75
Problem retrieving mode with 800x600x32@75
Problem retrieving mode with 1024x768x24@75
Problem retrieving mode with 1024x768x32@75
org.lwjgl.LWJGLException: Could not find a valid pixel format
       at org.lwjgl.opengl.Win32PeerInfo.nChoosePixelFormat(Native Method)
       at org.lwjgl.opengl.Win32PeerInfo.choosePixelFormat(Win32PeerInfo.java:5
2)
       at org.lwjgl.opengl.Win32DisplayPeerInfo.<init>(Win32DisplayPeerInfo.jav
a:50)
       at org.lwjgl.opengl.Win32Display.createPeerInfo(Win32Display.java:71)
       at org.lwjgl.opengl.Display.create(Display.java:654)
       at org.lwjgl.opengl.Display.create(Display.java:630)
       at org.lwjgl.opengl.Display.create(Display.java:614)
       at WindowCreationTest.initialize(WindowCreationTest.java:98)
       at WindowCreationTest.main(WindowCreationTest.java:290)

Matzon

Are you using uptodate OpenGL drivers?
What graphics card?

elias

I think he's running in software mode, which would explain why JOGL is slow. Try adding

-Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true


to your java runtime parameters.

- elias

udaykanthr


Thank you for your reply,
               iam using intel 82810E Graphics controller and so iam using software mode opengl ......,
after applying java runtime parameters ,
               -Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true
it gave an other exceptioin
-- listing properties --
displayColorBits=32
displayWidth=1024
depthBufferBits=24
displayFrequency=60
fullScreen=yes
displayHeight=768
GLApp.initDisplay(): Current display mode is 800 x 600 x 16 @60Hz
GLApp.initDisplay(): Setting display mode to 1024 x 768 x 16 @60Hz with pixel de
pth = 24
GLApp.initDisplay(): Failed to create OpenGL window: org.lwjgl.LWJGLException: C
ould not find a valid pixel format


so anyone please solve this problem.......
thank you.

elias

What parameters are you giving to Display.create(...)? Try the default (empty) Display.create() if you haven't already.

- elias

udaykanthr


ok i got my problem solved.............., my demo programs are running on my computer......., i just applied those java runtime parameters and then those demo programs of this site are working on my computer....., ok thank you very much for your suggestion.....