JeffM2501's picture

Issue getting a simple sample with forms up and running

I've been very happy with OpenTK using GameWindow, but for the first time I'm trying to use the GLControl with forms.

No mater what I try, every time I open the simplest of forms with the GL control, I get an error that no rendering context is available. At first I thought it may be because I was using Visual Studio 2008, but then I was also able to replicate it with 2005, on 2 different systems. I've even gone so far as to try it with 0.9.7 and the older release.

Is there something I have to initialize? I'm doing what I think the samples are doing, resizing after the load event.

A bare minimum sample is here, http://www.awesomelaser.com/3dspeeders/code/tools_problem_2009_30_03.zip it contains both the 2005 and 2008 projects I have tried.

Thank you, Any help would be appreciated.


Comments

Comment viewing options

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

You're mixing Tao and OpenTK in the wrong places it seems.

If you change the Tao GLControl line at the bottom of Form1.Designer.cs to:

private OpenTK.GLControl simpleOpenGlControl1;

It should work.

JeffM2501's picture

that's weird, I don't have any references to Tao at all in the project at all I wonder how it compiled at all. I guess I just saw GL and glossed over it :) Thank you so much for helping me with my stupidity, it works great now :)

Mincus's picture

Do you have a GLControl in the Visual Studio toolbox?
If so, check where it's from, you might have the Tao one on there instead of the OpenTK one.

JeffM2501's picture

I had added it to the VC toolbox and that was the problem. I added the wrong one. I have it set up with the correct one :)