Mercurial > touhou
diff pytouhou/ui/renderer.pyx @ 410:9d790ca73c13
Don’t render null-sized arrays of elements.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 12 Jun 2013 16:03:30 +0200 |
parents | 1c773544eaeb |
children | 2428296cccab |
line wrap: on
line diff
--- a/pytouhou/ui/renderer.pyx +++ b/pytouhou/ui/renderer.pyx @@ -86,6 +86,9 @@ cdef class Renderer: nb_vertices += 4 + if nb_vertices == 0: + return + if self.use_fixed_pipeline: glVertexPointer(3, GL_INT, sizeof(Vertex), <long> &self.vertex_buffer[0].x) glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), <long> &self.vertex_buffer[0].u)