Browse files

Use opengl32 instead of gdi32 throughout

Since we are dynamically loading opengl32.dll, we are supposed to use
the wgl version of functions that exist in both opengl32 and gdi32 dlls.
  • Loading branch information...
1 parent 9c2db33 commit 9129e6234304da76685fe96161e5ae63e3ecf784 @thefiddler thefiddler committed Dec 17, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/OpenTK/Platform/Windows/WinGLContext.cs
@@ -389,13 +389,13 @@ static bool IsValid(IntPtr address)
PixelFormatDescriptor pfd = new PixelFormatDescriptor();
- Functions.DescribePixelFormat(
+ Wgl.DescribePixelFormat(
window.DeviceContext, (int)mode.Index.Value,
API.PixelFormatDescriptorSize, ref pfd);
- if (!Functions.SetPixelFormat(window.DeviceContext, (int)mode.Index.Value, ref pfd))
+ if (!Wgl.SetPixelFormat(window.DeviceContext, (int)mode.Index.Value, ref pfd))
throw new GraphicsContextException(String.Format(
"Requested GraphicsMode not available. SetPixelFormat error: {0}",

0 comments on commit 9129e62

Please sign in to comment.