Intel 82845 strikes back

I have installed last drivers but no way to work with 1.1 b09.
It throws

 [java] Exception in thread "main" net.java.games.jogl.GLException: Unable to set pixel format
 [java]     at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.

java:493)
[java] at net.java.games.jogl.impl.windows.WindowsOffscreenGLContext.create(WindowsOffscreenGLContext.java:181)

 [java]     at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:135)
 [java]     at net.java.games.jogl.impl.windows.WindowsOffscreenGLContext.makeCurrent(WindowsOffscreenGLContext.java

:128)
[java] at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:254)
[java] at net.java.games.jogl.GLJPanel.reshape(GLJPanel.java:131)
[java] at java.awt.Component.setBounds(Component.java:1847)
[java] at java.awt.Component.resize(Component.java:1781)
[java] at java.awt.Component.setSize(Component.java:1770)
[java] at net.raccagni.opengl.ui.test.TestGLEventListenerImpl.main(TestGLEventListenerImpl.java:60)

:-/

Does the Gears demo work? What about the JGears demo? Could you post output with the system property -Djogl.verbose specified?

Any LWJGL stuff work?

Cas :slight_smile:

You have most likely set the wrong bit size for RGB and Depth in your capabilities when creating the Canvas.

On the Intel chip set I often use a depth size of either 8 bits or 16 bits, and that RGB is 8 bits.

The unable to set pixel format exception means that the bits per pixel didn’t match the description used to create the context. So the context was not created. It’s like asking for 32-bit per pixel when there are only 16-bit per pixel. So it will fail.

Try this on your video card and let me know if it works. I’m still trying to figure out the best way to use the chooseCapabilities method (more documentation would help!).

            // create an OpenGL capabilities context which describes the settings
            // most desired by Cola3D (i.e. allows the most features).
            GLCapabilities desired = new GLCapabilities();
            desired.setHardwareAccelerated(true);
            desired.setSampleBuffers(true);
            
            desired.setStencilBits(1);
            desired.setRedBits( 32 );
            desired.setGreenBits( 32 );
            desired.setBlueBits( 32 );
            desired.setAlphaBits( 32 );
            desired.setDepthBits( 32 );
            
            // create an array of other cabilities that decrease in desired settings
            GLCapabilities available[] = new GLCapabilities[4];
            
            available[0] = desired;
            System.out.println("b4: " + desired );
            
            available[1] = new GLCapabilities();
            desired.setHardwareAccelerated(true);
            desired.setSampleBuffers(true);
            desired.setStencilBits( 1 );
            desired.setRedBits( 24 );
            desired.setGreenBits( 24 );
            desired.setBlueBits( 24 );
            desired.setAlphaBits( 24 );
            desired.setDepthBits( 24 );
            
            available[2] = new GLCapabilities();
            desired.setHardwareAccelerated(true);
            desired.setSampleBuffers(true);
            desired.setStencilBits( 1 );
            desired.setRedBits( 16 );
            desired.setGreenBits( 16 );
            desired.setBlueBits( 16 );
            desired.setAlphaBits( 16 );
            desired.setDepthBits( 16 );
            
            available[3] = new GLCapabilities();
            desired.setHardwareAccelerated(true);
            desired.setSampleBuffers(true);
            desired.setStencilBits( 1 );
            desired.setRedBits( 8 );
            desired.setGreenBits( 8 );
            desired.setBlueBits( 8 );
            desired.setAlphaBits( 8 );
            desired.setDepthBits( 8 );

            // enable internal debug information to be outputed to console
            System.setProperty("jogl.debug.DefaultGLCapabilitiesChooser","true" );
            
            DefaultGLCapabilitiesChooser chooser = new DefaultGLCapabilitiesChooser();
            int choosen = chooser.chooseCapabilities( desired, available, -1 );
            capabilities = available[choosen];
            
            System.out.println("choosen #:" + choosen );
            System.out.println("choosen:" + capabilities );
            
            canvas = GLDrawableFactory.getFactory().createGLCanvas( capabilities );

Argg… ignore the above source code. That was not right.

This works on OpenGL 1.1, and my Intel video chip set on my mother board.

            // create an OpenGL capabilities context which describes the settings
            // most desired by Cola3D (i.e. allows the most features).
            GLCapabilities desired = new GLCapabilities();
            desired.setHardwareAccelerated(true);
            desired.setSampleBuffers(true);
            
            desired.setStencilBits(1);
            desired.setRedBits( 32 );
            desired.setGreenBits( 32 );
            desired.setBlueBits( 32 );
            desired.setAlphaBits( 32 );
            desired.setDepthBits( 32 );
            
            // create an array of other cabilities that decrease in desired settings
            GLCapabilities available[] = new GLCapabilities[4];
            
            available[0] = desired;
            System.out.println("b4: " + desired );
            
            available[1] = new GLCapabilities();
            available[1].setHardwareAccelerated(true);
            available[1].setSampleBuffers(true);
            available[1].setStencilBits( 1 );
            available[1].setRedBits( 24 );
            available[1].setGreenBits( 24 );
            available[1].setBlueBits( 24 );
            available[1].setAlphaBits( 24 );
            available[1].setDepthBits( 24 );
            
            available[2] = new GLCapabilities();
            available[2].setHardwareAccelerated(true);
            available[2].setSampleBuffers(true);
            available[2].setStencilBits( 1 );
            available[2].setRedBits( 16 );
            available[2].setGreenBits( 16 );
            available[2].setBlueBits( 16 );
            available[2].setAlphaBits( 16 );
            available[2].setDepthBits( 16 );
            
            available[3] = new GLCapabilities();
            available[3].setHardwareAccelerated(true);
            available[3].setSampleBuffers(true);
            available[3].setStencilBits( 1 );
            available[3].setRedBits( 8 );
            available[3].setGreenBits( 8 );
            available[3].setBlueBits( 8 );
            available[3].setAlphaBits( 8 );
            available[3].setDepthBits( 8 );

            // enable internal debug information to be outputed to console
            System.setProperty("jogl.debug.DefaultGLCapabilitiesChooser","true" );
            
            DefaultGLCapabilitiesChooser chooser = new DefaultGLCapabilitiesChooser();
            int choosen = chooser.chooseCapabilities( desired, available, -1 );
            capabilities = available[choosen];
            
            System.out.println("choosen #:" + choosen );
            System.out.println("choosen:" + capabilities );
            
            canvas = GLDrawableFactory.getFactory().createGLCanvas( capabilities );

Gears demo works. Using a GLJPanel I have the same trouble : below the complete log using your capabilities chooser

 [java] b4: GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 32, StencilBi

ts: 1, Red: 32, Green: 32, Blue: 32, Alpha: 32, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0 ]
[java] choosen #:0
[java] choosen:GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 8, Stenci
lBits: 1, Red: 8, Green: 8, Blue: 8, Alpha: 8, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0 ]
[java] Exception in thread “main” net.java.games.jogl.GLException: Unable to set pixel format
[java] at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.
java:493)
[java] at net.java.games.jogl.impl.windows.WindowsOffscreenGLContext.create(WindowsOffscreenGLContext.java:181)

 [java]     at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:135)
 [java]     at net.java.games.jogl.impl.windows.WindowsOffscreenGLContext.makeCurrent(WindowsOffscreenGLContext.java

:128)
[java] at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:254)
[java] at net.java.games.jogl.GLJPanel.reshape(GLJPanel.java:131)
[java] at java.awt.Component.setBounds(Component.java:1847)
[java] at java.awt.Component.resize(Component.java:1781)
[java] at java.awt.Component.setSize(Component.java:1770)
[java] at net.raccagni.opengl.ui.test.TestGLEventListenerImpl.main(TestGLEventListenerImpl.java:124)

we were writing in the same time. Using your last piece of code the result is :

 [java] b4: GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 32, StencilBi

ts: 1, Red: 32, Green: 32, Blue: 32, Alpha: 32, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0 ]
[java] choosen #:0
[java] choosen:GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 32, Stenc
ilBits: 1, Red: 32, Green: 32, Blue: 32, Alpha: 32, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0 ]
[java] Exception in thread “main” net.java.games.jogl.GLException: Error creating offscreen bitmap
[java] at net.java.games.jogl.impl.windows.WindowsOffscreenGLContext.create(WindowsOffscreenGLContext.java:175)

 [java]     at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:135)
 [java]     at net.java.games.jogl.impl.windows.WindowsOffscreenGLContext.makeCurrent(WindowsOffscreenGLContext.java

:128)
[java] at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:254)
[java] at net.java.games.jogl.GLJPanel.reshape(GLJPanel.java:131)
[java] at java.awt.Component.setBounds(Component.java:1847)
[java] at java.awt.Component.resize(Component.java:1781)
[java] at java.awt.Component.setSize(Component.java:1770)
[java] at net.raccagni.opengl.ui.test.TestGLEventListenerImpl.main(TestGLEventListenerImpl.java:125)

[quote][java] at net.java.games.jogl.GLJPanel.reshape(GLJPanel.java:131)
[/quote]
In build 1.1.0-b09 of JOGL you can not create PBuffer’s in any other method of GLEventListener then the Init() method. Such as the Display or Reshape methods.

There is a bug in “makeCurrent” which attempts to use the wrong context to create the buffer.

I assume this is what are you doing here.

If this is the case. Try moving your buffer creation code to just the GLEventListener.Init method and see if the exception goes away.

Maybe trying the latest build from the CVS will help fix this problem for you?

Download GLEW from source forge and find out if your video drivers will support the format you are asking for. Nvidia cards do not support 32 bit depth buffers so asking for one will fail, for example. JOGL is very unforgiving in this mannor.

raccagni: Your Intel driver seems to have a problem with off-screen rendering to a Windows Device-Independent Bitmap, which is the fallback path for the GLJPanel. I tried running the JGears demo on an Intel 82815 motherboard with Intel’s most recent drivers for that chipset (from 2002, I think) and the JGears demo ran fine with the Microsoft GDI renderer. I don’t have an 82845 to test with but if you want to email me I might be able to send you a build or two to try to see if we can work around the problem.

mustang: unfortunately your code above is not correct. GLCapabilitiesChooser is a callback mechanism; the chooseCapabilities() method is called from the JOGL implementation during OpenGL context creation. You can pass in your own GLCapabilitiesChooser implementation to the GLDrawableFactory methods and it will be called at the appropriate time. Calling the DefaultGLCapabilitiesChooser with an array of manually-created GLCapabilities objects is meaningless.

The master has spoken! :slight_smile:

I did not understand the documentation very well about how to use. So thanks for posting this on the forum. I will attempt to rewrite it correctly.

Maybe this explains some problems I’ve been having (hahaha…)

I’ve quite the same problem:

Using an Intel 82845 Graphic Controller, jogl fails to initialise and throws the following exceptions :
Error Making WGLC Current : -1073278755
net.java.games.jogl.GLException: Unable to enumerate pixel formats of window using wglGetPixelFormatAttribivARB : error code -1073283059

I don’t think I have the latest driver, but OpenGL works well with c++ demos founds on http://nehe.gamedev.net

As we want to distribute our application on different hardware configuration, it would be better if it works even if user hasn’t the last driver.

For information, I initialise JOGL with the following code:


GLCapabilities capabilities=new GLCapabilities();
capabilities.setHardwareAccelerated(false);
capabilities.setDoubleBuffered(true);
canvas=GLDrawableFactory.getFactory().createGLCanvas(capabilities);

canvas.addGLEventListener(this);

this.setLayout(new BorderLayout());

this.add(canvas, BorderLayout.CENTER);


And the jogl gears demo can’t works too.

Thank for any idea :wink:

I ran some tests on a machine with Windows XP and an Intel 82845G chipset. I tried three versions of the Intel drivers: 6.14.10.3722, 6.14.10.3762 and 6.14.10.4020. Unfortunately I didn’t notice until testing the last one that someone had disabled hardware acceleration in the Display control panel and that was why JOGL kept coming up with the Microsoft GDI renderer. Anyway, the result with the 4020 driver and hardware acceleration enabled is that all of the JOGL demos that can run on that card (Gears, JGears and InfiniteShadowVolumes) work perfectly with 1.1 b09. No strange exceptions or errors with either Gears or JGears (the latter of which uses pbuffers rather than DIBs for offscreen rendering - I tried the DIB version as well).

The best advice I can offer is first, to upgrade your video drivers, and second, to upgrade your graphics card. The 82845 chipset even with the latest drivers from Intel is pretty ancient and doesn’t support any of the interesting OpenGL functionality like vertex or fragment programs. You can get an NVidia GeForce 4 MX pretty cheap nowadays and even the GeForce FX 5200, which is a pretty good card, can be found for less than $100.

Hi

On the machine I tested, the drivers were totally deprecated : 6.13.1.3442

If clients have problems, we’ll do as all customer care centres : “update your drivers or buy a new graphic card” :wink:

Thanks

Since I’ve updated drivers, everything works good except that the mouse cursor is flashing while dragging it over the canvas while jogl redraws.

It also happens with the Gears demo.

I’m now using JOGL version 1.1.0-b10

That’s a problem with the Intel drivers that I noticed as well. You might be able to work around it by turning off the mouse pointer shadow.

I desactivated mouse pointer shadow but nothing changed :frowning:

Intel drivers don’t seem to be very compliant with jogl …