예제 #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
예제 #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
예제 #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
예제 #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