17 |
size = 1024 |
size = 1024 |
18 |
baselevel=0 |
baselevel=0 |
19 |
|
|
20 |
img = GZZGL.createImage("doc/gl/irreg0.png") |
img = GL.createImage("doc/gl/irreg0.png") |
21 |
|
|
22 |
tex0 = GZZGL.createTexture() |
tex0 = GL.createTexture() |
23 |
tex0.loadNull2D(0, "R3_G3_B2", 64, 64, 0, "RGB", "UNSIGNED_BYTE") |
tex0.loadNull2D(0, "R3_G3_B2", 64, 64, 0, "RGB", "UNSIGNED_BYTE") |
24 |
|
|
25 |
|
|
26 |
def maketex(): |
def maketex(): |
27 |
global tex, texes |
global tex, texes |
28 |
tex = GZZGL.createTexture() |
tex = GL.createTexture() |
29 |
tex.loadNull2D(0, form, size, size, 0, "RGB", "UNSIGNED_BYTE") |
tex.loadNull2D(0, form, size, size, 0, "RGB", "UNSIGNED_BYTE") |
30 |
tex.loadSubImage(0, img, 50, 50) |
tex.loadSubImage(0, img, 50, 50) |
31 |
# tex.shade(size, size, 0, 4, form, "RGBA", "waves", []) |
# tex.shade(size, size, 0, 4, form, "RGBA", "waves", []) |
32 |
# tex.shade(size, size, 0, 4, form, "RGBA", "waves", []) |
# tex.shade(size, size, 0, 4, form, "RGBA", "waves", []) |
33 |
|
|
34 |
texes = [ GZZGL.createTexture() for i in range(0, 50) ] |
texes = [ GL.createTexture() for i in range(0, 50) ] |
35 |
for t in texes: |
for t in texes: |
36 |
tex.downsampleInto(t, "TEXTURE_2D", 0, form, "RGB") |
tex.downsampleInto(t, "TEXTURE_2D", 0, form, "RGB") |
37 |
|
|
48 |
"TEXTURE_LUMINANCE_SIZE", |
"TEXTURE_LUMINANCE_SIZE", |
49 |
"TEXTURE_INTENSITY_SIZE", |
"TEXTURE_INTENSITY_SIZE", |
50 |
): |
): |
51 |
print "p:\t",p,"\t", GZZGL.getGLTexLevelParameterFloat("TEXTURE_2D", id, i, p) |
print "p:\t",p,"\t", GL.getGLTexLevelParameterFloat("TEXTURE_2D", id, i, p) |
52 |
print "if:\t",GZZGL.getGLTokenString( |
print "if:\t",GL.getGLTokenString( |
53 |
int(GZZGL.getGLTexLevelParameterFloat("TEXTURE_2D", id, i, |
int(GL.getGLTexLevelParameterFloat("TEXTURE_2D", id, i, |
54 |
"TEXTURE_INTERNAL_FORMAT")[0])) |
"TEXTURE_INTERNAL_FORMAT")[0])) |
55 |
|
|
56 |
|
|
71 |
texid = texes[i].getTexId() |
texid = texes[i].getTexId() |
72 |
if 0: |
if 0: |
73 |
print "Id ",texid |
print "Id ",texid |
74 |
print "Resid", GZZGL.getGLTexParameterFloat("TEXTURE_2D", texes[i].getTexId(), "TEXTURE_RESIDENT") |
print "Resid", GL.getGLTexParameterFloat("TEXTURE_2D", texes[i].getTexId(), "TEXTURE_RESIDENT") |
75 |
print "Prio", GZZGL.getGLTexParameterFloat("TEXTURE_2D", texes[i].getTexId(), "TEXTURE_PRIORITY") |
print "Prio", GL.getGLTexParameterFloat("TEXTURE_2D", texes[i].getTexId(), "TEXTURE_PRIORITY") |
76 |
printTex(texid) |
printTex(texid) |
77 |
putnoc(vs, getDListNocoords(""" |
putnoc(vs, getDListNocoords(""" |
78 |
BindTexture TEXTURE_2D %s |
BindTexture TEXTURE_2D %s |