|
|
@@ -1206,7 +1206,7 @@ namespace bgfx { namespace gl
|
|
|
// out redundant API calls to glEnable/DisableVertexAttribArray.
|
|
|
if (index >= 64)
|
|
|
{
|
|
|
- glEnableVertexAttribArray(index);
|
|
|
+ GL_CHECK(glEnableVertexAttribArray(index) );
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -1216,7 +1216,7 @@ namespace bgfx { namespace gl
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- glEnableVertexAttribArray(index);
|
|
|
+ GL_CHECK(glEnableVertexAttribArray(index) );
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1228,7 +1228,7 @@ namespace bgfx { namespace gl
|
|
|
// out redundant API calls to glEnable/DisableVertexAttribArray.
|
|
|
if (index >= 64)
|
|
|
{
|
|
|
- glDisableVertexAttribArray(index);
|
|
|
+ GL_CHECK(glDisableVertexAttribArray(index) );
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -1238,7 +1238,7 @@ namespace bgfx { namespace gl
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- glDisableVertexAttribArray(index);
|
|
|
+ GL_CHECK(glDisableVertexAttribArray(index) );
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1252,7 +1252,7 @@ namespace bgfx { namespace gl
|
|
|
uint64_t mask = ~(UINT64_C(1) << index);
|
|
|
s_vertexAttribArraysPendingDisable &= mask;
|
|
|
s_currentlyEnabledVertexAttribArrays &= mask;
|
|
|
- glDisableVertexAttribArray(index);
|
|
|
+ GL_CHECK(glDisableVertexAttribArray(index) );
|
|
|
}
|
|
|
|
|
|
while (s_vertexAttribArraysPendingEnable)
|
|
|
@@ -1261,7 +1261,7 @@ namespace bgfx { namespace gl
|
|
|
uint64_t mask = UINT64_C(1) << index;
|
|
|
s_vertexAttribArraysPendingEnable &= ~mask;
|
|
|
s_currentlyEnabledVertexAttribArrays |= mask;
|
|
|
- glEnableVertexAttribArray(index);
|
|
|
+ GL_CHECK(glEnableVertexAttribArray(index) );
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -4894,7 +4894,7 @@ namespace bgfx { namespace gl
|
|
|
{
|
|
|
if (UINT16_MAX != _layout.m_attributes[attr])
|
|
|
{
|
|
|
- GL_CHECK(lazyEnableVertexAttribArray(loc) );
|
|
|
+ lazyEnableVertexAttribArray(loc);
|
|
|
GL_CHECK(glVertexAttribDivisor(loc, 0) );
|
|
|
|
|
|
uint32_t baseVertex = _baseVertex*_layout.m_stride + _layout.m_offset[attr];
|
|
|
@@ -4924,6 +4924,7 @@ namespace bgfx { namespace gl
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
applyLazyEnabledVertexAttributes();
|
|
|
}
|
|
|
|
|
|
@@ -4935,7 +4936,7 @@ namespace bgfx { namespace gl
|
|
|
{
|
|
|
Attrib::Enum attr = Attrib::Enum(m_used[ii]);
|
|
|
GLint loc = m_attributes[attr];
|
|
|
- GL_CHECK(lazyDisableVertexAttribArray(loc));
|
|
|
+ lazyDisableVertexAttribArray(loc);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -4946,7 +4947,7 @@ namespace bgfx { namespace gl
|
|
|
for (uint32_t ii = 0; 0xffff != m_instanceData[ii]; ++ii)
|
|
|
{
|
|
|
GLint loc = m_instanceData[ii];
|
|
|
- GL_CHECK(lazyEnableVertexAttribArray(loc) );
|
|
|
+ lazyEnableVertexAttribArray(loc);
|
|
|
GL_CHECK(glVertexAttribPointer(loc, 4, GL_FLOAT, GL_FALSE, _stride, (void*)(uintptr_t)baseVertex) );
|
|
|
GL_CHECK(glVertexAttribDivisor(loc, 1) );
|
|
|
baseVertex += 16;
|
|
|
@@ -4958,7 +4959,7 @@ namespace bgfx { namespace gl
|
|
|
for(uint32_t ii = 0; 0xffff != m_instanceData[ii]; ++ii)
|
|
|
{
|
|
|
GLint loc = m_instanceData[ii];
|
|
|
- GL_CHECK(lazyDisableVertexAttribArray(loc));
|
|
|
+ lazyDisableVertexAttribArray(loc);
|
|
|
}
|
|
|
}
|
|
|
|