MCPcopy
hub / github.com/zju3dv/4K4D / blit

Method blit

easyvolcap/utils/gl_utils.py:688–699  ·  view source on GitHub ↗

This respects the OpenGL convension of lower left corners

(self, x: int = 0, y: int = 0, w: int = 0, h: int = 0)

Source from the content-addressed store, hash-verified

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
702class UQuad(Mesh):

Callers 2

drawMethod · 0.95
test_gl_quad_blitFunction · 0.95

Calls

no outgoing calls

Tested by 1

test_gl_quad_blitFunction · 0.76