Fix for error spam in console when running on GL14 device

master
Tomasz Kapuściński 2016-03-29 15:05:32 +02:00
parent 32d1994c98
commit df4e5fa309
1 changed files with 4 additions and 5 deletions

View File

@ -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
{