View Single Post
  #6  
Old 04-22-2013, 06:57 PM
cgsong58 cgsong58 is offline
Member
 
Join Date: Apr 2013
Posts: 7
Problem in loading *.jpgx file in art folder

Quote:
Originally Posted by Jeff View Post
Which examples did you have trouble running? Vizard should be able to load the .jpgx files included with Teacher in a Book. Those files can be referenced without the 'x' added to the extension in the script.
Jeff,

I have run the texture example demo ("texture coordinates demo.py) but I couldn't have correct images, foliage.jpg, and pine needles.jpg.
My code is as follows:

import viz
viz.go()
viz.clearcolor([.3,.3,.3])
viz.mouse( viz.OFF )
viz.MainView.setPosition(0,0,-1.5)

#Add the texture quad and the texture to put on it.
quad = viz.addTexQuad()
textures = []
files = ['foliage.jpg','pine needles.jpg' ]
for i in range(len(files)):
texture = viz.addTexture( 'art/' + files[i] )
texture.wrap( viz.WRAP_S, viz.CLAMP_TO_EDGE )
texture.wrap( viz.WRAP_T, viz.CLAMP_TO_EDGE )
quad.texture( texture, '', i )
textures.append( texture )

#.... I have cut at this point
Reply With Quote