-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting System.Windows.Forms control context #118
Comments
The default value for ContextProfile is Compatibility (source reference) I think changing it to Core will solve the issue you're facing. |
Thanks for the quick response. I did try setting the ContextProfile manually like this:
But the same thing happens, I can use the functions from the triangle example which should not be available in a 3.3 core context. By the way I installed the following packages in NuGet: |
I also tried making the control from code behind instead of xaml, but I experience the same issue:
|
That Debug and Robust properties set to Required smell... They are different from the default values, and could make fail context creation due missing extensions. |
Hi!
I am trying to create an OpenGL.GlControl in a WPF window with a 3.3 core OpenGL context, using OpenGL.NET 0.7.1 from NuGet. The wiki here suggests to use the ContextVersion property of the control.
If I try to enter anything to the ContextVersion property via the Properties tab of MSVC 2015, my xaml will be turned to something like this:
Which gives a compile error:
error MC3065: 'VersionId' property is read-only and cannot be set from markup.
I also tried adding the ContextVersion manually to the xaml like this:
This does compile, but I don't think I end up with a core context, because I can still draw the example triangle with the fixed function pipeline in the GlControl_Render event handler. The control's ContextProfile property is on the default Core.
Here are a few things I log from the GlControl_ContextCreated event handler:
Gl.CurrentRenderer: GeForce GT 630/PCIe/SSE2
Gl.CurrentVersion: Version=4.6 API=gl
Gl.CurrentShadingVersion: Version=4.60 API=glsl
DeviceContext.CurrentAPI: gl
DeviceContext.Version: Version=1.0 API=wgl
DeviceContext.IsPixelFormatSet: True
The text was updated successfully, but these errors were encountered: