diff options
Diffstat (limited to 'vbo.c')
-rw-r--r-- | vbo.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -90,7 +90,7 @@ static int gltGenVBOInterleaved(GLuint *bufferobjects, float *vert_arr, return -1; } - /* build interleaved data structure, may not be cache friendly */ + /* build interleaved data structure, seems cache friendly */ int i; for (i = 0; i < slices_n; i++) { @@ -125,6 +125,9 @@ static int gltGenVBOInterleaved(GLuint *bufferobjects, float *vert_arr, static int gltDrawVBOInterleaved(GLuint *bufferobjects, size_t indices_n, GLenum mode) { + if (!bufferobjects || !indices_n) + return -1; + glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); |