View Single Post
  #1  
Old 07-14-2015, 01:11 PM
gerardo697 gerardo697 is offline
Member
 
Join Date: May 2015
Posts: 10
Adding Images to Objects

I was wondering if there is a better approach when trying to add an image onto a wall. I have created the following quadrilateral, and when I run the program it just shows a brown square. How can I fix this?

import viz
viz.setMultiSample(8)
viz.fov(60)
viz.go()

viz.startLayer(viz.QUADS)
viz.vertex(0,0,15)
viz.vertex(10,0,15)
viz.vertex(10,10,15)
viz.vertex(0,10,15)
myQuad = viz.endLayer()
texture = viz.add( 'duck.jpg' )
myQuad.texture( texture)
Reply With Quote