Remove call to glFlush() before swap_buffers
We may not want to call `swap_buffers` in the same thread as the current thread, so we're moving the call to `glFlush` out of the scope of glutin.
This commit is contained in:
parent
089f47821c
commit
bbcb4c8bea
4 changed files with 5 additions and 6 deletions
|
|
@ -57,6 +57,8 @@ impl Context {
|
|||
self.gl.Color3f(0.0, 0.0, 1.0);
|
||||
self.gl.Vertex2f(0.5, -0.5);
|
||||
self.gl.End();
|
||||
|
||||
self.gl.Flush();
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
|
|
@ -78,6 +80,8 @@ impl Context {
|
|||
self.gl.DrawArrays(gl::TRIANGLES, 0, 3);
|
||||
self.gl.DisableClientState(gl::VERTEX_ARRAY);
|
||||
self.gl.DisableClientState(gl::COLOR_ARRAY);
|
||||
|
||||
self.gl.Flush();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue