How to correctly handle window resizes
Closed this issue · 1 comments
kretash commented
I'm not sure how to correctly handle this, there has to be a better way than destroying the context and creating it again.
Thanks,
jagenjo commented
whats the problem? just change the canvas size:
gl.canvas.width = new_width;
gl.canvas.height = new_height;
also remember to set the viewport
gl.viewport(0,0,new_width,new_height);