문제

I've been searching around for this, I've managed to find out out to change the size of our window, and how to change the resolution of the monitor.

But I can't seem to find how to tell OpenGL where and how big my viewport is.

Example: the game starts up in 400x300, and I expand the window to 800x600. I now have a 800x600 window, but only a 400x300 box in the corner is being rendered to. I get the same problem when switching to fullscreen, the gray area covers the entire screen, but I only have a small box in the corner being rendered to.

Any OpenTK people out there that know how to do this?

도움이 되었습니까?

해결책

You need to refresh your viewport:

GL.Viewport(gameWindow.ClientRectangle);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top