Allow texture to be NULL.
This commit is contained in:
@@ -141,13 +141,13 @@ errorret_t meshDrawGL(
|
||||
MESH_VERTEX_UV_SIZE,
|
||||
GL_FLOAT,
|
||||
stride,
|
||||
(const GLvoid*)&mesh->vertices[offset].uv
|
||||
(const GLvoid*)&mesh->vertices[offset].uv[0]
|
||||
);
|
||||
glVertexPointer(
|
||||
MESH_VERTEX_POS_SIZE,
|
||||
GL_FLOAT,
|
||||
stride,
|
||||
(const GLvoid*)&mesh->vertices[offset].pos
|
||||
(const GLvoid*)&mesh->vertices[offset].pos[0]
|
||||
);
|
||||
|
||||
// Shader may have model matrix here
|
||||
@@ -155,7 +155,8 @@ errorret_t meshDrawGL(
|
||||
errorChain(shaderLegacyMatrixUpdate());
|
||||
#endif
|
||||
|
||||
glDrawArrays(mesh->primitiveType, offset, count);
|
||||
// glDrawArrays(mesh->primitiveType, offset, count);
|
||||
glDrawArrays(mesh->primitiveType, 0, count);
|
||||
errorChain(errorGLCheck());
|
||||
#else
|
||||
// Modern VAO/VBO rendering
|
||||
@@ -183,5 +184,6 @@ errorret_t meshDisposeGL(meshgl_t *mesh) {
|
||||
glDeleteVertexArrays(1, &mesh->vaoId);
|
||||
errorChain(errorGLCheck());
|
||||
#endif
|
||||
|
||||
errorOk();
|
||||
}
|
||||
Reference in New Issue
Block a user