(self, seconds, camera)
| 150 | |
| 151 | |
| 152 | def renderQuad(self, seconds, camera): |
| 153 | shader_type = PPostTypes.getCurrentShaderID() |
| 154 | |
| 155 | shader = PWShaders.getShader(shader_type) |
| 156 | glUseProgram(shader.shader) |
| 157 | |
| 158 | self.setExtraUniforms(shader, shader_type, seconds) |
| 159 | |
| 160 | # Feed some funky stuff for the shaders |
| 161 | glUniform1f(shader.seconds, seconds) |
| 162 | glUniform2f(shader.resolution, self.d_resolution.x, self.d_resolution.y) |
| 163 | |
| 164 | # -------- |
| 165 | |
| 166 | glDisable(GL_DEPTH_TEST) |
| 167 | |
| 168 | glActiveTexture(GL_TEXTURE0) |
| 169 | glBindTexture(GL_TEXTURE_2D, self.color_texture) |
| 170 | |
| 171 | glActiveTexture(GL_TEXTURE1) |
| 172 | glBindTexture(GL_TEXTURE_2D, self.depth_texture) |
| 173 | |
| 174 | glBindVertexArray(self.quad.vao) |
| 175 | glDrawArrays(GL_TRIANGLES, 0, 6) |
| 176 | |
| 177 | glEnable(GL_DEPTH_TEST) |
| 178 | |
| 179 | |
| 180 | # All post processing shaders share the same common uniforms |
no test coverage detected