Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

noxa

Advantages of glClear?

This topic is 6939 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hail, As I''m new to OpenGL, I''m not quite experienced with all the calls, but one of the most useless ones I''ve found is glClear... what is the use of it? I can go from 100fps to nearly 200fps by just commenting the line out! As my scene takes up the full screen, it doesn''t matter if the background is not clear... Anything in the future of my program that might possibly depend on this for something? or can I just leave it out... Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Well, glClear just doesn''t do the color buffer. It can also clear depth, stencil, index, and accumulation buffers. Now there is a trick that you can use to not require clearing of the depth buffer. So basically, if you repaint the full screen and don''t need the depth buffer or other buffers, yeah, glClear is unneeded.

Tim

Share this post


Link to post
Share on other sites
Yeah, glClear isn''t needed at all. If you (not sure if this is the right command but) type noclip on the Quake2 console and go out of bounds. You will notice that you will see the screen flicker, old scenes, etc. If you are making any realtime game, you will not need it.

Justin Eslinger
Http://members.xoom.com/Blackscar/

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!