gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz/gfx demo/irregu3.py libcallgl/callgl.cxx


From: Janne V. Kujala
Subject: [Gzz-commits] gzz/gfx demo/irregu3.py libcallgl/callgl.cxx
Date: Fri, 18 Oct 2002 06:54:01 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Janne V. Kujala <address@hidden>        02/10/18 06:53:35

Modified files:
        gfx/demo       : irregu3.py 
        gfx/libcallgl  : callgl.cxx 

Log message:
        Add perspective correction hint to irregu3

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/irregu3.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcallgl/callgl.cxx.diff?tr1=1.24&tr2=1.25&r1=text&r2=text

Patches:
Index: gzz/gfx/demo/irregu3.py
diff -c gzz/gfx/demo/irregu3.py:1.3 gzz/gfx/demo/irregu3.py:1.4
*** gzz/gfx/demo/irregu3.py:1.3 Thu Oct 17 14:18:44 2002
--- gzz/gfx/demo/irregu3.py     Fri Oct 18 06:53:35 2002
***************
*** 1,17 ****
  
  tex = GL.createTexture()
  
! tex.shade(128, 128, 0, 4, "RGBA", "RGBA",
!           "sawnoise", ["bias", ".5",
!                        "scale", "0.15", "freq", "1", "df", "2", 
!                        "scale2", "0.25", "freq2", "10", "df2", ".5"])
  
  #tex.shade(16, 16, 0, 4, "RGBA", "RGBA",
  #          "geometric", ["type", "7", "bias", "-0", "scale", "2"])
  
  
  
! e = 0.25
  
  texid = tex.getTexId()
  
--- 1,17 ----
  
  tex = GL.createTexture()
  
! #tex.shade(128, 128, 0, 4, "RGBA", "RGBA",
! #          "sawnoise", ["bias", ".5",
! #                       "scale", "0.15", "freq", "1", "df", "2", 
! #                       "scale2", "0.25", "freq2", "10", "df2", ".5"])
  
  #tex.shade(16, 16, 0, 4, "RGBA", "RGBA",
  #          "geometric", ["type", "7", "bias", "-0", "scale", "2"])
  
  
  
! e = 0.5
  
  texid = tex.getTexId()
  
***************
*** 24,31 ****
  
      BindTexture TEXTURE_2D %(texid)s
  
      #Debug mountains
!     TexImage2D TEXTURE_2D 0 ALPHA 8 1 0 ALPHA .25 1 .25 .75 .25 .5 .25 .25
      TexParameter TEXTURE_2D TEXTURE_BASE_LEVEL 0
      TexParameter TEXTURE_2D TEXTURE_MAX_LEVEL 0
      
--- 24,36 ----
  
      BindTexture TEXTURE_2D %(texid)s
  
+     # Try to convince the GL implementation to do
+     # perspective correct color interpolation
+     Hint PERSPECTIVE_CORRECTION_HINT NICEST
+ 
      #Debug mountains
!     TexImage2D TEXTURE_2D 0 LUMINANCE_ALPHA 8 1 0 LUMINANCE_ALPHA \
!     .5 .5 1 1 .5 .5 .85 .85 .5 .5 .7 .7 .5 .5 .55 .55
      TexParameter TEXTURE_2D TEXTURE_BASE_LEVEL 0
      TexParameter TEXTURE_2D TEXTURE_MAX_LEVEL 0
      
***************
*** 82,88 ****
          putnoc(vs, background((0.1,0.4,0.5)))
  
  
!         cs1 = vs.coords.affineCoordsys(0, 10, 200, 450, 800, 0, 0, -300)
        vs.matcher.add(cs1, "1")
  
          vs.map.put(irr, cs1)
--- 87,93 ----
          putnoc(vs, background((0.1,0.4,0.5)))
  
  
!         cs1 = vs.coords.affineCoordsys(0, 0, 12, 700, 1000, 0, 0, -600)
        vs.matcher.add(cs1, "1")
  
          vs.map.put(irr, cs1)
Index: gzz/gfx/libcallgl/callgl.cxx
diff -c gzz/gfx/libcallgl/callgl.cxx:1.24 gzz/gfx/libcallgl/callgl.cxx:1.25
*** gzz/gfx/libcallgl/callgl.cxx:1.24   Thu Oct 17 12:46:24 2002
--- gzz/gfx/libcallgl/callgl.cxx        Fri Oct 18 06:53:35 2002
***************
*** 137,142 ****
--- 137,144 ----
          glEnable(getToken(v[1]));
        } else if (checkfunc(v, "Disable", 1)) {
          glDisable(getToken(v[1]));
+       } else if (checkfunc(v, "Hint", 2)) {
+         glHint(getToken(v[1]), getToken(v[2]));
        } else if (checkfunc(v, "ReadBuffer", 1)) {
          glReadBuffer(getToken(v[1]));
        } else if (checkfunc(v, "DrawBuffer", 1)) {




reply via email to

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