comparison pytouhou/ui/opengl/background.pyx @ 606:3c2f96f1d715

Fix compilation under Cython 0.22, by making the pyx and the pxd declarations’ except clause similar.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 26 Nov 2014 13:36:38 +0100
parents 974decb8df4f
children a6a191e371c7
comparison
equal deleted inserted replaced
605:d6ead6f0ba80 606:3c2f96f1d715
73 glEnableVertexAttribArray(1) 73 glEnableVertexAttribArray(1)
74 glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, True, sizeof(Vertex), <void*>20) 74 glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, True, sizeof(Vertex), <void*>20)
75 glEnableVertexAttribArray(2) 75 glEnableVertexAttribArray(2)
76 76
77 77
78 cdef void render_background(self): 78 cdef void render_background(self) nogil:
79 if use_debug_group: 79 if use_debug_group:
80 glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, "Background drawing") 80 glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, "Background drawing")
81 81
82 if is_legacy: 82 if is_legacy:
83 indices = self.indices 83 indices = self.indices
106 106
107 if use_debug_group: 107 if use_debug_group:
108 glPopDebugGroup() 108 glPopDebugGroup()
109 109
110 110
111 cdef void load(self, background, GLuint[MAX_TEXTURES] textures): 111 cdef void load(self, background, GLuint[MAX_TEXTURES] textures) except *:
112 cdef float ox, oy, oz, ox2, oy2, oz2 112 cdef float ox, oy, oz, ox2, oy2, oz2
113 cdef GLsizei nb_vertices = 0, nb_indices = 0 113 cdef GLsizei nb_vertices = 0, nb_indices = 0
114 114
115 vertex_buffer = <Vertex*> malloc(65536 * sizeof(Vertex)) 115 vertex_buffer = <Vertex*> malloc(65536 * sizeof(Vertex))
116 indices = <GLushort*> malloc(65536 * sizeof(GLushort)) 116 indices = <GLushort*> malloc(65536 * sizeof(GLushort))