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:
24be068
)
[GLControl] Use IGraphicsContext.SwapInterval to get/set vsync
author
thefiddler
<stapostol@gmail.com>
Sun, 26 Jan 2014 09:39:39 +0000
(10:39 +0100)
committer
thefiddler
<stapostol@gmail.com>
Sun, 26 Jan 2014 09:39:39 +0000
(10:39 +0100)
This patch fixes warnings related to the deprecated
IGraphicsContext.VSync property.
Source/GLControl/GLControl.cs
patch
|
blob
|
history
diff --git
a/Source/GLControl/GLControl.cs
b/Source/GLControl/GLControl.cs
index
a4efd02
..
16acb68
100644
(file)
--- a/
Source/GLControl/GLControl.cs
+++ b/
Source/GLControl/GLControl.cs
@@
-394,10
+394,13
@@
namespace OpenTK
get
{
if (!IsHandleCreated)
- return false;
+ {
+ return initial_vsync_value.HasValue ?
+ initial_vsync_value.Value : true;
+ }
ValidateState();
- return Context.
VSync
;
+ return Context.
SwapInterval != 0
;
}
set
{
@@
-412,7
+415,7
@@
namespace OpenTK
}
ValidateState();
- Context.
VSync = value
;
+ Context.
SwapInterval = value ? 1 : 0
;
}
}