comparison pytouhou/ui/opengl/renderer.pxd @ 558:94725968dabb

Use vertex array objects, to be compatible with OpenGL 3.1+ core profile.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 12 Dec 2013 13:47:17 +0100
parents 53fa73932e9a
children c759b97f4f81
comparison
equal deleted inserted replaced
557:0f2af7552462 558:94725968dabb
29 cdef Vertex vertex_buffer[MAX_ELEMENTS] 29 cdef Vertex vertex_buffer[MAX_ELEMENTS]
30 cdef long x, y, width, height 30 cdef long x, y, width, height
31 31
32 # For modern GL. 32 # For modern GL.
33 cdef GLuint vbo, framebuffer_vbo, framebuffer_ibo 33 cdef GLuint vbo, framebuffer_vbo, framebuffer_ibo
34 cdef GLuint vao, framebuffer_vao
34 35
35 cdef bint use_fixed_pipeline #XXX 36 cdef bint use_fixed_pipeline #XXX
36 37
37 cdef GLuint textures[MAX_TEXTURES] 38 cdef GLuint textures[MAX_TEXTURES]
38 cdef unsigned short *indices[MAX_TEXTURES][2] 39 cdef unsigned short *indices[MAX_TEXTURES][2]
39 cdef unsigned short last_indices[2 * MAX_TEXTURES] 40 cdef unsigned short last_indices[2 * MAX_TEXTURES]
40 cdef PyObject *elements[640*3] 41 cdef PyObject *elements[640*3]
41 42
43 cdef void set_state(self) nogil
42 cdef void render_elements(self, elements) except * 44 cdef void render_elements(self, elements) except *
43 cdef void render_quads(self, rects, colors, GLuint texture) except * 45 cdef void render_quads(self, rects, colors, GLuint texture) except *
46
47 cdef void set_framebuffer_state(self) nogil
44 cdef void render_framebuffer(self, Framebuffer fb) except * 48 cdef void render_framebuffer(self, Framebuffer fb) except *
45 49
46 50
47 cdef class Framebuffer: 51 cdef class Framebuffer:
48 cdef GLuint fbo, texture, rbo 52 cdef GLuint fbo, texture, rbo