gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gfx/libpaper papermill.py texcomb_NV1X.py N...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz/gfx/libpaper papermill.py texcomb_NV1X.py N...
Date: Mon, 02 Sep 2002 12:14:33 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/09/02 12:14:33

Modified files:
        gfx/libpaper   : papermill.py texcomb_NV1X.py 
Removed files:
        gfx/libpaper   : NVcomb.py 

Log message:
        Show at least SOMETHING on NV10

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/papermill.py.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/texcomb_NV1X.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: gzz/gfx/libpaper/papermill.py
diff -c gzz/gfx/libpaper/papermill.py:1.18 gzz/gfx/libpaper/papermill.py:1.19
*** gzz/gfx/libpaper/papermill.py:1.18  Mon Sep  2 08:56:56 2002
--- gzz/gfx/libpaper/papermill.py       Mon Sep  2 12:14:33 2002
***************
*** 1,9 ****
  dbg = 0
  execfile("gfx/libcolor/spaces.py")
! execfile("gfx/libpaper/texcoords.py")
! execfile("gfx/libpaper/texops_NV2X.py")
! execfile("gfx/libpaper/textures.py")
! execfile("gfx/libpaper/texcomb_NV2X.py")
  
  def randvec(rnd): return [rnd.nextDouble() for i in range(0,3)]
  
--- 1,69 ----
  dbg = 0
+ initialized = 0
+ 
  execfile("gfx/libcolor/spaces.py")
! 
! def initialize():
!     global initialized
!     if initialized: return
!     initialized = 1
!     dbg=1
!     # Discriminate between different renderers.
!     # These are for debug output only.
!     if dbg:
!       vendor = GZZGL.getGLString("VENDOR")
!       renderer = GZZGL.getGLString("RENDERER")
!       version = GZZGL.getGLString("VERSION")
!       print "GL strings: '%s' '%s' '%s'"%(
!           vendor,renderer,version)
!     extensions = GZZGL.getGLString("EXTENSIONS").split()
!     # The backend files to load
!     files = [
!       "textures.py",
!       "texcoords.py",
!       ]
!     #
!     # Now, go through some questions.
!     #
! 
!     # Check which texture operations to use.
!     if "GL_NV_texture_shader" in extensions:
!       # We can use the general texture shaders.
!       # XXX Should check separately for texture_shader2,
!       # otherwise it'll be SLOW.
!       if dbg: print "Using NV20 texture shaders"
!       files.append("texops_NV2X.py")
!     else:
!       if dbg: print "Using unextended OpenGL texture accesses"
!       files.append("texops_STD.py")
! 
! 
!     # Check which combiners to use.
!     if "GL_NV_register_combiners" in extensions:
!       # We have at least a NV10, possibly better.
!       # Check the number of general combiners to be sure.
!       maxcomb = GZZGL.getGLFloat("MAX_GENERAL_COMBINERS_NV")[0]
!       if maxcomb < 2:
!           assert 0, "Sorry, not sufficient register combiners (%s)"%maxcomb
!       elif maxcomb < 4:
!           # use NV10 version
!           if dbg: print "Using NV10 combiners ",maxcomb
!           files.append("texcomb_NV1X.py")
!       else:
!           # use NV20 version
!           if dbg: print "Using NV20 combiners ",maxcomb
!           files.append("texcomb_NV2X.py")
!     else:
!       assert 0, "Sorry, can't do without NVIDIA register combiners yet."
! 
!     for f in files:
!       execfile("gfx/libpaper/"+f, globals())
! 
! #     "gfx/libpaper/texcoords.py",
! #     "gfx/libpaper/texops_NV2X.py",
! #     "gfx/libpaper/textures.py",
! #     "gfx/libpaper/texcomb_NV2X.py",
!     dbg=0
  
  def randvec(rnd): return [rnd.nextDouble() for i in range(0,3)]
  
***************
*** 30,35 ****
--- 90,96 ----
  
  class PaperMill:
      def makePaperPass(self, seed, ppass, trans = 0, type = None, emboss = 0):
+       initialize()
        rnd = java.util.Random(seed)
        #sh = ShaderPass(selectRandom(shaderTypes,rnd))
          if emboss:
Index: gzz/gfx/libpaper/texcomb_NV1X.py
diff -c gzz/gfx/libpaper/texcomb_NV1X.py:1.1 
gzz/gfx/libpaper/texcomb_NV1X.py:1.2
*** gzz/gfx/libpaper/texcomb_NV1X.py:1.1        Mon Sep  2 08:56:56 2002
--- gzz/gfx/libpaper/texcomb_NV1X.py    Mon Sep  2 12:14:33 2002
***************
*** 40,46 ****
        t0, t1, t2, t3 = texinputs[0:4]
        c = """
              Enable BLEND
!             BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA
              Disable ALPHA_TEST
  
            Enable REGISTER_COMBINERS_NV
--- 40,46 ----
        t0, t1, t2, t3 = texinputs[0:4]
        c = """
              Enable BLEND
!             BlendFunc ONE ZERO
              Disable ALPHA_TEST
  
            Enable REGISTER_COMBINERS_NV
***************
*** 50,65 ****
            CombinerParameterNV CONSTANT_COLOR1_NV %(r1)s
            Color %(r2)s
  
!           CombinerInputNV COMBINER0_NV RGB VARIABLE_A_NV CONSTANT_COLOR0_NV 
EXPAND_NORMAL_NV RGB
!           CombinerInputNV COMBINER0_NV RGB VARIABLE_B_NV TEXTURE%(t0)s 
EXPAND_NORMAL_NV RGB
!           CombinerInputNV COMBINER0_NV RGB VARIABLE_C_NV CONSTANT_COLOR1_NV 
EXPAND_NORMAL_NV RGB
!           CombinerInputNV COMBINER0_NV RGB VARIABLE_D_NV TEXTURE%(t1)s 
EXPAND_NORMAL_NV RGB
            CombinerOutputNV COMBINER0_NV RGB SPARE0_NV SPARE1_NV DISCARD_NV 
SCALE_BY_TWO_NV NONE TRUE TRUE FALSE
  
!           CombinerInputNV COMBINER1_NV RGB VARIABLE_A_NV CONSTANT_COLOR0_NV 
EXPAND_NORMAL_NV RGB
!           CombinerInputNV COMBINER1_NV RGB VARIABLE_B_NV TEXTURE%(t2)s 
EXPAND_NORMAL_NV RGB
!           CombinerInputNV COMBINER1_NV RGB VARIABLE_C_NV CONSTANT_COLOR1_NV 
EXPAND_NORMAL_NV RGB
!           CombinerInputNV COMBINER1_NV RGB VARIABLE_D_NV TEXTURE%(t3)s 
EXPAND_NORMAL_NV RGB
            CombinerOutputNV COMBINER1_NV RGB PRIMARY_COLOR_NV 
SECONDARY_COLOR_NV DISCARD_NV SCALE_BY_TWO_NV NONE TRUE TRUE FALSE
  
            FinalCombinerInputNV VARIABLE_A_NV PRIMARY_COLOR_NV 
UNSIGNED_IDENTITY_NV RGB
--- 50,65 ----
            CombinerParameterNV CONSTANT_COLOR1_NV %(r1)s
            Color %(r2)s
  
!           CombinerInputNV COMBINER0_NV RGB VARIABLE_A_NV TEXTURE%(t0)s 
EXPAND_NORMAL_NV RGB
!           CombinerInputNV COMBINER0_NV RGB VARIABLE_B_NV TEXTURE%(t1)s 
EXPAND_NORMAL_NV RGB
!           CombinerInputNV COMBINER0_NV RGB VARIABLE_C_NV CONSTANT_COLOR0_NV 
EXPAND_NORMAL_NV RGB
!           CombinerInputNV COMBINER0_NV RGB VARIABLE_D_NV TEXTURE%(t2)s 
EXPAND_NORMAL_NV RGB
            CombinerOutputNV COMBINER0_NV RGB SPARE0_NV SPARE1_NV DISCARD_NV 
SCALE_BY_TWO_NV NONE TRUE TRUE FALSE
  
!           CombinerInputNV COMBINER1_NV RGB VARIABLE_A_NV CONSTANT_COLOR1_NV 
UNSIGNED_IDENTITY_NV RGB
!           CombinerInputNV COMBINER1_NV RGB VARIABLE_B_NV SPARE0_NV 
UNSIGNED_IDENTITY_NV RGB
!           CombinerInputNV COMBINER1_NV RGB VARIABLE_C_NV CONSTANT_COLOR1_NV 
UNSIGNED_IDENTITY_NV RGB
!           CombinerInputNV COMBINER1_NV RGB VARIABLE_D_NV SPARE0_NV 
UNSIGNED_INVERT_NV RGB
            CombinerOutputNV COMBINER1_NV RGB PRIMARY_COLOR_NV 
SECONDARY_COLOR_NV DISCARD_NV SCALE_BY_TWO_NV NONE TRUE TRUE FALSE
  
            FinalCombinerInputNV VARIABLE_A_NV PRIMARY_COLOR_NV 
UNSIGNED_IDENTITY_NV RGB




reply via email to

[Prev in Thread] Current Thread [Next in Thread]