This project is read-only.

GLControl Paint never fires?

Oct 24, 2013 at 11:53 AM
I've been trying to convert an OpenTK tutorial on GLControl + WinForms to SharpGL. While it's been straightforward for the most part it seems that GLControl's paint event is never fired in SharpGL. Instead I have to "manually" call it from the parent Form's paint event.

The OTK tutorial and source code is here:

I've read somewhere that this was also a problem in earlier OpenTK versions. Not a big issue but I would like to know if the reason is due to different GLControl versions or implementation differences?

Another issue: I downloaded and installed the VS2012 extensions (yesterday) and when I create a new project the dependency DLL's SharpGL.dll and SharpGL.WinForms.dll are both version 2.0. I believe they should be V2.1?

Lastly, I'm liking SharpGL more and more and for some reason prefer it over OpenTK but a function reference of some sort would be really helpful. Thanks for listening.
Oct 24, 2013 at 12:09 PM
Ok, to answer my own first question: I noticed there is a GLControl property RenderTrigger that has the options of TimerBased or Manual. Setting this to Manual and then rendering in the OpenGLDraw event instead of Paint seems to fix the issue nicely.