comparison pytouhou/ui/opengl/renderer.pyx @ 539:d6d9a711253d

Fix text sometimes being drawn with a wrong blend func.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 06 May 2014 20:12:08 +0200
parents 63440d1e0717
children 94725968dabb
comparison
equal deleted inserted replaced
538:1abb6f7db8cc 539:d6d9a711253d
235 glVertexAttribPointer(1, 2, GL_FLOAT, False, sizeof(Vertex), <void*>8) 235 glVertexAttribPointer(1, 2, GL_FLOAT, False, sizeof(Vertex), <void*>8)
236 glEnableVertexAttribArray(1) 236 glEnableVertexAttribArray(1)
237 glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, True, sizeof(Vertex), <void*>16) 237 glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, True, sizeof(Vertex), <void*>16)
238 glEnableVertexAttribArray(2) 238 glEnableVertexAttribArray(2)
239 239
240 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
240 glBindTexture(GL_TEXTURE_2D, texture) 241 glBindTexture(GL_TEXTURE_2D, texture)
241 glDrawElements(GL_TRIANGLES, 6 * length, GL_UNSIGNED_SHORT, indices) 242 glDrawElements(GL_TRIANGLES, 6 * length, GL_UNSIGNED_SHORT, indices)
242 243
243 if not self.use_fixed_pipeline: 244 if not self.use_fixed_pipeline:
244 glBindBuffer(GL_ARRAY_BUFFER, 0) 245 glBindBuffer(GL_ARRAY_BUFFER, 0)