This project is read-only.


Apr 5, 2013 at 12:06 PM
Although new to SharpGL and WPF and if correct, I would like to suggest that some information is provided on WPF and performance. As you can't select NativeWindow as rendercontexttype without an exception performance using WPF for large window sizes are't too impressive. Using WinForms and NativeWindow context works perfect. Should you even support WPF if no NativeWindow context is posible?

Looking forward to diging further into SharpGL.
Aug 13, 2013 at 11:41 AM
I sent an email to the author with this patch recently. The issue is that the OpenGLControl.cs does not pass the WPF Window Handle to the OpenGL.Create Method. You can to modify the OpenGLControl.cs OnApplyTemplate method as follows:
object parameter = null;

if(RenderContextType == RenderContextType.NativeWindow)
    HwndSource source = (HwndSource)HwndSource.FromVisual(this);
    parameter = source.Handle;

//  Lock on OpenGL.
lock (gl)
    //  Create OpenGL.
    gl.Create(RenderContextType, 1, 1, 32, parameter);
Aug 13, 2013 at 12:18 PM

Hi liamv06

Thanks for the post. Very much appreciated.



Nov 25, 2014 at 5:57 PM
The author still hasn't fixed this. I had to change this myself.
Nov 29, 2014 at 1:27 PM
Apologies to those who have been having this problem, I'll get this in the next release:

Above is the issue link if you want notifications for when it is done, I'll also update this thread.