From df4e5fa309cb51f2b84ea392661979ee0b1c6492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kapu=C5=9Bci=C5=84ski?= Date: Tue, 29 Mar 2016 15:05:32 +0200 Subject: [PATCH] Fix for error spam in console when running on GL14 device --- src/graphics/opengl/gldevice.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/graphics/opengl/gldevice.cpp b/src/graphics/opengl/gldevice.cpp index 54f2a1fc..95a96fea 100644 --- a/src/graphics/opengl/gldevice.cpp +++ b/src/graphics/opengl/gldevice.cpp @@ -436,7 +436,10 @@ void CGLDevice::BeginScene() void CGLDevice::EndScene() { #ifdef DEV_BUILD - CheckGLErrors(); + int count = ClearGLErrors(); + + if (count > 0) + GetLogger()->Debug("OpenGL errors detected: %d\n", count); #endif } @@ -1766,8 +1769,6 @@ void CGLDevice::DrawStaticBuffer(unsigned int bufferId) if (it == m_vboObjects.end()) return; - glEnable(GL_VERTEX_ARRAY); - if(m_vertexBufferType == VBT_VBO_CORE) glBindBuffer(GL_ARRAY_BUFFER, (*it).second.bufferId); else @@ -1838,8 +1839,6 @@ void CGLDevice::DrawStaticBuffer(unsigned int bufferId) glBindBuffer(GL_ARRAY_BUFFER, 0); else glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0); - - glDisable(GL_VERTEX_ARRAY); } else {