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

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

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

revision 1.70 by tjl, Mon Jan 27 17:26:04 2003 UTC revision 1.71 by jvk, Fri Jan 31 12:09:49 2003 UTC
# Line 49  else: Line 49  else:
49    
50  # Check whether anisotropic filtering is supported  # Check whether anisotropic filtering is supported
51  if GL.hasExtension("GL_EXT_texture_filter_anisotropic"):  if GL.hasExtension("GL_EXT_texture_filter_anisotropic"):
52      maxaniso = 2.0      if dbg: print "Anisotropic filtering available"
     if dbg: print "Using anisotropic filtering with maximum degree", maxaniso  
53  else:  else:
     maxaniso = None  
54      if dbg: print "Anisotropic filtering not available"      if dbg: print "Anisotropic filtering not available"
55    
56            
# Line 224  class ThePaperMill(PaperMill): Line 222  class ThePaperMill(PaperMill):
222    
223      def selectCombiner(self):      def selectCombiner(self):
224          # Check which combiners to use.          # Check which combiners to use.
225          if not self.paperopts.use_opengl_1_1 and GL.hasExtension("GL_NV_register_combiners"):          if not self.paperopts.use_opengl_1_1 and (
226                GL.hasExtension("GL_NV_register_combiners") or
227                GL.hasExtension("GL_ARB_fragment_program")):
228                
229              # We have at least a NV10, possibly better.              # We have at least a NV10, possibly better.
230              # Check the number of general combiners to be sure.              # Check the number of general combiners to be sure.
231              maxcomb = GL.getGLFloat("MAX_GENERAL_COMBINERS_NV")[0]              #maxcomb = GL.getGLFloat("MAX_GENERAL_COMBINERS_NV")[0]
232              #if maxcomb < 4:              #if maxcomb < 4:
233              if 1: #XXX NV20 version is broken              if 1: #XXX NV20 version is broken
234                  # use NV10 version                  # use NV10 version
# Line 256  class ThePaperMill(PaperMill): Line 257  class ThePaperMill(PaperMill):
257          seed = reg.get(regseed, "seed")          seed = reg.get(regseed, "seed")
258          rnd = java.util.Random(seed)          rnd = java.util.Random(seed)
259          if emboss:          if emboss:
260              sh = makeEmbossShaderPass(maxaniso)              sh = makeEmbossShaderPass()
261          else:          else:
262              sh = makeNormalShaderPass(maxaniso)              sh = makeNormalShaderPass()
263    
264          types = sh.getTextureTypes()          types = sh.getTextureTypes()
265          for i in range(0, len(types)):          for i in range(0, len(types)):
# Line 351  class ThePaperMill(PaperMill): Line 352  class ThePaperMill(PaperMill):
352                      ppass.putNormalTexGen(i, data)                      ppass.putNormalTexGen(i, data)
353    
354    
355  # not fully used currently  
356  class OpenGL11_PaperOptions:  class OpenGL11_PaperOptions:
357      def __init__(self):      def __init__(self):
358          self.useOpengL11 = None          self.useOpengL11 = None
# Line 360  class OpenGL11_PaperOptions: Line 361  class OpenGL11_PaperOptions:
361          self.lastState = None          self.lastState = None
362    
363          # Check which combiners to use.          # Check which combiners to use.
364          if GL.hasExtension("GL_NV_register_combiners"):          if (GL.hasExtension("GL_NV_register_combiners") or
365                GL.hasExtension("GL_ARB_fragment_program")):
366              self.trueOpenGL11 = 0              self.trueOpenGL11 = 0
367              self.useOpenGL11 = 0              self.useOpenGL11 = 0
368          else:          else:

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71

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