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_GL1_1.py ...


From: Matti Katila
Subject: [Gzz-commits] gzz/gfx/libpaper papermill.py texcomb_GL1_1.py ...
Date: Thu, 14 Nov 2002 07:06:22 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Matti Katila <address@hidden>   02/11/14 07:06:22

Modified files:
        gfx/libpaper   : papermill.py texcomb_GL1_1.py textures.py 

Log message:
        Modified texcomb for OpenGL 1.1

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/papermill.py.diff?tr1=1.61&tr2=1.62&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/texcomb_GL1_1.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/textures.py.diff?tr1=1.33&tr2=1.34&r1=text&r2=text

Patches:
Index: gzz/gfx/libpaper/papermill.py
diff -u gzz/gfx/libpaper/papermill.py:1.61 gzz/gfx/libpaper/papermill.py:1.62
--- gzz/gfx/libpaper/papermill.py:1.61  Wed Nov 13 17:48:56 2002
+++ gzz/gfx/libpaper/papermill.py       Thu Nov 14 07:06:22 2002
@@ -1,3 +1,6 @@
+import gfx.libpaper.textures
+
+
 from gfx.libpaper.textures import Textures
 from gfx.libpaper.colors import Colors
 from gfx.libpaper.texcoords import TexGenXYRepeatUnit
@@ -57,6 +60,8 @@
     # Must use OpenGL 1.1 specified calls.
     print "NEED FIX - DOES _NOT_ WORK : Using OpenGL 1.1 texenv and blending"
     from gfx.libpaper.texcomb_GL1_1 import *
+    gfx.libpaper.textures.texture_format = "LUMINANCE_ALPHA"
+    gfx.libpaper.textures.texture_components = 2
 
 # Check whether anisotropic filtering is supported
 if GL.hasExtension("GL_EXT_texture_filter_anisotropic"):
@@ -75,7 +80,6 @@
 def setSolidPass(pas, color):
     pas.setSetupcode("""
         PushAttrib ENABLE_BIT TEXTURE_BIT
-        Disable REGISTER_COMBINERS_NV
         Disable TEXTURE_2D
         Disable BLEND
         Enable DEPTH_TEST
Index: gzz/gfx/libpaper/texcomb_GL1_1.py
diff -u gzz/gfx/libpaper/texcomb_GL1_1.py:1.5 
gzz/gfx/libpaper/texcomb_GL1_1.py:1.6
--- gzz/gfx/libpaper/texcomb_GL1_1.py:1.5       Mon Oct 21 12:12:33 2002
+++ gzz/gfx/libpaper/texcomb_GL1_1.py   Thu Nov 14 07:06:22 2002
@@ -26,7 +26,7 @@
         
        constantcode = """
             Enable BLEND
-            BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA 
+            BlendFunc ONE_MINUS_SRC_ALPHA SRC_ALPHA
 
             # BlendEquation FUNC_ADD
 
@@ -38,6 +38,11 @@
             ActiveTexture TEXTURE0
             TexEnv TEXTURE_ENV TEXTURE_ENV_MODE BLEND
             TexEnv TEXTURE_ENV TEXTURE_ENV_COLOR %(c1)s
+
+
+            #BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA 
+
+
             ActiveTexture TEXTURE1
             TexEnv TEXTURE_ENV TEXTURE_ENV_MODE BLEND
             TexEnv TEXTURE_ENV TEXTURE_ENV_COLOR %(c2)s
@@ -48,9 +53,9 @@
             # Multitexturing
             #Multitexture 
 
-           Color %(c0)s
+           Color %(c0)s %(trans)s
             # SecondaryColorEXT %(c1)s
-           Fog FOG_COLOR %(c2)s
+           #Fog FOG_COLOR %(c2)s
        """ % locals()
 
         type = rnd.nextInt(3)
Index: gzz/gfx/libpaper/textures.py
diff -u gzz/gfx/libpaper/textures.py:1.33 gzz/gfx/libpaper/textures.py:1.34
--- gzz/gfx/libpaper/textures.py:1.33   Wed Oct 16 10:50:11 2002
+++ gzz/gfx/libpaper/textures.py        Thu Nov 14 07:06:22 2002
@@ -13,6 +13,9 @@
 import java
 from math import exp
 
+texture_format = "RGB"
+texture_components = 2
+
 isNV2X = 0
 
 ptextures = {}
@@ -44,6 +47,7 @@
         return self.name
 
 
+
 initialized = 0
 def init():
     global initialized
@@ -75,14 +79,16 @@
         "rnd2n",
         ], [
         {"name" : "rgbw1",
-         "args" : [tres, tres, 0, 3, "RGB", "RGB", "fnoise",
+         "args" : [tres, tres, 0, texture_components, texture_format,
+                   texture_format, "fnoise",
                    ["scale", ".43", "freq", "1", "df", ".3", "bias", "0.5", 
"seed", "2323" ]],
          "scale" : 1./2,
          "featurescale" : 1./2,
          },
         
         {"name" : "rgbw2",
-         "args" : [tres, tres, 0, 3, "RGB", "RGB", "fnoise",
+         "args" : [tres, tres, 0, texture_components, texture_format,
+                   texture_format, "fnoise",
                    ["scale", ".43", "freq", "1", "df", "1.2", "bias", "0.5" ]],
          "scale" : 1./2,
          "featurescale" : 1./4,
@@ -90,7 +96,8 @@
 
 
         {"name" : "rgbw3",
-         "args" : [tres, tres, 0, 3, "RGB", "RGB", "fnoise",
+         "args" : [tres, tres, 0, texture_components, texture_format,
+                   texture_format, "fnoise",
                    ["scale", ".3", "freq", "1", "df", "1.9", "bias", "0.5",
                     "seed", "361", "aniso", "2"]],
          "scale" : 1./2,
@@ -98,7 +105,8 @@
          },
 
         {"name" : "turb",
-         "args" : [tres, tres, 0, 3, "RGB", "RGB", "fnoise",
+         "args" : [tres, tres, 0, texture_components, texture_format,
+                   texture_format, "fnoise",
                    ["turb", "1", "scale", ".3", "freq", "1",
                     "freq2", "100", "df", "1", "bias", "0"]],
          "scale" : 1./8,
@@ -106,13 +114,15 @@
          },
         
         {"name" : "pyramid",
-         "args" : [64, 64, 0, 3, "RGB", "RGB", "geometric", ["type", "0"]],
+         "args" : [64, 64, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "0"]],
          "scale" : 1./2,
          "featurescale" : 1./2,
          },
         
         {"name" : "checkerboard",
-         "args" : [4, 4, 0, 3, "RGB", "RGB", "geometric", ["type", "1", 
"scale", ".5", "bias", ".5"]],
+         "args" : [4, 4, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "1", "scale", ".5", 
"bias", ".5"]],
          "continuous" : 0,
          "scale" : 1./8,
          "featurescale" : 1./4,
@@ -121,13 +131,15 @@
          },
         
         {"name" : "cone",
-         "args" : [64, 64, 0, 3, "RGB", "RGB", "geometric", ["type", "2"]],
+         "args" : [64, 64, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "2"]],
          "scale" : 1./2,
          "featurescale" : 1./2,
          },
         
         {"name" : "checkerboard2",
-         "args" : [2, 2, 0, 3, "RGB", "RGB", "geometric", ["type", "3", 
"scale", ".5", "bias", ".5"]],
+         "args" : [2, 2, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "3", "scale", ".5", 
"bias", ".5"]],
          "continuous" : 0,
          "scale" : 1./8,
          "featurescale" : 1./2,
@@ -136,7 +148,8 @@
          },
         
         {"name" : "saw",
-         "args" : [64, 64, 0, 3, "RGB", "RGB", "geometric", ["type", "4"]],
+         "args" : [64, 64, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "4"]],
          "continuous" : 0,
          "scale" : 1./8,
          "featurescale" : 1.,
@@ -145,13 +158,15 @@
          },
         
         {"name" : "triangle",
-         "args" : [64, 64, 0, 3, "RGB", "RGB", "geometric", ["type", "5"]],
+         "args" : [64, 64, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "5"]],
          "scale" : 1./2,
          "featurescale" : 1./2,
          },
 
         {"name" : "stripe",
-         "args" : [2, 2, 0, 3, "RGB", "RGB", "geometric", ["type", "6", 
"scale", ".5", "bias", ".5"]],
+         "args" : [2, 2, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "6", "scale", ".5", 
"bias", ".5"]],
          "continuous" : 0,
          "scale" : 1./8,
          "featurescale" : 1./2,
@@ -160,28 +175,32 @@
          },
 
         {"name" : "rnd0",
-         "args" : [2, 2, 0, 3, "RGB", "RGB", "geometric", ["type", "7", 
"seed", "10"]],
+         "args" : [2, 2, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "7", "seed", "10"]],
          "continuous" : 0,
          "scale" : 1./2,
          "featurescale" : 1./2,
          },
 
         {"name" : "rnd1",
-         "args" : [2, 4, 0, 3, "RGB", "RGB", "geometric", ["type", "7", 
"seed", "11"]],
+         "args" : [2, 4, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "7", "seed", "11"]],
          "continuous" : 0,
          "scale" : 1./4,
          "featurescale" : 1./4,
          },
 
         {"name" : "rnd2",
-         "args" : [4, 4, 0, 3, "RGB", "RGB", "geometric", ["type", "7", 
"seed", "12"]],
+         "args" : [4, 4, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "7", "seed", "12"]],
          "continuous" : 0,
          "scale" : 1./4,
          "featurescale" : 1./4,
          },
 
         {"name" : "rnd0n",
-         "args" : [2, 2, 0, 3, "RGB", "RGB", "geometric", ["type", "7", 
"seed", "10"]],
+         "args" : [2, 2, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "7", "seed", "10"]],
          "continuous" : 0,
          "scale" : 1./2,
          "featurescale" : 1./2,
@@ -190,7 +209,8 @@
          },
 
         {"name" : "rnd1n",
-         "args" : [2, 4, 0, 3, "RGB", "RGB", "geometric", ["type", "7", 
"seed", "11"]],
+         "args" : [2, 4, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "7", "seed", "11"]],
          "continuous" : 0,
          "scale" : 1./4,
          "featurescale" : 1./4,
@@ -199,7 +219,8 @@
          },
 
         {"name" : "rnd2n",
-         "args" : [4, 4, 0, 3, "RGB", "RGB", "geometric", ["type", "7", 
"seed", "12"]],
+         "args" : [4, 4, 0, texture_components, texture_format,
+                   texture_format, "geometric", ["type", "7", "seed", "12"]],
          "continuous" : 0,
          "scale" : 1./4,
          "featurescale" : 1./4,




reply via email to

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