comparison pytouhou/ui/renderer.pyx @ 503:c622eaf64428

Optimize GameRunner some more, fix replay, and remove Window dependency in Renderer.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 04 Oct 2013 14:27:11 +0200
parents feecdb4a8928
children bfea9e9a6845
comparison
equal deleted inserted replaced
502:3d3285918ba1 503:c622eaf64428
215 215
216 if not self.use_fixed_pipeline: 216 if not self.use_fixed_pipeline:
217 glBindBuffer(GL_ARRAY_BUFFER, 0) 217 glBindBuffer(GL_ARRAY_BUFFER, 0)
218 218
219 219
220 cdef void render_framebuffer(self, Framebuffer fb, Window window): 220 cdef void render_framebuffer(self, Framebuffer fb):
221 cdef PassthroughVertex[4] buf 221 cdef PassthroughVertex[4] buf
222 cdef unsigned short indices[6] 222 cdef unsigned short indices[6]
223 indices[:] = [0, 1, 2, 2, 3, 0] 223 indices[:] = [0, 1, 2, 2, 3, 0]
224 224
225 assert not self.use_fixed_pipeline 225 assert not self.use_fixed_pipeline
226 226
227 glBindFramebuffer(GL_FRAMEBUFFER, 0) 227 glBindFramebuffer(GL_FRAMEBUFFER, 0)
228 glViewport(window.x, window.y, window.width, window.height) 228 glViewport(self.x, self.y, self.width, self.height)
229 glBlendFunc(GL_ONE, GL_ZERO) 229 glBlendFunc(GL_ONE, GL_ZERO)
230 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) 230 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
231 231
232 glBindBuffer(GL_ARRAY_BUFFER, self.framebuffer_vbo) 232 glBindBuffer(GL_ARRAY_BUFFER, self.framebuffer_vbo)
233 233