# HG changeset patch # User Thibaut Girka # Date 1319217603 -7200 # Node ID c0183515a0a375e8a1fb88c1e51efad6059e6e26 # Parent 35d850502d1ff56835ba91e4124581448151426e Use integers instead of floats to avoid filtering and ugly approximations (like the official game) diff --git a/pytouhou/opengl/gamerenderer.pyx b/pytouhou/opengl/gamerenderer.pyx --- a/pytouhou/opengl/gamerenderer.pyx +++ b/pytouhou/opengl/gamerenderer.pyx @@ -29,7 +29,7 @@ MAX_ELEMENTS = 10000 cdef struct Vertex: - float x, y, z + int x, y, z float u, v unsigned char r, g, b, a @@ -86,7 +86,7 @@ cdef class GameRenderer: nb_vertices += 4 for (texture_key, blendfunc), indices in indices_by_texture.items(): - glVertexPointer(3, GL_FLOAT, 24, &self.vertex_buffer[0].x) + glVertexPointer(3, GL_INT, 24, &self.vertex_buffer[0].x) glTexCoordPointer(2, GL_FLOAT, 24, &self.vertex_buffer[0].u) glColorPointer(4, GL_UNSIGNED_BYTE, 24, &self.vertex_buffer[0].r)