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 |
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 |
|
|
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 |
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 |
|
|