Jump to content
  • Advertisement
Sign in to follow this  
Gazoo101

Delayed glut reshape callback

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

Hey hey hey (or ho ho ho as the case may be),

I'm running a semi simple, yet convoluted graphics engine with some FBO's n textures and voxels and bits n thingy-ma-bobs... The point is, I have a bunch of textures that need re-sizing whenever I reshape the window. Unfortunately the computer I have is kind of crappy and although I'm not sure constantly re-sizing textures is good practice, it has a tendency to crash my computer. Completely. As in, it just comes to a grinding halt.

Anyway - the easiest course of action for me to take to avoid this nasty crashing business, is to make sure all this resizing stuff happens once, when the user has stopped resizing the window. I was wondering if anyone has a good idea as to how this might be accomplished in a neat and not-too-hacky way.

Ideally, I'd love for a bool to be set once the user has let the window go, and then the textures all get resized. I'm not a big fan of polling periodically to make sure that the user is no longer fiddling with the window.

Any good ideas?

Gazoo

P.s No coal plz...

Share this post


Link to post
Share on other sites
Advertisement
I dont know if glut would catch it but you can try to do the resizing if the size has changed on mouse up.

Share this post


Link to post
Share on other sites
That's a good idea... I suppose I could set a bool in the reshape function and then test that when mouse up triggers...

It turns out I was a fool and was resizing textures that did not exist. Although behavior is undefined, I still stand by my previous statement saying that my machine sucks...

Thank you for the suggestion!

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.

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!