Ejemplo n.º 1
0
    def MakeStickShaders(self):
        if (self.idfStick == 666): self.idfStick = glew.glGenProgramsARB(1)
        glew.glBindProgramARB(glew.GL_FRAGMENT_PROGRAM_ARB, self.idfStick)
        self.setStickFragmentProgram()

        if (self.idvStick==666): self.idvStick = glew.glGenProgramsARB(1)
        glew.glBindProgramARB(glew.GL_VERTEX_PROGRAM_ARB, self.idvStick)
        self.setStickVertexProgram()

        self.loadedStick=True
Ejemplo n.º 2
0
 def MakeShaders(self):    # activates parameters
     if (self.shadersMade): return
     self.shadersMade = True
     if (self.idf == 666): self.idf = glew.glGenProgramsARB(1)
     glew.glBindProgramARB(glew.GL_FRAGMENT_PROGRAM_ARB, self.idf)
     self.setBallFragmentProgram()
     if (self.idv == 666): self.idv = glew.glGenProgramsARB(1)
     glew.glBindProgramARB(glew.GL_VERTEX_PROGRAM_ARB, self.idv)
     self.setBallVertexProgram()
     self.loaded = True
Ejemplo n.º 3
0
    def BindHaloShader(self, powres): # 1^powres = size of halo texture
        if (self.idfHalo[powres]==666):
            self.idfHalo[powres] = glew.glGenProgramsARB(1)
        glew.glBindProgramARB(glew.GL_FRAGMENT_PROGRAM_ARB, self.idfHalo[powres])

        if not self.loadedHalo[powres]: self.MakeHaloShader(powres)

        if (self.idvHalo==666): self.idvHalo = glew.glGenProgramsARB(1)
        glew.glBindProgramARB(glew.GL_VERTEX_PROGRAM_ARB, self.idvHalo)
        if not self.loadedVertexHalo: self.LoadVertexHaloShader()

        self.loadedHalo[powres] = True
        self.loadedVertexHalo = True
        return True
Ejemplo n.º 4
0
 def BindDrawAOShaderSticks(self):
     if (self.idf==666): self.idf = glew.glGenProgramsARB(1)
     glew.glBindProgramARB(glew.GL_FRAGMENT_PROGRAM_ARB, self.idf)
     if not self.loaded: self.MakeDrawAOShaderSticks()
     self.loaded = True
     return True
Ejemplo n.º 5
0
 def BindStickShaders(self):
     if not self.loadedStick:  self.MakeStickShaders()
     glew.glBindProgramARB(glew.GL_FRAGMENT_PROGRAM_ARB, self.idfStick)
     glew.glBindProgramARB(glew.GL_VERTEX_PROGRAM_ARB, self.idvStick)
Ejemplo n.º 6
0
 def BindShaders(self):    # binds, loads if necessary
     if not self.loaded: self.MakeShaders()
     glew.glBindProgramARB(glew.GL_FRAGMENT_PROGRAM_ARB, self.idf)
     glew.glBindProgramARB(glew.GL_VERTEX_PROGRAM_ARB, self.idv)