mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 12:35:30 +00:00
Fixed number of buffers
ContextAttribute.DOUBLEBUFFER is a boolean in SDL (false->single buffering, true->double buffering). We need to adjust the number of buffers accordingly (single buffering->1 buffer, double buffering->2 buffers).
This commit is contained in:
parent
21a1ca8895
commit
62c9793a6e
|
@ -92,6 +92,9 @@ namespace OpenTK.Platform.SDL2
|
|||
|
||||
int buffers;
|
||||
SDL.GL.GetAttribute(ContextAttribute.DOUBLEBUFFER, out buffers);
|
||||
// DOUBLEBUFFER return a boolean (0-false, 1-true), so we need
|
||||
// to adjust the buffer count (false->1 buffer, true->2 buffers)
|
||||
buffers++;
|
||||
|
||||
int red, green, blue, alpha;
|
||||
SDL.GL.GetAttribute(ContextAttribute.RED_SIZE, out red);
|
||||
|
|
Loading…
Reference in a new issue