/[gzz]/gzz/gfx/libpaper/texops_NV2X.py
ViewVC logotype

Diff of /gzz/gfx/libpaper/texops_NV2X.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jvk, Fri Oct 11 11:08:42 2002 UTC revision 1.3 by jvk, Tue Oct 15 10:46:06 2002 UTC
# Line 87  class ShaderPass: Line 87  class ShaderPass:
87      def getTexgenTypes(self):      def getTexgenTypes(self):
88          "Get the texgen letter codes for the texture units."          "Get the texgen letter codes for the texture units."
89          return [shaderTexgenTypes[texunit[0]] for texunit in self.st]          return [shaderTexgenTypes[texunit[0]] for texunit in self.st]
90      def setTexture(self, ind, texid):      def setTexture(self, ind, tex):
91          self.tex[ind] = str(texid)          self.tex[ind] = tex
92      def setupCode(self):      def setupCode(self):
93          c = """          c = """
94              Enable TEXTURE_SHADER_NV              Enable TEXTURE_SHADER_NV
# Line 104  class ShaderPass: Line 104  class ShaderPass:
104    
105              """ % locals()              """ % locals()
106              if target != None:              if target != None:
107                  texid = self.tex[t]                  texid = self.tex[t].getTexId()
108                    minfilter = self.tex[t].minfilter
109                    magfilter = self.tex[t].magfilter
110                  if texid == None: raise NoTextureSetForStage()                  if texid == None: raise NoTextureSetForStage()
111                  c += """                  c += """
112                      Enable %(target)s                      Enable %(target)s
# Line 112  class ShaderPass: Line 114  class ShaderPass:
114    
115                      TexParameter %(target)s TEXTURE_WRAP_S REPEAT                      TexParameter %(target)s TEXTURE_WRAP_S REPEAT
116                      TexParameter %(target)s TEXTURE_WRAP_T REPEAT                      TexParameter %(target)s TEXTURE_WRAP_T REPEAT
117                      TexParameter %(target)s TEXTURE_MIN_FILTER LINEAR_MIPMAP_LINEAR                      TexParameter %(target)s TEXTURE_MIN_FILTER %(minfilter)s
118                      TexParameter %(target)s TEXTURE_MAG_FILTER LINEAR                      TexParameter %(target)s TEXTURE_MAG_FILTER %(magfilter)s
119                  """ % locals()                  """ % locals()
120              if len(self.st[t]) > 2: # Previous texture input              if len(self.st[t]) > 2: # Previous texture input
121                  c += """                  c += """
# Line 127  class ShaderPass: Line 129  class ShaderPass:
129          return [i for i in range(0,len(self.st))          return [i for i in range(0,len(self.st))
130                  if self.st[i][1] in ("RGB2", "RGB3")]                  if self.st[i][1] in ("RGB2", "RGB3")]
131    
132        def getRGBoutputscales(self):
133            return [self.tex[i].scale for i in self.getRGBoutputs()]
134    
135  def makeNormalShaderPass(maxaniso = None):  def makeNormalShaderPass(maxaniso = None):
136      # XXX: TODO: implement maxaniso as in texops_STD      # XXX: TODO: implement maxaniso as in texops_STD
137      return ShaderPass(shaderTypes[3])      return ShaderPass(shaderTypes[3])

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26