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
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
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
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
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)
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)