115 |
|
|
116 |
def getPaper(self, seed, passmask=[1,1,1,1,1,1,1], |
def getPaper(self, seed, passmask=[1,1,1,1,1,1,1], |
117 |
numcolors = 8, |
numcolors = 8, |
118 |
minlum = 80): |
minlum = 80, |
119 |
|
blend = 0): |
120 |
pap = PaperHanger() |
pap = PaperHanger() |
121 |
pap.reg = Registry() |
pap.reg = Registry() |
122 |
|
|
133 |
|
|
134 |
# XXX: TODO: these could be passed inside the paper object |
# XXX: TODO: these could be passed inside the paper object |
135 |
# (and then the textures, too, would be protected from gc) |
# (and then the textures, too, would be protected from gc) |
136 |
colors = Colors(rng.nextInt(), colors = numcolors, minlum = minlum) |
colors = Colors(rng.nextInt(), colors = numcolors, minlum = minlum, |
137 |
|
blend = blend) |
138 |
textures = Textures(rng.nextInt()) |
textures = Textures(rng.nextInt()) |
139 |
rootrep = TexGenXYRepeatUnit(rng, scale = 0.3 * scaleFactor) |
rootrep = TexGenXYRepeatUnit(rng, scale = 0.3 * scaleFactor) |
140 |
|
|
162 |
return pap |
return pap |
163 |
|
|
164 |
def getOptimizedPaper(self, seed, w, passmask = [1, 1, 1, 1, 1, 1, 1], |
def getOptimizedPaper(self, seed, w, passmask = [1, 1, 1, 1, 1, 1, 1], |
165 |
numcolors = 8, minlum = 80): |
numcolors = 8, minlum = 80, blend = 0): |
166 |
pap = self.getPaper(seed, passmask, numcolors, minlum) |
pap = self.getPaper(seed, passmask, numcolors, minlum, blend) |
167 |
|
|
168 |
if not GL.hasExtension("GL_SGIS_generate_mipmap"): |
if not GL.hasExtension("GL_SGIS_generate_mipmap"): |
169 |
print "Warning: not returning optimized paper because" |
print "Warning: not returning optimized paper because" |