Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rendering Area does not change when GLFW window is re-sized

Tags:

c++

opengl

glfw

I'm switching from GLUT to GLFW to find that when I re-size my GLFW window, the rendering region does not change. (IE, the content being rendered stays in the same place as it was in the old window size, and the new window area is filled with the clear color.) Do I need to take more steps to re-size the context or something such as that?

like image 643
sFuller Avatar asked Nov 18 '25 05:11

sFuller


1 Answers

You need to re-size the viewport to match the size of your window.

Use glViewport();

like image 94
sFuller Avatar answered Nov 19 '25 20:11

sFuller



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!