Re: Why is my animation flickering?
- From: "forkazoo" <wrosecrans@xxxxxxxxx>
- Date: 18 Aug 2006 10:23:46 -0700
bg_ie@xxxxxxxxx wrote:
Wolfgang Draxinger wrote:
bg_ie@xxxxxxxxx wrote:
Anyone have any suggestions about this? Is the frame rate too
low?
That wouldn't explain the flickering. The best guess is, that
doublebuffering isn't enabled, OTOH you requested a double
buffer but you didn't specify if you want GLUT_RGBA or GLUT_RGB
or GLUT_INDEXED. My guess is that you didn't got the pixelformat
you wanted.
A few other hints: Don't call glutPostRedisplay from the
TimerFunc. Instead place it in the (net yet existing in your
code) idle function (call glutPostRedisplay as often as
possible). All the glLightfv calls should be placed in the
redraw function (along with all matrix intitialization), that is
to ensure, that upong drawing something everything is in the
state you expect.
Wolfgang Draxinger
--
E-Mail address works, Jabber: hexarith@xxxxxxxxxx, ICQ: 134682867
GPG key FP: 2FC8 319E C7D7 1ADC 0408 65C6 05F5 A645 1FD3 BD3E
Thanks for your help. I made the changes you suggested but I don't see
a difference. Also, perhaps flickering is the wrong word. What I see is
a line across my torus as it fades in and out. This line moves upwards
and is similar to the effect you see when a computer screen is shown on
tv. Anti-aliasing I think you call it. In my case, its a subtle effect,
but noticeable all the same. I'm completely new to graphics so perhaps
I'm missing something. Would you be kind enough to run my program to
see if you get the same effect?
Thanks,
Barry.
It sounds like you may have tearing. Most people know this problem
from when you play a First Person Shooter type of game, and rotate your
view very quickly, sometimes you will notice a horizontal "break"
partway through the screen. The top half of the screen seems to lag
momentarily behind the bottom half. Does this sound like what you
have?
Also, you may want to check your frame rate. It sounds like you have a
pretty simple scene, so your graphics hardware can probably draw it
very quickly. Do you get a frame rate of something like 60 or 70 FPS?
Or do you get something much much faster than your monitor could
actually display, like 237 FPS? If this is the case, you are likely to
get tearing.
So, if this is the problem, caused by the card swapping buffers in the
middle of updating the screen, you will need to poke around your
display settings, and enable an option for "sync swap" or disable an
option for "unlimited frame rate" or something similar. The exact name
for the option will vary depending on your card and drivers and OS,
etc. But, if you know generally what you are looking for, it shouldn't
be too hard to find in there.
.
- Follow-Ups:
- Re: Why is my animation flickering?
- From: bg_ie
- Re: Why is my animation flickering?
- References:
- Why is my animation flickering?
- From: bg_ie
- Re: Why is my animation flickering?
- From: bg_ie
- Re: Why is my animation flickering?
- From: Wolfgang Draxinger
- Re: Why is my animation flickering?
- From: bg_ie
- Why is my animation flickering?
- Prev by Date: Re: Why is my animation flickering?
- Next by Date: Re: Why is my animation flickering?
- Previous by thread: Re: Why is my animation flickering?
- Next by thread: Re: Why is my animation flickering?
- Index(es):
Relevant Pages
|