This respects the OpenGL convension of lower left corners
(self, x: int = 0, y: int = 0, w: int = 0, h: int = 0)
| 686 | gl.glScissor(0, 0, W, H) |
| 687 | |
| 688 | def blit(self, x: int = 0, y: int = 0, w: int = 0, h: int = 0): |
| 689 | """ |
| 690 | This respects the OpenGL convension of lower left corners |
| 691 | """ |
| 692 | w = w or self.W |
| 693 | h = h or self.H |
| 694 | old = gl.glGetInteger(gl.GL_READ_FRAMEBUFFER_BINDING) |
| 695 | gl.glBindFramebuffer(gl.GL_READ_FRAMEBUFFER, self.fbo) # write buffer defaults to 0 |
| 696 | gl.glBlitFramebuffer(x, y, x + w, y + h, # the height is flipped |
| 697 | x, y, x + w, y + h, # the height is flipped |
| 698 | gl.GL_COLOR_BUFFER_BIT, gl.GL_NEAREST) |
| 699 | gl.glBindFramebuffer(gl.GL_READ_FRAMEBUFFER, old) |
| 700 | |
| 701 | |
| 702 | class UQuad(Mesh): |
no outgoing calls