Mercurial > touhou
comparison pytouhou/ui/gamerenderer.pyx @ 427:0604f4fbbe3c
Move the depth buffer clear outside of scissor, as per apitrace’s advice.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 03 Aug 2013 15:48:51 +0200 |
parents | f4d76d3d6f2a |
children | 878273a984c4 |
comparison
equal
deleted
inserted
replaced
426:5d7bb2fd74f7 | 427:0604f4fbbe3c |
---|---|
15 from libc.stdlib cimport malloc, free | 15 from libc.stdlib cimport malloc, free |
16 from itertools import chain | 16 from itertools import chain |
17 | 17 |
18 from pytouhou.lib.opengl cimport \ | 18 from pytouhou.lib.opengl cimport \ |
19 (glClear, glMatrixMode, glLoadIdentity, glLoadMatrixf, glDisable, | 19 (glClear, glMatrixMode, glLoadIdentity, glLoadMatrixf, glDisable, |
20 glEnable, glFogi, glFogf, glFogfv, GL_DEPTH_BUFFER_BIT, | 20 glEnable, glFogi, glFogf, glFogfv, |
21 GL_PROJECTION, GL_MODELVIEW, GL_FOG, GL_FOG_MODE, GL_LINEAR, | 21 GL_PROJECTION, GL_MODELVIEW, GL_FOG, GL_FOG_MODE, GL_LINEAR, |
22 GL_FOG_START, GL_FOG_END, GL_FOG_COLOR, GL_COLOR_BUFFER_BIT, GLfloat) | 22 GL_FOG_START, GL_FOG_END, GL_FOG_COLOR, GL_COLOR_BUFFER_BIT, GLfloat) |
23 | 23 |
24 from pytouhou.utils.matrix cimport Matrix, matrix_to_floats | 24 from pytouhou.utils.matrix cimport Matrix, matrix_to_floats |
25 from pytouhou.utils.maths cimport setup_camera | 25 from pytouhou.utils.maths cimport setup_camera |
33 Renderer.__init__(self, resource_loader) | 33 Renderer.__init__(self, resource_loader) |
34 | 34 |
35 | 35 |
36 def render(self): | 36 def render(self): |
37 cdef float* fog_data | 37 cdef float* fog_data |
38 | |
39 glClear(GL_DEPTH_BUFFER_BIT) | |
40 | 38 |
41 back = self.background | 39 back = self.background |
42 game = self.game | 40 game = self.game |
43 | 41 |
44 if self.use_fixed_pipeline: | 42 if self.use_fixed_pipeline: |