glClear Question

Hi Everyone,

When I run my OpenGL Game, I can hear my graphics card Running like crazy.

It's because every loop:

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

is being called.

Now I tried calling it on input and its cool, it works and I don't hear my Graphics Card anymore.

But for some reason the graphics just aren't as perfect, I can see some flickering here and there if I don't run it every loop.

What's your advice on such an issue.


Thanks.
Last edited on
This isn't why your graphics card is running wild. It's because your event loop is going as fast as possible. You should try limiting it via vsync or by calling a sleep function per loop iteration.
Ohhh lol ok...

I'll try it out Thanks! :)
Topic archived. No new replies allowed.