View Single Post
  #3  
Old 06-22-2009, 04:43 AM
Joran Joran is offline
Member
 
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
Hello,

This is the test script I use:

Code:
import viz

viz.MainView.setMatrix([ 0.995800, -0.029732, 0.086595, 0.000000,
  -0.000767, 0.943062, 0.332616, 0.000000,
  -0.091554, -0.331285, 0.939078, 0.000000,
  1.961064, 5.105468, -15.360188, 1.000000 ])
viz.go()
viz.mouse.setOverride(viz.ON)

beam = viz.add('box.wrl', scale=(10,1,1))
beam.addAction(vizact.spin(0, 1, 0, 30))

screen = viz.addTexQuad(scale=(10, 10,1))
screen.alpha(0.8)

imagelist = viz.cycle(['info/0100.png', 'info/0300.png', 'info/0400.png'])

def asyncTextureLoad():
	texture = viz.addTexture(imagelist.next(), resizeNPOT=False)
	screen.texture(texture)		

def onKeyDown(key):
	if key == ' ':
		viz.director(asyncTextureLoad)

viz.callback(viz.KEYDOWN_EVENT,onKeyDown)
The size of the texture is 1024 x 768. The filesize is around 450KB. I tried saving the files as a compressed DDS texture file, but it gives the same delay.

I am trying to port a C++ OpenSceneGraph program to Vizard. There I solved this problem by uploading the texture to the graphic card in a separate thread. Any ideas how to solve this with Vizard?

Greetings, Joran.
Reply With Quote