DMacATTACK's picture

OpenTK setup problem

Hey all,
I'm just getting started into using OpenTK and I already like it. But, after following the directions to the teeth, I'm having an issue with the glControl used within a Form. I am using VC# VS2008. The issue is:
When the control is created for the first time it is simply a white box
The "dock" property of the control must be set as fill, then once returned the graphics can be seen.
BUT there is an "undrawable" bar at the top, and pixel 0,0 is shifted below the control's window.

There has to be some simple way to correct this?

Thanks in advance,

Inline Images
white bar atop the glContol Window


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

This is strange. Make sure you update the viewport whenever the GLControl changes size:


(You need to use client coordinates for this, rather than the window coordinates return by glControl1.Width or .Height).