screen flicker

I am getting very obvious flicker while rendering. I am double buffering but I am also using the CUDA card for processing AND openGL rendering so I am curious to know if anyone else is having this problem.

If I have very little going on in my display() loop, large, flat-colored objects (lighting doesn’t matter but I am not using it) practically disappear from the screen. If I put in a lot of ‘heavy’ objects (thousands of spheres), the problem is lessened but still very noticeable.

Anybody else doing something similar and seeing the same thing?

dave

could it be a problem related with your window msg framework, rather than cuda or opengl?

Can you post your code that demonstrates the flickering?

Do you have v-sync enabled in the control panel?

Thanks for the replys. It has been finals week so I have tabled some of this experimentation… I did try adjusting v-sync with no effect at all.

yk_cadcg: I’m not sure what my window msg framework is… Do you mean openGL context? I am not doing anything crazy, just a glut window and drawing in a loop with no other GUI at all – fairly straight C and nothing else. I was trying to demonstrate the improvement in operations by having both CPU code and GPU code do the same thing and then render the resulting animation. (they don’t do them at the same time, I have a switch that picks one or the other)

The good news is that the CUDA implmentation is easily 10 times faster doing non-optimized (clueless?) n^2 methods including the process of having to copy arrays back and forth from the card (I was comparing speed so that was important – a new rewrite will try to remove that)… but the flicker is a dog.

I’m working on a code rewrite at the moment to see if I can get something relatively tidy to post for ya’ll to check out.

dave

I’m sorry I’m not able to hep you :( I once used MFC and met flicker due to InvalidateRect() things…)