/[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.41 by jvk, Thu Oct 10 13:36:45 2002 UTC revision 1.42 by jvk, Fri Oct 11 10:37:58 2002 UTC
# Line 1  Line 1 
1  #initialized = 0  #import gfx.libutil.myimport
2    #reload(gfx.libutil.myimport)
3    #from gfx.libutil.myimport import my_import
4    
5  import gfx.libutil.myimport  #my_import("gfx.libpaper.textures")
 reload(gfx.libutil.myimport)  
 from gfx.libutil.myimport import my_import  
   
 my_import("gfx.libpaper.textures")  
6  from gfx.libpaper.textures import Textures  from gfx.libpaper.textures import Textures
7    
8  my_import("gfx.libpaper.colors")  #my_import("gfx.libpaper.colors")
9  from gfx.libpaper.colors import Colors  from gfx.libpaper.colors import Colors
10    
11  my_import("gfx.libpaper.texcoords")  #my_import("gfx.libpaper.texcoords")
12  from gfx.libpaper.texcoords import TexGenXYRepeatUnit  from gfx.libpaper.texcoords import TexGenXYRepeatUnit
13    
14  my_import("gfx.libpaper.params")  #my_import("gfx.libpaper.params")
15  from gfx.libpaper.params import *  from gfx.libpaper.params import *
16    
17  from gzz.gfx.gl import GL,GLRen,Paper,PaperMill  from gzz.gfx.gl import GL,GLRen,Paper,PaperMill
# Line 40  if GL.hasExtension("GL_NV_texture_shader Line 38  if GL.hasExtension("GL_NV_texture_shader
38      # XXX Should check separately for texture_shader2,      # XXX Should check separately for texture_shader2,
39      # otherwise it'll be SLOW.      # otherwise it'll be SLOW.
40      if dbg: print "Using NV20 texture shaders"      if dbg: print "Using NV20 texture shaders"
41      my_import("gfx.libpaper.texops_NV2X")      #my_import("gfx.libpaper.texops_NV2X")
42      from gfx.libpaper.texops_NV2X import *          from gfx.libpaper.texops_NV2X import *    
43  else:  else:
44      if dbg: print "Using unextended OpenGL texture accesses"      if dbg: print "Using unextended OpenGL texture accesses"
45      my_import("gfx.libpaper.texops_STD")      #my_import("gfx.libpaper.texops_STD")
46      from gfx.libpaper.texops_STD import *      from gfx.libpaper.texops_STD import *
47    
48    
# Line 56  if GL.hasExtension("GL_NV_register_combi Line 54  if GL.hasExtension("GL_NV_register_combi
54      if maxcomb < 4:      if maxcomb < 4:
55          # use NV10 version          # use NV10 version
56          if dbg: print "Using NV10 combiners ",maxcomb          if dbg: print "Using NV10 combiners ",maxcomb
57          my_import("gfx.libpaper.texcomb_NV1X")          #my_import("gfx.libpaper.texcomb_NV1X")
58          from gfx.libpaper.texcomb_NV1X import *          from gfx.libpaper.texcomb_NV1X import *
59      else:      else:
60          # use NV20 version          # use NV20 version
61          if dbg: print "Using NV20 combiners ",maxcomb          if dbg: print "Using NV20 combiners ",maxcomb
62          my_import("gfx.libpaper.texcomb_NV2X")          #my_import("gfx.libpaper.texcomb_NV2X")
63          from gfx.libpaper.texcomb_NV2X import *          from gfx.libpaper.texcomb_NV2X import *
64  else:  else:
65      # Must use OpenGL 1.1 specified calls.      # Must use OpenGL 1.1 specified calls.
66      print "NEED FIX - DOES _NOT_ WORK : Using OpenGL 1.1 texenv and blending"      print "NEED FIX - DOES _NOT_ WORK : Using OpenGL 1.1 texenv and blending"
67      my_import("gfx.libpaper.texcomb_GL1_1")      #my_import("gfx.libpaper.texcomb_GL1_1")
68            
69    
70  dbg = 0  dbg = 0
# Line 110  def setDummyPass(pas): Line 108  def setDummyPass(pas):
108      pas.setTeardowncode("PopAttrib")      pas.setTeardowncode("PopAttrib")
109    
110  class ThePaperMill(PaperMill):  class ThePaperMill(PaperMill):
     #initialize()  
   
111      def getPaper(self, seed, passmask=[1,1,1,1,1,1,1]):      def getPaper(self, seed, passmask=[1,1,1,1,1,1,1]):
112          reg = Registry()          reg = Registry()
113                    

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

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