PDA

View Full Version : Ok, got a program running that is flickering, and I am using doublebuffer..



d-kay
10-26-2001, 05:00 AM
Yes, and the funny thing is that it doesn't flicker on the system where I built it, but everywhere else!!. It was extremely embarrasing because I sent this program out as a showcase, now that I am applying for jobs..

Please could someone help me out. I'm kind of in a hurry..

I use glut for windowing system. If someone could actually look at the code I'd be very grateful.

The system I built it on has a Pentium/Matrox G400 and the tested systems where it flickered were
Athlon/TNT2, and Pentium/ATI RAGE .

I have the code here: http://www.e.kth.se/~e95_pwi/gyroscope.cpp

Fastian
10-26-2001, 05:14 AM
Looked at your code..... It seems that you are calling glPopMatrix at the end of the display function while you never use glPushMatrix()... Maybe thats the problem... Ohterwise, it works pretty fine on my Geforce 2 MX apart from some occassional white glitches caused by pressing some keyboard key...

No flickering here on my machine. Reply if glPopMatrix problem fixes the flickering

Fastian

Fastian
10-26-2001, 05:20 AM
Have you tried enabling Wait for vertical sync. This might also be the problem. Enabling this should solve the problem

Fastian

d-kay
10-26-2001, 06:12 AM
Originally posted by Fastian:
Have you tried enabling Wait for vertical sync. This might also be the problem. Enabling this should solve the problem

Fastian


I fixed the program. I simply removed the glFlush() call and now everything goes like a breeze even on slower machines.

thanks anyway.

/Per

d-kay
10-26-2001, 06:20 AM
I removed the glPopMatrix and added the glFlush again, and it also works.


and I'm completely awed with the respons- time in this newsgroup. less than a day for an answer. grreat!.

thanks again,

/Per Viberg

Fastian
10-28-2001, 08:22 PM
No problem, glad to help.

Fastian