gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz Documentation/Manuscripts/ProcText/data/sho...


From: Janne V. Kujala
Subject: [Gzz-commits] gzz Documentation/Manuscripts/ProcText/data/sho...
Date: Mon, 07 Oct 2002 08:43:23 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Janne V. Kujala <address@hidden>        02/10/07 08:43:23

Modified files:
        Documentation/Manuscripts/ProcText/data: showdata.sh 
        gfx/libpaper   : papermill.py textures.py 

Log message:
        cleanup

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/Documentation/Manuscripts/ProcText/data/showdata.sh.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/papermill.py.diff?tr1=1.35&tr2=1.36&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/textures.py.diff?tr1=1.13&tr2=1.14&r1=text&r2=text

Patches:
Index: gzz/Documentation/Manuscripts/ProcText/data/showdata.sh
diff -c gzz/Documentation/Manuscripts/ProcText/data/showdata.sh:1.1 
gzz/Documentation/Manuscripts/ProcText/data/showdata.sh:1.2
*** gzz/Documentation/Manuscripts/ProcText/data/showdata.sh:1.1 Fri Oct  4 
09:09:08 2002
--- gzz/Documentation/Manuscripts/ProcText/data/showdata.sh     Mon Oct  7 
08:43:23 2002
***************
*** 1 ****
! grep -B1 RT "$@" | perl -e 'while(<>){ @l0 = split; @l1 = split " ", scalar 
<>; print "$l0[7] $l0[9] $l1[9] $l1[11]\n"}'|tr -d :|sed -e 's/(Correct)/1/' -e 
's/(Incorrect)/0/' | sed -e 's/-/-10/'|xgobi
--- 1,13 ----
! {
!     # Learning phase
!     grep -A100 "Learning phase" "$@" |
!     grep Trial | 
!     awk '{print ($8-110) " " $10 " -1000 -1" }'
! 
!     # Online test
!     grep -B1 RT "$@" | 
!     perl -e 'while(<>){ @l0 = split; @l1 = split " ", scalar <>; print 
"$l0[7] $l0[9] $l1[9] $l1[11]\n"}' | 
!     tr -d : | 
!     sed -e 's/(Correct)/1/' -e 's/(Incorrect)/0/' | 
!     sed -e 's/-/-10/'
! } | xgobi
Index: gzz/gfx/libpaper/papermill.py
diff -c gzz/gfx/libpaper/papermill.py:1.35 gzz/gfx/libpaper/papermill.py:1.36
*** gzz/gfx/libpaper/papermill.py:1.35  Mon Oct  7 08:14:04 2002
--- gzz/gfx/libpaper/papermill.py       Mon Oct  7 08:43:23 2002
***************
*** 18,89 ****
  import java
  from java.lang import Math
  
! #def initialize():
! if 1:
!     #global initialized
!     #if initialized: return
!     #initialized = 1
!     dbg=1
!     # Discriminate between different renderers.
!     # These are for debug output only.
!     if dbg:
!         vendor = GL.getGLString("VENDOR")
!         renderer = GL.getGLString("RENDERER")
!         version = GL.getGLString("VERSION")
!         print "GL strings: '%s' '%s' '%s'"%(
!             vendor,renderer,version)
!     # The backend files to load
!     files = [
!         #"textures.py",
!         #"texcoords.py",
!         #"colors.py",
!         #"params.py"
!         ]
! 
!     #
!     # Now, go through some questions.
!     #
! 
!     # Check which texture operations to use.
!     if GL.hasExtension("GL_NV_texture_shader"):
!         # 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")
!         my_import("gfx.libpaper.texops_NV2X")
!         from gfx.libpaper.texops_NV2X import *
!         
!     else:
!         if dbg: print "Using unextended OpenGL texture accesses"
!         #files.append("texops_STD.py")
!         my_import("gfx.libpaper.texops_STD")
!         from gfx.libpaper.texops_STD import *
! 
! 
!     # Check which combiners to use.
!     if GL.hasExtension("GL_NV_register_combiners"):
!         # We have at least a NV10, possibly better.
!         # Check the number of general combiners to be sure.
!         maxcomb = GL.getGLFloat("MAX_GENERAL_COMBINERS_NV")[0]
!         if maxcomb < 4:
!             # use NV10 version
!             if dbg: print "Using NV10 combiners ",maxcomb
!             #files.append("texcomb_NV1X.py")
!             my_import("gfx.libpaper.texcomb_NV1X")
!             from gfx.libpaper.texcomb_NV1X import *
!         else:
!             # use NV20 version
!             if dbg: print "Using NV20 combiners ",maxcomb
!             #files.append("texcomb_NV2X.py")
!             my_import("gfx.libpaper.texcomb_NV2X")
!             from gfx.libpaper.texcomb_NV2X import *
      else:
!         assert 0, "Sorry, can't do without NVIDIA register combiners yet."
! 
!     for f in files:
!         print "Load file ",f
!         execfile("gfx/libpaper/"+f, globals())
  
  dbg = 0
  
--- 18,68 ----
  import java
  from java.lang import Math
  
! dbg=1
! # Discriminate between different renderers.
! # These are for debug output only.
! if dbg:
!     vendor = GL.getGLString("VENDOR")
!     renderer = GL.getGLString("RENDERER")
!     version = GL.getGLString("VERSION")
!     print "GL strings: '%s' '%s' '%s'"%(
!         vendor,renderer,version)
! 
! #
! # Now, go through some questions.
! #
! 
! # Check which texture operations to use.
! if GL.hasExtension("GL_NV_texture_shader"):
!     # 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"
!     my_import("gfx.libpaper.texops_NV2X")
!     from gfx.libpaper.texops_NV2X import *    
! else:
!     if dbg: print "Using unextended OpenGL texture accesses"
!     my_import("gfx.libpaper.texops_STD")
!     from gfx.libpaper.texops_STD import *
! 
! 
! # Check which combiners to use.
! if GL.hasExtension("GL_NV_register_combiners"):
!     # We have at least a NV10, possibly better.
!     # Check the number of general combiners to be sure.
!     maxcomb = GL.getGLFloat("MAX_GENERAL_COMBINERS_NV")[0]
!     if maxcomb < 4:
!         # use NV10 version
!         if dbg: print "Using NV10 combiners ",maxcomb
!         my_import("gfx.libpaper.texcomb_NV1X")
!         from gfx.libpaper.texcomb_NV1X import *
      else:
!         # use NV20 version
!         if dbg: print "Using NV20 combiners ",maxcomb
!         my_import("gfx.libpaper.texcomb_NV2X")
!         from gfx.libpaper.texcomb_NV2X import *
! else:
!     assert 0, "Sorry, can't do without NVIDIA register combiners yet."
  
  dbg = 0
  
***************
*** 111,120 ****
          Disable BLEND
          Enable DEPTH_TEST
          DepthFunc LESS
!         Color %(color)s
!     """ % {
!             "color" : js(color),
!         })
      pas.setTeardowncode("""
          PopAttrib
      """)
--- 90,97 ----
          Disable BLEND
          Enable DEPTH_TEST
          DepthFunc LESS
!         Color %s %s %s
!     """ % color)
      pas.setTeardowncode("""
          PopAttrib
      """)
***************
*** 151,157 ****
          rootrep = TexGenXYRepeatUnit(rng)
  
          pap.setNPasses(len(passes))
-         #setSolidPass(pap.getPass(0), (0.1,0.1,0.2))
          
          for i in range(0, len(passes)):
              if passmask[i]:
--- 128,133 ----
Index: gzz/gfx/libpaper/textures.py
diff -c gzz/gfx/libpaper/textures.py:1.13 gzz/gfx/libpaper/textures.py:1.14
*** gzz/gfx/libpaper/textures.py:1.13   Mon Oct  7 08:14:04 2002
--- gzz/gfx/libpaper/textures.py        Mon Oct  7 08:43:23 2002
***************
*** 9,15 ****
  #     OFFS2
  #     OFFS3
  
- from gzz.gfx.gl import GL
  
  import java
  from math import exp
--- 9,14 ----
***************
*** 18,26 ****
  
  ptextures = {}
  
- import os
- from gfx.libutil.myimport import get_file_ctime
  
  if "texcache" not in globals().keys():
      texcache = {}
      
--- 17,27 ----
  
  ptextures = {}
  
  
+ # XXX: where should this code be? --------------
+ from gzz.gfx.gl import GL
+ from gfx.libutil.myimport import get_file_ctime
+ import os
  if "texcache" not in globals().keys():
      texcache = {}
      
***************
*** 39,45 ****
          os.system("make -C gfx/libtexture " + name + ".bin")
          bintime = get_file_ctime(binfile)
          
!     key = (name, tuple(args[0:7]), tuple(args[7]))
      if texcache.has_key(key) and texcache[(key,"ctime")] == srctime:
          print "Returning cached texture"
          return texcache[key]
--- 40,46 ----
          os.system("make -C gfx/libtexture " + name + ".bin")
          bintime = get_file_ctime(binfile)
          
!     key = str(args)
      if texcache.has_key(key) and texcache[(key,"ctime")] == srctime:
          print "Returning cached texture"
          return texcache[key]
***************
*** 50,55 ****
--- 51,57 ----
      texcache[(key,"ctime")] = srctime
      print "SHADER: ", res, tex.getTexId()
      return tex
+ # ----------------------------------------------
  
  
  class NamedTexture:




reply via email to

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