Don't enable texture matrix if no vbo or ibo

This commit is contained in:
Benau 2018-05-11 19:27:41 +08:00
parent 34f416506e
commit 5fb0113362

View File

@ -421,6 +421,8 @@ void SPMeshBuffer::enableTextureMatrix(unsigned mat_id)
assert(mat_id < m_stk_material.size());
// Make the 31 bit in normal to be 1
uploadGLMesh();
if (m_vbo == 0 || m_ibo == 0)
return;
auto& ret = m_stk_material[mat_id];
glBindBuffer(GL_ARRAY_BUFFER, m_vbo);
std::set<uint16_t> used_vertices;