Call glGetError() after glFinish(), not glFlush().
As I understand it, both glGetError() and glFinish() are serializing and blockig, so it makes more sense to call them at the same time. glFlush() does not block.pull/507/head
parent
9b61f988be
commit
54015b6777
|
@ -809,6 +809,10 @@ void OpenGl1Renderer::FlushFrame() {
|
|||
UnSelectPrimitive();
|
||||
|
||||
glFlush();
|
||||
}
|
||||
|
||||
void OpenGl1Renderer::FinishFrame() {
|
||||
glFinish();
|
||||
|
||||
GLenum error = glGetError();
|
||||
if(error != GL_NO_ERROR) {
|
||||
|
@ -816,10 +820,6 @@ void OpenGl1Renderer::FlushFrame() {
|
|||
}
|
||||
}
|
||||
|
||||
void OpenGl1Renderer::FinishFrame() {
|
||||
glFinish();
|
||||
}
|
||||
|
||||
std::shared_ptr<Pixmap> OpenGl1Renderer::ReadFrame() {
|
||||
int width = camera.width * camera.pixelRatio;
|
||||
int height = camera.height * camera.pixelRatio;
|
||||
|
|
|
@ -669,6 +669,10 @@ void OpenGl3Renderer::FlushFrame() {
|
|||
points.Clear();
|
||||
|
||||
glFlush();
|
||||
}
|
||||
|
||||
void OpenGl3Renderer::FinishFrame() {
|
||||
glFinish();
|
||||
|
||||
GLenum error = glGetError();
|
||||
if(error != GL_NO_ERROR) {
|
||||
|
@ -676,10 +680,6 @@ void OpenGl3Renderer::FlushFrame() {
|
|||
}
|
||||
}
|
||||
|
||||
void OpenGl3Renderer::FinishFrame() {
|
||||
glFinish();
|
||||
}
|
||||
|
||||
void OpenGl3Renderer::Clear() {
|
||||
ViewportCanvas::Clear();
|
||||
pixmapCache.CleanupUnused();
|
||||
|
|
Loading…
Reference in New Issue