Exemplo n.º 1
0
    def __del__(self):
        if not self.freed:
            bgl.glDeleteFramebuffers(1, self.fbo)
            bgl.glDeleteRenderbuffers(1, self.buf_depth)
            bgl.glDeleteTextures(1, self.buf_color)
            del self.fbo
            del self.buf_color
            del self.buf_depth

            del self.cur_fbo
            del self.cur_viewport
Exemplo n.º 2
0
    def __del__(self):
        if not self.freed:
            bgl.glDeleteFramebuffers(1, self.fbo)
            bgl.glDeleteRenderbuffers(1, self.buf_depth)
            bgl.glDeleteTextures(1, self.buf_color)
            del self.fbo
            del self.buf_color
            del self.buf_depth

            del self.cur_fbo
            del self.cur_viewport
Exemplo n.º 3
0
Arquivo: zu.py Projeto: vktec/zu
    def delfb(self):
        buf = bgl.Buffer(bgl.GL_INT, 1)

        if self.vtx_buf is not None:
            bgl.glDeleteBuffers(2, self.vtx_buf)
            self.vtx_buf = None
        if self.vao is not None:
            buf[0] = self.vao
            bgl.glDeleteVertexArrays(1, buf)
            self.vao = None

        if self.tex is not None:
            buf[0] = self.tex
            bgl.glDeleteTextures(1, buf)
            self.tex = None
        if self.depth is not None:
            buf[0] = self.depth
            bgl.glDeleteRenderbuffers(1, buf)
            self.depth = None
        if self.fb is not None:
            buf[0] = self.fb
            bgl.glDeleteFramebuffers(1, buf)
            self.fb = None