Skip to content

Commit

Permalink
MythRenderOpenGL: Cleanup glCheck
Browse files Browse the repository at this point in the history
- don't check at performance critical points
- always clear the entire error queue
  • Loading branch information
mark-kendall committed Jan 18, 2019
1 parent c9514dc commit 660b88d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions mythtv/libs/libmythui/mythrender_opengl.cpp
Expand Up @@ -34,12 +34,9 @@ static const GLuint kVertexSize = 16 * sizeof(GLfloat);

static inline int __glCheck__(const QString &loc, const char* fileName, int n)
{
int error = glGetError();
if (error)
{
LOG(VB_GENERAL, LOG_ERR, QString("%1: %2 @ %3, %4")
.arg(loc).arg(error).arg(fileName).arg(n));
}
GLenum error;
while((error = glGetError()) != GL_NO_ERROR)
LOG(VB_GENERAL, LOG_ERR, QString("%1: %2 @ %3, %4").arg(loc).arg(error).arg(fileName).arg(n));
return error;
}

Expand Down Expand Up @@ -928,7 +925,6 @@ void MythRenderOpenGL::DrawBitmapPriv(uint tex, const QRect *src, const QRect *d
kTextureOffset);

glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glCheck();

glDisableVertexAttribArray(TEXTURE_INDEX);
glDisableVertexAttribArray(VERTEX_INDEX);
Expand Down

0 comments on commit 660b88d

Please sign in to comment.