398 |
sp = 10 |
sp = 10 |
399 |
size = vs.getSize().height / 4 - 2*sp |
size = vs.getSize().height / 4 - 2*sp |
400 |
(w,h) = (size,size) |
(w,h) = (size,size) |
401 |
|
total = 0 |
402 |
for t in self.tex: |
for t in self.tex: |
403 |
vs.put(quad((t.getTexId())), 0, sp + x*(w+sp), sp + y*(h+sp), w, h) |
vs.put(quad((t.getTexId())), 0, sp + x*(w+sp), sp + y*(h+sp), w, h) |
404 |
x += 1 |
x += 1 |
405 |
if x>3: |
if x>3: |
406 |
x = 0 |
x = 0 |
407 |
y += 1 |
y += 1 |
408 |
|
pw = GL.getGLTexLevelParameterFloat("TEXTURE_2D", t.getTexId(), 0, |
409 |
|
"TEXTURE_WIDTH")[0] |
410 |
|
ph = GL.getGLTexLevelParameterFloat("TEXTURE_2D", t.getTexId(), 0, |
411 |
|
"TEXTURE_HEIGHT")[0] |
412 |
|
print "Size: %sx%s = %s" % (pw, ph, pw * ph) |
413 |
|
total += pw * ph |
414 |
|
print "Total size =", total |
415 |
|
|
416 |
scenebindings = { |
scenebindings = { |
417 |
"F1": PaperScene, |
"F1": PaperScene, |