Jump to content
  • Advertisement
Sign in to follow this  
acp693

OpenGL Problem with hardware acceleration using opengl

This topic is 3266 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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 :/

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!