def __enter__(self):
     self._old_prog = glGetInteger(GL_CURRENT_PROGRAM)
     glBlendFunc(GL_SRC_ALPHA, GL_ONE)
     glEnable(GL_BLEND)
     glDepthMask(GL_TRUE)
     glDisable(GL_DEPTH_TEST)
     self.get_shader_program().use()
     self.set_clipping_uniforms()
     glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)
Esempio n. 2
0
 def __enter__(self):
     glBlendFunc(GL_SRC_ALPHA, GL_ONE)
     glDisable(GL_BLEND)
     glDepthMask(GL_TRUE)
     glEnable(GL_DEPTH_TEST)
     #glDepthFunc(GL_LEQUAL)
     glEnable(GL_POINT_SMOOTH)
     self.get_shader_program().use()
     self.set_clipping_uniforms()
     glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)
    def __enter__(self):
        #glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
        #glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA)
        glBlendFunc(GL_SRC_ALPHA, GL_ONE)
        glEnable(GL_BLEND)
        glDepthMask(GL_TRUE)
        glDisable(GL_DEPTH_TEST)
        #glDepthFunc(GL_LEQUAL)
        glEnable(GL_POINT_SMOOTH)

        self._old_prog = glGetInteger(GL_CURRENT_PROGRAM)

        self.get_shader_program().use()
        self.set_clipping_uniforms()
        glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)