[Fixed] OpenGL issues with Intel HD 3000 card

Started by
6 comments, last by 21st Century Moose 12 years, 2 months ago
I have an application which uses shader and have had issues on a laptop with an Intel HD 3000 card. The same application runs perfectly fine on a handful of nvidia cards I've tested as well as a laptop with an Intel HD 2000 card (same driver). There are two related issues I've had with the HD 3000 card:

1. Shader programs wont link (compiles perfectly fine) and don't give any message to indicate why.

After lots of digging, I found that the shader will link as long as some sort of gl objects have been rendered before think link attempt. This is boggling my mind. Essentially I now have this in my code so that it will work no matter what:

glBegin(GL_QUADS);
glEnd();
// compile and link.

And as long as I have that before I attempt to compile and link (which I only do once, every other pass I just call glUseProgram. There is no need to have the noop begin/end every pass just before compiling and lnking), the images draw correctly.

After I got that working, I was having an issue where the image was drawing on top of everything else even though it was the first thing to be rendered. After trying different things, I found that the my objects correctly draw on top of the image if I resetup the clipping pane after rendering the image. Setting up the clipping pane involves:


gl.glMatrixMode(GL.GL_MODELVIEW);
gl.glPushMatrix();
double eqn[] = { 0.0, 1.0, 0.0, 0.0 };
double eqn2[] = { 1.0, 0.0, 0.0, 0.0 };
double eqn3[] = { 0.0, -1.0, 0.0, 0.0 };
double eqn4[] = { -1.0, 0.0, 0.0, 0.0 };
gl.glTranslated(extent.getMinX(), extent.getMinY(), 0);
/* clip upper */
gl.glClipPlane(GL.GL_CLIP_PLANE0, eqn, 0);
gl.glEnable(GL.GL_CLIP_PLANE0);
/* clip left */
gl.glClipPlane(GL.GL_CLIP_PLANE1, eqn2, 0);
gl.glEnable(GL.GL_CLIP_PLANE1);
gl.glTranslated(-extent.getMinX(), -extent.getMinY(), 0);
gl.glTranslated(extent.getMaxX(), 0, 0);
/* clip right */
gl.glClipPlane(GL.GL_CLIP_PLANE2, eqn4, 0);
gl.glEnable(GL.GL_CLIP_PLANE2);
gl.glTranslated(-extent.getMaxX(), 0, 0);
/* clip bottom */
gl.glTranslated(0, extent.getMaxY(), 0);
gl.glClipPlane(GL.GL_CLIP_PLANE3, eqn3, 0);
gl.glEnable(GL.GL_CLIP_PLANE3);
gl.glMatrixMode(GL.GL_MODELVIEW);
gl.glPopMatrix();


I setup the clipping pane before I render anything, then I have to do it after I render the image or the image draws on top of everything else.

Remember, these issues only occur on the HD 3000. My big questions are:

Is there anything I can do about either of these issues? Has anyone run into this before? Is there something else that might be causing this behavior?

Unfortunately it is important to the customer we fully support as many cards as possible, especially laptops with potentially non gaming cards.

Thanks

Max
Advertisement
You're going to hate this answer, but the best way to deal with Intel driver problems is to port to D3D.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

Either D3D or just stick with the basic GL 1.1
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Thanks for the replies! Since porting to D3D is not a possibility with the application, I did some digging on the intel developer forums and found someone who had posted that they had issues with an opengl game they wrote on the same card and fixed it by uninstalling intel's drivers and switching to the manufacturers version. I tried this and it actually fixed my issues as well even though the laptop with the HD2000 is still on intels latest driver (both laptops were DELL latitudes, just different versions). So if anyone else is having issues with intel cards, maybe try manufacturer drivers.

Max

You're going to hate this answer, but the best way to deal with Intel driver problems is to port to D3D. [/quote]


[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

[/font][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=2]Either D3D or just stick with the basic GL 1.1 [/quote][/font]


[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

Gl3 core profile on the HD3000 is absolutely fine (It's more compliant than the Nvidia drivers!). The mac-mini, the macbook air, and the macbook pro all use the HD3000 for it's GL3 support, so it can't be that bad now can it! ;) [/font]



You're going to hate this answer, but the best way to deal with Intel driver problems is to port to D3D.


[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

[/font][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=2]Either D3D or just stick with the basic GL 1.1 [/quote][/font]


[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

Gl3 core profile on the HD3000 is absolutely fine (It's more compliant than the Nvidia drivers!). The mac-mini, the macbook air, and the macbook pro all use the HD3000 for it's GL3 support, so it can't be that bad now can it! ;) [/font]


[/quote]

I'm surprised. I don't have an Intel and never have but I'm still surprised.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

The mac-mini, the macbook air, and the macbook pro all use the HD3000 for it's GL3 support, so it can't be that bad now can it! ;)

[/font]


Most likely Apple is writing drivers for MacOSX, not Intel. That's why there GL3 support is better than on Windows.
The hardware is actually fundamentally fine (if under-performing), but the Windows driver is still quite flaky. When targetting Intel with OpenGL you have to very consciously set out to target Intel - my own personal rule of thumb here is to restrict what I do in GL to what I would do with D3D - as in, use the same texture formats, keep within caps limitiations reported by D3D, etc. That way things generally don't go too far wrong, but there are still cases where a buggy driver workaround is needed (e.g. in this case the glBegin/glEnd hack; I've previously had to surround every draw call by a glPushAttrib/glPopAttrib pair if using generic attrib arrays otherwise the driver would send 0,0 for texcoord sets after the first). I've seen Intel drivers hard-lock the OS before (thankfully a thing of the past with WDDM), writing to the front buffer - despite the fact that the GL spec says that you can - is completely out; even with D3D I've seen walls begin to dissolve before my very eyes owing to restoring incorrectly reported default state values (way to freak out your end-users!)

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement