\$10

### Image of the Day Submit

IOTD | Top Screenshots

## [Fixed] OpenGL issues with Intel HD 3000 card

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

7 replies to this topic

Posted 23 January 2012 - 06:00 PM

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:

glEnd();

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

### #2mhagain  Members

Posted 23 January 2012 - 06:21 PM

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

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.

### #3V-man  Members

Posted 24 January 2012 - 08:38 AM

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];
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

Posted 24 January 2012 - 10:25 AM

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

### #5RobTheBloke  Members

Posted 25 January 2012 - 08:57 AM

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

Either D3D or just stick with the basic GL 1.1

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! ;)

### #6V-man  Members

Posted 25 January 2012 - 10:09 AM

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

Either D3D or just stick with the basic GL 1.1

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! ;)

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];
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

### #7Martins Mozeiko  Members

Posted 25 January 2012 - 11:04 AM

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! ;)

Most likely Apple is writing drivers for MacOSX, not Intel. That's why there GL3 support is better than on Windows.

### #8mhagain  Members

Posted 25 January 2012 - 12:06 PM

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!)

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.