views:

23

answers:

1

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?

+1  A: 

You need to refresh your viewport:

GL.Viewport(gameWindow.ClientRectangle);
The Fiddler