My windows application which was using TAO earlier is now in process of shifting to OpenTK. In TAO, I noticed that there were no load and paint event. However as suggested here , I am using load event in OpenTK, the way it is described in the post.
The application is having a dock panel attached to main form. The OpenTK initialization (i.e. load event) is placed in main form and from dock panel there is some rendering being done. Up to this it was working in TAO. But it is throwing below error with OpenTK-
System.AccessViolationException was unhandled Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Source=OpenTK StackTrace: at OpenTK.Graphics.OpenGL.GL.GenLists(Int32 range)
I realized that from doc panel calling GL.any_method is throwing the same error. It seems to me that OpenTK is not loaded yet~