PDA

View Full Version : textures bug/problem?


Renato Lima
10-12-2010, 10:24 AM
I have to choose between to methods of applying a texture.
I would like to use A, but the resolution is MUCH lower than B. Why? How do I make is as good? Thanks

Method A:
pngData = cStringIO.StringIO()
pylab.savefig(pngData, format='png')
pylab.close()
T = viz.addBlankTexture([1, 1])
T.loadBuffer('.png', pngData.getvalue())
TMP = vr_world.getChild("object")
TMP.texture(T)


Method B:
pngData = "mydo_chart.png"
pylab.savefig(pngData, format='png')
pylab.close()
T = viz.add(pngData)
TMP = vr_world.getChild("object")
TMP.texture(T)

farshizzo
10-12-2010, 03:12 PM
How much lower is the resolution? Add the following line at the end of each sample to see what the images sizes are:print T.getSize()