View Single Post
  #7  
Old 03-19-2008, 10:25 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I replaced the ball texture with a webcam texture and it worked fine for me. Here is the code:
Code:
import viz
viz.go()

viz.add('tut_ground.wrl')

video = viz.add('VideoCamera.dle')
webcam = video.addWebcam()

def setBackgroundTexture(tex):
	background = viz.addRenderNode()
	background.setHUD(0,100,0,100,True)
	background.setOrder(viz.PRE_RENDER)
	background.texture(tex)
	viz.MainWindow.setClearMask(viz.GL_DEPTH_BUFFER_BIT)
	
setBackgroundTexture(webcam)
Reply With Quote