Delayed glut reshape callback

Started by
1 comment, last by Gazoo101 12 years, 4 months ago
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...
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.
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!

This topic is closed to new replies.

Advertisement