示例#1
0
 def __init__(self):
     GLProgram.__init__(self)
     shader_path = os.path.join(os.path.dirname(__file__), "shaders")
     _shader_program = ShaderProgram(shader_path)
     _shader_program.add_shader("image_vs.glsl", GL_VERTEX_SHADER)
     _shader_program.add_shader("image_fs.glsl", GL_FRAGMENT_SHADER)
     _shader_program.link()
     self.set_shader_program(_shader_program)
示例#2
0
 def __init__(self):
     GLProgram.__init__(self)
     shader_path = os.path.join(os.path.dirname(__file__), "shaders")
     shader_program = ShaderProgram(shader_path)
     shader_program.add_shader("pointsprites_vs.glsl", GL_VERTEX_SHADER)
     shader_program.add_shader("spheres_fs.glsl", GL_FRAGMENT_SHADER)
     shader_program.link()
     self.set_shader_program(shader_program)
     self._shininess = 8
    def __init__(self, clipping={'x':[-1e6, 1e6], 'y' : [-1e6, 1e6], 'z': [-1e6, 1e6], 'v' : [-1e6, 1e6]}):
        GLProgram.__init__(self)
        shader_path = os.path.join(os.path.dirname(__file__), "shaders")
        shader_program = ShaderProgram(shader_path)
        #shader_program.add_shader("pointsprites_vs.glsl", GL_VERTEX_SHADER)
        shader_program.add_shader("default_vs.glsl", GL_VERTEX_SHADER)
        shader_program.add_shader("pointsprites_fs.glsl", GL_FRAGMENT_SHADER)
        shader_program.link()
        self._texture = GaussTexture()
        self.size_factor = self._texture.load_texture()
        self.set_shader_program(shader_program)
        self._uniform_tex_2d_id = self.get_shader_program().get_uniform_location(b'tex2D')

        self.xmin, self.xmax = clipping['x']
        self.ymin, self.ymax = clipping['y']
        self.zmin, self.zmax = clipping['z']
        self.vmin, self.vmax = clipping['v']
示例#4
0
    def __init__(self,
                 clipping={
                     'x': [-1e6, 1e6],
                     'y': [-1e6, 1e6],
                     'z': [-1e6, 1e6],
                     'v': [-1e6, 1e6]
                 }):
        GLProgram.__init__(self)
        shader_path = os.path.join(os.path.dirname(__file__), "shaders")
        _shader_program = ShaderProgram(shader_path)
        _shader_program.add_shader("default_vs.glsl", GL_VERTEX_SHADER)
        _shader_program.add_shader("default_fs.glsl", GL_FRAGMENT_SHADER)
        _shader_program.link()
        self.set_shader_program(_shader_program)

        self.xmin, self.xmax = clipping['x']
        self.ymin, self.ymax = clipping['y']
        self.zmin, self.zmax = clipping['z']
        self.vmin, self.vmax = clipping['v']
示例#5
0
 def __init__(self):
     GLProgram.__init__(self, "pointsprites_vs.glsl", "spheres_fs.glsl")
示例#6
0
 def __init__(self):
     GLProgram.__init__(self, "gouraud_vs.glsl", "gouraud_fs.glsl")