コード例 #1
0
 def draw_shadow_lem(self):
     with push_attrib(gl.GL_STENCIL_BUFFER_BIT | gl.GL_COLOR_BUFFER_BIT):
         gl.glStencilFunc(gl.GL_NOTEQUAL, 1, 1)
         gl.glStencilOp(gl.GL_KEEP, gl.GL_KEEP, gl.GL_REPLACE)
         gl.glEnable(gl.GL_STENCIL_TEST)
         gl.glEnable(gl.GL_BLEND)
         gl.glBlendFunc(gl.GL_ZERO, gl.GL_CONSTANT_ALPHA)
         gl.glBlendColor(1.0, 1.0, 1.0, 0.3)
         with push_matrix(gl.GL_MODELVIEW):
             gl.glMultTransposeMatrixf(
                 float_ctype_array(1.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
                                   0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0))
             self.draw_lem_model()
コード例 #2
0
 def draw_shadow_lem (self):
     with push_attrib(gl.GL_STENCIL_BUFFER_BIT | gl.GL_COLOR_BUFFER_BIT):
         gl.glStencilFunc(gl.GL_NOTEQUAL, 1, 1)
         gl.glStencilOp(gl.GL_KEEP, gl.GL_KEEP, gl.GL_REPLACE)
         gl.glEnable(gl.GL_STENCIL_TEST)
         gl.glEnable(gl.GL_BLEND)
         gl.glBlendFunc(gl.GL_ZERO, gl.GL_CONSTANT_ALPHA)
         gl.glBlendColor(1.0, 1.0, 1.0, 0.3)
         with push_matrix(gl.GL_MODELVIEW):
             gl.glMultTransposeMatrixf(float_ctype_array(1.0, -1.0, 0.0, 0.0,
                                                         0.0, 0.0, 0.0, 0.0,
                                                         0.0, 0.0, 1.0, 0.0,
                                                         0.0, 0.0, 0.0, 1.0))
             self.draw_lem_model()
コード例 #3
0
ファイル: transition.py プロジェクト: Bogdanp/ymage
 def draw(self, width, height):
     transition = self.queue[0]
     gl.glBlendColor(0.0, 0.0, 0.0, transition["phase"])
     self.slideshow.draw_slide(width, height, transition["previous"])
     gl.glBlendColor(0.0, 0.0, 0.0, 1.0 - transition["phase"])
     self.slideshow.draw_slide(width, height, transition["next"])
コード例 #4
0
ファイル: transition.py プロジェクト: Bogdanp/ymage
 def setup(self):
     gl.glEnable(gl.GL_BLEND)
     gl.glBlendFunc(gl.GL_CONSTANT_ALPHA, gl.GL_ONE)
     gl.glBlendColor(0.0, 0.0, 0.0, 1.0)
コード例 #5
0
ファイル: transition.py プロジェクト: alexliberzonlab/ymage
 def draw(self, width, height):
     transition = self.queue[0]
     gl.glBlendColor(0.0, 0.0, 0.0, transition["phase"])
     self.slideshow.draw_slide(width, height, transition["previous"])
     gl.glBlendColor(0.0, 0.0, 0.0, 1.0 - transition["phase"])
     self.slideshow.draw_slide(width, height, transition["next"])
コード例 #6
0
ファイル: transition.py プロジェクト: alexliberzonlab/ymage
 def setup(self):
     gl.glEnable(gl.GL_BLEND)
     gl.glBlendFunc(gl.GL_CONSTANT_ALPHA, gl.GL_ONE)
     gl.glBlendColor(0.0, 0.0, 0.0, 1.0)