Problem with hardware acceleration using opengl

Started by
17 comments, last by raigan 14 years, 5 months ago
Hello, I'm relatively new to opengl programming. So far, everything has gone well, I'm creating animations of resonating structures. However, I've noticed that the animations aren't rendered properly when hardware acceleration is switched on. To illustrate the problem I created two animated gifs. The first is with hardware acceleration switched off, this is correct, the boundary between the blue and yellow colors shouldn't move. No acelleration The second is with hardware acceleration switched on. Now the boundaries between blue and yellow colors move. this is very noticable in the bottom right corner area. with acceleration I've only tested this on one computer, My graphics card is an intel 82852/82855 GM/GME graphics controller. Can I expect that this will happen with most graphic cards when hardware acceleration is swithed on, or is it a problem peculiar to my graphics card? Best regards Albert
Advertisement
It might be an artefact of the gfx driver. If you're not telling the vertices to move them they most certainly shouldn't be doing!

How are you enabling and disabling hardware acceleration? I'm just wondering if there is another render state or perhaps the projection is setup differently.

Andy

PS: you might want to eliminate the driver issues by running it on a machine with a different gfx card.

"Ars longa, vita brevis, occasio praeceps, experimentum periculosum, iudicium difficile"

"Life is short, [the] craft long, opportunity fleeting, experiment treacherous, judgement difficult."

Thanks Andy for your suggestions. I should have the opportunity to test the code tomorrow on a different computer. I forgot to say i'm using windows xp. I'm switching hardware acceleration on and off with control panel->Display->Settings->advanced->Troubleshoot.

Could it be a programming error even though it works with the acceleration turned off? I did do a search on google but didn't turn up much, except that Intel's implementation of opengl is sometimes problematic.

Regards

Albert
Could be different precision in floating point, or that calculations are performed in a different order which makes the precision worse, 1/2 + 1/3 is not necessarily the same as 5/6. In that particular case it might be, I didn't test it, but in more complex calculations it's quite likely the results are not exactly the same.

It is hard to say exactly what could be the problem without more information. A few questions that could help analyze it:
How are you constructing the border?
Are the blue/yellow colors a texture, drawn on a single quad?
Or do you have many vertices in it (how does it look in wireframe)?
Do you use the stencil/depth buffer?
What texture filters do you use if it's a texture?
Or do you calculate the colors in a shader, and if so can you show the shader code?
Put up a binary and I will be happy to test it for you and im sure others would too.
Erik, The Blue and yellow colors are a 1D texture drawn on 40 triangles, 30 vertices altogether. I am using the depth buffer. All gl calls are double precision. if I change the gl calls to single precision it doesn't make any difference to the appearance, without hardware acceleration it still renders properly. The filters I'm using are:

glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameterf(GL_TEXTURE_1D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
glTexParameterf(GL_TEXTURE_1D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);

Jeff8J, thank you very much for your offer, I will try to make a little binary containing just the problem, as the real application is very large. It might take me a day or so. Thank you very much, I will post again soon.

Best regards.

Albert
Hi, I've put up a small binary, it's at

http://www.violini.de/project1.exe

I would be very grateful if someone would test it on their computer. The boundary between yellow and blue colors should remain stationary throughout the animation.

Best regards

Albert

[Edited by - acp693 on December 7, 2009 2:52:03 AM]
No artifact on Quadro FX3700. But the image seems to be rotated by 180°.
Tibur, thank you very much for trying that for me. Yes the image is rotated 180 degrees in the binary, I think I must have swiched some coordinates when I made the animated gifs for my original post.

Best regards

Albert
The borders remain stationary on my NVidia GTX260 as well.

My guess is that some of your GL code is doing something that the Intel driver doesn't like :/

This topic is closed to new replies.

Advertisement