
Strange NullReferenceException
Posted Sunday, 16 December, 2012 - 14:07 by Sepidar inHi,
I am writing a program, running on many different machines. The program uses a control that is derived from GLControl. In a few of machines which program runs on them, OpenTK raises a NullReferenceException. I believe this exception is machine dependent, because the code works fine on the machines exact same condition.
The buggy code is located in the constructor of the form. I read a thread here and tried to solve the problem with:
dummyGraphics = OpenTK.Graphics.GraphicsContext.CreateDummyContext(); OpenTK.Graphics.OpenGL.GL.LoadAll();
but now CreateDummyContext raises the exception. My version of OpenTK is 1.0.0.201.
How should I solve this problem?
Thank you in advance for your help


Comments
Re: Strange NullReferenceException
Which platforms does it work on, and which platforms have trouble?
I believe none of the GLControl examples ever worked on my Mac.