I'm hitting some challenges resizing the surface to which a Renderer is drawing. I can resize the window vertically without a problem, but when I resize horizontally, every other draw puts the window in a state where I am rendering garbage. If I get into a state where the draws cleanly, then every subsequent frame at the same size renders fine, as do vertical resizes. If I get into a bad state, subsequent frames render as garbage, as do vertical resizes.
Here's my render_scene function which handles resizing if necessary, then renders the scene.
From my description or this code, is there something obvious I'm doing wrong here? It looks like all your examples don't handle surface resizes. If you had time to demo it I'd be very appreciative.
Apologies if this is the wrong forum for asking about this. No offense taken if you decide to close it.
I'm hitting some challenges resizing the surface to which a
Renderer
is drawing. I can resize the window vertically without a problem, but when I resize horizontally, every other draw puts the window in a state where I am rendering garbage. If I get into a state where the draws cleanly, then every subsequent frame at the same size renders fine, as do vertical resizes. If I get into a bad state, subsequent frames render as garbage, as do vertical resizes.Here's my
render_scene
function which handles resizing if necessary, then renders the scene.From my description or this code, is there something obvious I'm doing wrong here? It looks like all your examples don't handle surface resizes. If you had time to demo it I'd be very appreciative.
Apologies if this is the wrong forum for asking about this. No offense taken if you decide to close it.