Jump to content
  • Advertisement
Sign in to follow this  
EmrldDrgn

OpenGL How long do quads stick around?

This topic is 4323 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

I'm currently working on a tile-based OpenGL game, and I was wondering if only redrawing tiles that have changed (say, where the hero walks) would work, or leave gaping black holes in my map when a tile isn't modified for awhile. How long do quads stick around without redrawing? Would this mess me up if the user dragged a window over the one with the game in it?

Share this post


Link to post
Share on other sites
Advertisement
If you don't clear the buffer then pretty much permanently.

Alt tab in a full screen game will corrupt the buffer though.

Your best bet is still to draw all tile every frame, even though it will cut your framerate, but in a tile based game it should be very high anyways, more than 60fps is heaps. I personally wouldn't bother and just draw them all.

Share this post


Link to post
Share on other sites
Until you get to the point where your rendering is becoming a bottle-neck, don't optimize it beyond what is obvious. Modern hardware can do alot. Quite alot. Chances are, you don't need to resort to old 'dirty rectangle' (or similiar) techniques to boost framerate.

Besides, much of the time the entire screen is going to change anyhow. In a Diablo-like game, every time you move, the screen would change and it would be a (small) waste to calculate what has changed. In an RTS, you spend alot of the time jumping about with the screen, so the same thing applies. A turn-based game might see some benefits to this, but probably not much to be worth the signifigant hassle. It's also fairly error-prone. Certainly you've played some older game in which a menu get's 'stuck' up, and moving your mouse over it erases it. It was fairly common (and Windows does it too sometimes).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!