37 |
import java |
import java |
38 |
from math import exp |
from math import exp |
39 |
|
|
40 |
|
dbg = 0 |
41 |
|
|
42 |
texture_format = "RGBA" |
texture_format = "RGBA" |
43 |
texture_components = 4 |
texture_components = 4 |
44 |
|
|
69 |
|
|
70 |
def getTexId(self): |
def getTexId(self): |
71 |
if not hasattr(self, "texture"): |
if not hasattr(self, "texture"): |
72 |
print "Generating texture: ", self.name, self.args |
if dbg: |
73 |
|
print "Generating texture: ", self.name, self.args |
74 |
self.texture = getCachedTexture(self.args) |
self.texture = getCachedTexture(self.args) |
75 |
# XXX: FIXME: 1D/3D textures!!! |
# XXX: FIXME: 1D/3D textures!!! |
76 |
target = "TEXTURE_2D" |
target = "TEXTURE_2D" |
428 |
text_comps, text_form = 4, 'RGBA' |
text_comps, text_form = 4, 'RGBA' |
429 |
|
|
430 |
self.textures = init(text_comps, text_form) |
self.textures = init(text_comps, text_form) |
431 |
print "Textures created: components: %d, format: %s" % (text_comps, text_form) |
if dbg: |
432 |
|
print "Textures created: components: %d, format: %s" % (text_comps, text_form) |
433 |
|
|
434 |
|
|
435 |
def getPaperTexture(self, type, gen): |
def getPaperTexture(self, type, gen): |