LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: lainmaster on November 25, 2009, 22:33:51

Title: [SOLVED] LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: lainmaster on November 25, 2009, 22:33:51
SOLVED
Problem was:
1) hadn't properly updated to lwjgl 2.2.1
2) hadn't isntalled the NVIDIA GeForce drivers for Windows 7, was using the ones that come with Windows, which don't work.

Working well in Windows 7 64 bits



Code: [Select]
Initial mode: 1280 x 1024 x 32 @60Hz
setDisplayMode(800, 600, false);F
org.lwjgl.LWJGLException: Pixel format not accelerated
        at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
        at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
        at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:185)
        at org.lwjgl.opengl.Display.createWindow(Display.java:308)
        at org.lwjgl.opengl.Display.create(Display.java:840)
        at org.lwjgl.opengl.Display.create(Display.java:768)
        at org.lwjgl.opengl.Display.create(Display.java:749)
        at ecl.client.Main.initializeGears(Main.java:299)
        at ecl.client.Main.run(Main.java:163)
        at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-0" java.lang.NullPointerException
        at org.lwjgl.opengl.GL11.glEnable(GL11.java:1030)
        at ecl.client.Main.initializeGears(Main.java:305)
        at ecl.client.Main.run(Main.java:163)
        at java.lang.Thread.run(Thread.java:619)

I used to get this in Windows 7, someone told me to download the latest version. I did, just a few minutes ago, and still getting the same.
Works fine in Windows XP.

I want to try if that popular lego-like sandbox game made with lwjgl works but I forgot it's name >_>
Title: Re: org.lwjgl.LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: kappa on November 25, 2009, 22:38:12
I want to try if that popular lego-like sandbox game made with lwjgl works but I forgot it's name >_>

minecraft (http://www.minecraft.net)
Title: Re: org.lwjgl.LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: lainmaster on November 25, 2009, 22:38:45
It told me "Pixel format not accelerated". Yikes, what can i do?
I just formatted my computer and no longer have XP or any other OS than 7 :S

EDIT
Not to mention I chose all the complications making a MMO RPG in Java means so everyone could use the game, including Windows 7

EDIT 2
It's a 64 bits Windows 7 Ultimate but I also got this same error in 32 bits Windows 7 RC, I think it used to work in the Beta, but I can't remember well.

EDIT 3
I'm using the drivers that Windows 7 came with, didn't install any other drivers. Aero is working fine so I guess my graphics card is working properly. Last time I installed the GeForce drivers, when I had W7RC, graphics just stopped working (Both Aero and games), so I had to go back to the ones Windows comes with. =/
Title: Re: org.lwjgl.LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: kappa on November 25, 2009, 22:56:34
that error usually means that opengl drivers are not found, try upgrade to latest driver.
Title: Re: org.lwjgl.LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: lainmaster on November 25, 2009, 22:57:08
Hmm on it, thanks!
Title: Re: org.lwjgl.LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: lainmaster on November 25, 2009, 23:24:28
Minecraft works now.

But I get

Code: [Select]
run:
Initial mode: 1280 x 1024 x 32 @60Hz
setDisplayMode(800, 600, false);Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: org.lwjgl.opengl.WindowsDisplay.nTrackMouseEvent(J)Z
        at org.lwjgl.opengl.WindowsDisplay.nTrackMouseEvent(Native Method)
        at org.lwjgl.opengl.WindowsDisplay.doHandleMessage(WindowsDisplay.java:823)
        at org.lwjgl.opengl.WindowsDisplay.handleMessage(WindowsDisplay.java:756)
        at org.lwjgl.opengl.WindowsDisplay.nUpdate(Native Method)
        at org.lwjgl.opengl.WindowsDisplay.update(WindowsDisplay.java:410)
        at org.lwjgl.opengl.Display.processMessages(Display.java:625)
        at org.lwjgl.opengl.Display.update(Display.java:657)
        at org.lwjgl.opengl.Display.initContext(Display.java:874)
        at org.lwjgl.opengl.Display.create(Display.java:845)
        at org.lwjgl.opengl.Display.create(Display.java:768)
        at org.lwjgl.opengl.Display.create(Display.java:749)
        at ecl.client.Main.initializeGears(Main.java:299)
        at ecl.client.Main.run(Main.java:163)
        at java.lang.Thread.run(Thread.java:619)

My game did run now, and showed something for like a split second, but I did get to see something, so the graphics seem to be working, up to a point. What does this new error mean?
Title: Re: org.lwjgl.LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windo
Post by: kappa on November 25, 2009, 23:30:37
check your classpath, do you have multiple lwjgl.jar's or maybe the path to the natives is wrong.
Title: Re: org.lwjgl.LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: Matzon on November 25, 2009, 23:54:06
aye looks like 2.2.1 code using a native of an earlier version
Title: Re: org.lwjgl.LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: lainmaster on November 26, 2009, 01:41:33
Gosh, I feel like an idiot.

Thanks, everyone!

It's working now.
Title: Re: org.lwjgl.LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: flekoun on December 21, 2009, 11:03:06
This problem isn't solvet at all. LWJGL doesn't run on many graphics cards under Windows 7 both NVidia and ATI. I am still getting this message Pixel format not accelerated. On WindosXP everything runs fine. Can you please tell me how to fix this? And YES my graphics card drivers are up to date. I have updated them via Windows 7 update and it tells me that my graphics drivers are up to date. Don't you know any way how to make this works on Windows 7? We tried to use JOGL instead of JWLGL but it runs terribly slow. We also tried to use software emulation but it runs terribly slow also. We have now a serious problem here. We cant make our program run on Windows 7 and our customers are complaining and we cant do anything about it. Can you please help us?? :'(
Title: Re: [SOLVED] LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: Matzon on December 21, 2009, 13:29:39
first of all - the fact that it runs "terribly slow" in jogl, implies that it is also running in software mode.
You need to check that not only are you're drivers up to date - but also that the drivers AND hardware support and run OpenGL. Try something like doom or whatever that uses Hardware OpenGL.
second, "I have updated them via Windows 7 update and it tells me that my graphics drivers are up to date." - Windows 7's Windows update is not the best way to update drivers - you need to get the drivers from your hardware producer (ATI, nVidia etc).
Title: Re: [SOLVED] LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: flekoun on December 21, 2009, 13:35:42
Yes it probably runs in software mode in JOGL as well. But does this solve this problem?I guess not. I have looked for graphics card drivers everywhere not just Windows 7 update. I have the latest drivers I could get. I have ATI Radeon X1200 Series graphics card. I would be happy for any kind of suggestion how to solve this problem.
Title: Re: [SOLVED] LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: Rene on December 21, 2009, 14:34:36
Like Matzon said... check the OpenGL version the driver supports. You should be able to find it in CCC. If the drivers don't support it yet, the only 'solution' is to wait for AMD to implement it.
Title: Re: [SOLVED] LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: Matzon on December 21, 2009, 14:57:13
x1200 is pretty old - do they work correctly with windows 7?
latest drivers I could find were: http://support.amd.com/us/gpudownload/windows/Legacy/Pages/integrated_mce-xp.aspx?type=2.7&product=2.7.3.3.1.3.2&lang=English

which is in the legacy section ...
Title: Re: [SOLVED] LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: lainmaster on December 21, 2009, 14:57:35
That's the problem I had myself: the graphics drivers Windows 7 comes with or downloads, don't work for this. Which is concerning, actually.
You have to manually download the drivers from the NVidia website. They recently (well some months ago) added the Windows 7 versions.
Title: Re: org.lwjgl.LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: rhk on January 13, 2010, 16:53:28
aye looks like 2.2.1 code using a native of an earlier version

I just completely reinstalled eclipse, and installed the lwjgl plugin. It looks like it has the natives for both win32 2.2.0 and windows 2.2.1, and is choosing the former.

This is causing the same UnsatifiedLinkError for org.lwjgl.opengl.WindowsDisplay.nTrackMouseEvent(J)Z

Title: Re: [SOLVED] LWJGLException: Pixel format not accelerated @ lwjgl-2.2.1 & Windows 7
Post by: adrian827 on November 01, 2011, 21:47:57
Minecraft