projects
/
platform
/
core
/
csapi
/
opentk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a46e20
)
Fixed crash in MakeCurrent(null)
author
Stefanos A.
<stapostol@gmail.com>
Sun, 22 Dec 2013 10:10:05 +0000
(11:10 +0100)
committer
Stefanos A.
<stapostol@gmail.com>
Sun, 22 Dec 2013 10:10:05 +0000
(11:10 +0100)
MakeCurrent(null) should set the bound device context to zero.
Source/OpenTK/Platform/Windows/WinGLContext.cs
patch
|
blob
|
history
diff --git
a/Source/OpenTK/Platform/Windows/WinGLContext.cs
b/Source/OpenTK/Platform/Windows/WinGLContext.cs
index
0e727df
..
837c3e7
100644
(file)
--- a/
Source/OpenTK/Platform/Windows/WinGLContext.cs
+++ b/
Source/OpenTK/Platform/Windows/WinGLContext.cs
@@
-279,14
+279,14
@@
namespace OpenTK.Platform.Windows
throw new ArgumentException("window", "Must point to a valid window.");
success = Wgl.MakeCurrent(wnd.DeviceContext, Handle.Handle);
+ device_context = wnd.DeviceContext;
}
else
{
success = Wgl.MakeCurrent(IntPtr.Zero, IntPtr.Zero);
+ device_context = IntPtr.Zero;
}
- device_context = wnd.DeviceContext;
-
if (!success)
{
throw new GraphicsContextException(String.Format(