Sign in to follow this  
MYoung

OpenGL Interlacing artifacts?!

Recommended Posts

Hey, I'm trying to get computer-speed independent movement in an OpenGL app that I'm working on. After inserting some code (in the draw function) which moves objects and renders them if it has time, I'm getting some really wierd interlacing on the drawn polygons! It is very wierd because it only happens when the app is run in fullscreen mode. In windowed mode it's fine, but I don't want window mode for my app. It also doesn't occur on my other machines which have ancient STB Velocity 4400 cards, but it happens on my new Gigabyte Radeon 9200 card on my dev workstation! It also goes away when I enable "Smoothvision", though I know that Smoothvision creates some slight blur, which I don't like. Could this just be an issue with my video card? I have the VC++ 6.0 project with binary zipped up and located at... http://www.myavc.com/oglapp.zip Thanks guys! - Mike Young http://www.mikesshorts.com

Share this post


Link to post
Share on other sites
Wahoo! I fixed it! Okay, not that anyone will run into this problem, though I'll explain it anyway...

I was working off the OpenGL tutorial #5 -- the one with the rotating pyramid and cube. I was trying to get them to move at a speed independent of computer speed. My timing code basically moves the objects and if there is time to render them it renders them and then subtracts the game loop time from the game counter, which accumulates clock ticks. What was happening was that in the tutorial code, the swapping of buffers was occurring outside of the OpenGL draw function, which was where all my timing code was. So when it wasn't rendering the screen it was still swapping the buffers and so I would get this terrible interlacing -- as if the whole screen was z-fighting.

So what I did was move the swapping of the buffers within the draw function so that it would only swap them if it rendered. What a silly problem! I think it wasn't exhibiting issues on my STB Velocity 4400 because maybe that card cannot do double buffering in OpenGL in a 640x480x16 gfx mode?

- Mike Young
http://www.mikesshorts.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this