Interlacing artifacts?!

Started by
0 comments, last by MYoung 19 years, 8 months ago
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
Advertisement
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

This topic is closed to new replies.

Advertisement