Jump to content
  • Advertisement
Sign in to follow this  
Mark Duffill

OpenGL glCopyPixels is slow on some machines

This topic is 4866 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

Hi, I'm using glCopyPixels to copy the content of the front buffer to the back buffer. The reason is I'm doing an affect that builds up coloured quads, thus I dont clear the colour buffer on swaps. And so if I did not copy the front buffer to the back buffer I'd get flickering between the two buffers as they would have different content. Anyhow this method seems to work fine on some machines and not others, with the problem been the framerate drops to 1 frame per few seconds on the offending machines. All the machines are Windows 2000, fast processors (P4/AMD 1900+) lots of Ram (1GB+) and good graphics cards (GeForce 5900 or better) with the latest drivers. Two machines are basically identical (hardware wise at any rate), both with dual screens, however on one it runs slow and the other it runs fast?!? So anyone got any suggestions on how to solve this issue. Or find out what is causing the slowdown. I'm guessing OpenGl may be falling back to software mode or something, but I have no idea why if that is the reason at all! Thanks in advance. PS: Any news on OpenGl 2.0 for windows? Would be nice! :D

Share this post


Link to post
Share on other sites
Advertisement
Check if the super slow machines are running in software mode, do a glGetString with GL_VENDOR. Second check would be to make sure the target and destination color/depth/alpha formats are the same, glCopyPixels will do an internal conversion if not, and this can be slow.

Share this post


Link to post
Share on other sites
Quote:
Original post by Optus
Check if the super slow machines are running in software mode, do a glGetString with GL_VENDOR. Second check would be to make sure the target and destination color/depth/alpha formats are the same, glCopyPixels will do an internal conversion if not, and this can be slow.


Right thanks I'll look into trying that.

As for the formats they should be identical since I create a double buffered set of primary buffers; and I'm just copying one to another. Strange how on some machines with the same video cards/drives I'm getting this problem. Could it be due to the OpenGl32.dll been different? If so where should I get the .dll from and is it different for different gfx card vendors?

Thanks.

Share this post


Link to post
Share on other sites
Well, the OpenGL32.dll included with windows is the same across the board, but the different card vedors, by nessecity, have to create their own implementation of it. While you won't be able to find much in the way of a new dll specifically, making sure that all cards are running the latest drivers is going to be essentially the same thing.

As far as OGL 2.0 in windows... It's not gonna happen. Not until we have an OpenGL 3.0 spec out there, anyway. Longhorn (Or Vista, if you prefer) will up the standard support to 1.4 from the 1.1 that currently supported, but it will be a cold day in hell before Microsoft supports the latest OpenGL specs. They're too busy pushing DirectX.

Share this post


Link to post
Share on other sites
Although I haven't personally experienced it, apparently there's currently a bug in glCopyPixels with blending on NVIDIA drivers, so you may be running into this.... on the internal dev forums, they've said it'll be fixed in the next driver release.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sneftel
Although I haven't personally experienced it, apparently there's currently a bug in glCopyPixels with blending on NVIDIA drivers, so you may be running into this.... on the internal dev forums, they've said it'll be fixed in the next driver release.



Ah, this might possibly be the cause then, since I draw a series of blended quads to the back buffer, swap buffers and then copy the new front buffer to the back buffer. Rinse and repeat.

Anyhow thanks all. When OpenGl works its nice to use, when it doesn't it drives you mad! :D

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!