gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz/gfx/demo/opengl texperf.py


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz/gfx/demo/opengl texperf.py
Date: Mon, 23 Sep 2002 08:45:25 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/09/23 08:45:25

Modified files:
        gfx/demo/opengl: texperf.py 

Log message:
        textest

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/opengl/texperf.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: gzz/gfx/demo/opengl/texperf.py
diff -c gzz/gfx/demo/opengl/texperf.py:1.4 gzz/gfx/demo/opengl/texperf.py:1.5
*** gzz/gfx/demo/opengl/texperf.py:1.4  Mon Sep 23 07:15:42 2002
--- gzz/gfx/demo/opengl/texperf.py      Mon Sep 23 08:45:25 2002
***************
*** 13,21 ****
  #  - BASE_LEVEL *does* have an effect - I falsely concluded earlier that it 
didn't.
  #    Therefore, we'll be using that for quite a lot of things...
  
! form = "R3_G3_B2"
! size = 1024
! baselevel=0
  
  img = GL.createImage("doc/gl/irreg0.png")
  
--- 13,26 ----
  #  - BASE_LEVEL *does* have an effect - I falsely concluded earlier that it 
didn't.
  #    Therefore, we'll be using that for quite a lot of things...
  
! forms = ("R3_G3_B2",)
! # sizes = (512,1024,)
! baselevels =(0,1,2,3,4,5)
! 
! sizes = (512,)
! size = sizes[0]
! 
! form = forms[0]
  
  img = GL.createImage("doc/gl/irreg0.png")
  
***************
*** 58,93 ****
      def __init__(self):
        self.ntex = 2
      def time(self):
!       if not globals().has_key("tex"):
            maketex()
!       times = []
!       for nt in range(0,len(texes)):
!           vs = w.createVobScene()
!           putnoc(vs, background((0.1, 0.2, 0.5)))
!           putnoc(vs, getDListNocoords("""
!               Enable TEXTURE_2D
!           """))
!           for i in range(0, nt):
!               texid = texes[i].getTexId()
!               if 0:
!                   print "Id ",texid
!                   print "Resid", GL.getGLTexParameterFloat("TEXTURE_2D", 
texes[i].getTexId(), "TEXTURE_RESIDENT")
!                   print "Prio", GL.getGLTexParameterFloat("TEXTURE_2D", 
texes[i].getTexId(), "TEXTURE_PRIORITY")
!                   printTex(texid)
                putnoc(vs, getDListNocoords("""
!                   BindTexture TEXTURE_2D %s
!                   TexParameter TEXTURE_2D TEXTURE_MAG_FILTER LINEAR
!                   TexParameter TEXTURE_2D TEXTURE_MIN_FILTER 
LINEAR_MIPMAP_LINEAR
!                   TexParameter TEXTURE_2D TEXTURE_BASE_LEVEL 2
!               """ % texes[i].getTexId()))
!               vs.put(quad(), "T"+str(i), 50-i, 100+2*i, 100+2*i, 100, 100)
!           niters = 10
!           t = w.timeRender(vs, niters) / niters
!           print "Time: ", nt, t
!           times.append(t)
!           if t > 0.3:
!               break
!       print times
  
      def key(self, key):
        if key == 't':
--- 63,105 ----
      def __init__(self):
        self.ntex = 2
      def time(self):
!       if not globals().has_key("texes"):
            maketex()
!       for s in sizes:
!         for baselevel in baselevels:
!           times = []
!           for nt in range(0,len(texes)):
!               vs = w.createVobScene()
!               putnoc(vs, background((0.1, 0.2, 0.5)))
                putnoc(vs, getDListNocoords("""
!                   Enable TEXTURE_2D
!               """))
!               for i in range(0, nt):
!                   texid = texes[i].getTexId()
!                   if 0:
!                       print "Id ",texid
!                       print "Resid", GL.getGLTexParameterFloat("TEXTURE_2D", 
texes[i].getTexId(), "TEXTURE_RESIDENT")
!                       print "Prio", GL.getGLTexParameterFloat("TEXTURE_2D", 
texes[i].getTexId(), "TEXTURE_PRIORITY")
!                       printTex(texid)
!                   putnoc(vs, getDListNocoords("""
!                       BindTexture TEXTURE_2D %s
!                       TexParameter TEXTURE_2D TEXTURE_MAG_FILTER LINEAR
!                       TexParameter TEXTURE_2D TEXTURE_MIN_FILTER 
LINEAR_MIPMAP_LINEAR
!                       TexParameter TEXTURE_2D TEXTURE_BASE_LEVEL %s
!                   """ % (texes[i].getTexId(), baselevel)))
!                   vs.put(quad(), "T"+str(i), 50-i, 100+2*i, 100+2*i, 100, 100)
!               niters = 30
!               t = w.timeRender(vs, niters) / niters
!               print "Time: ", nt, t
!               times.append("%s %s\n" % (nt, t))
!               if t > 0.3:
!                   break
!           print times
!           f = open("tmp/t_%s_%s_%s" % (form, size, baselevel), "w")
!           for t in times:
!               f.write(t)
!           f.write("\n")
!           f.close()
  
      def key(self, key):
        if key == 't':




reply via email to

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