Hello, I’ve a problem using flattenStrong: I obtain the same performances with or without its invocation. It’s a simple application which creates a lot of cubes and then tries to flat them; where is my error? Here’s the code with resources. Very thanks!
from panda3d.core import TextureStage
from panda3d.core import loadPrcFileData
loadPrcFileData( '', 'want-pstats 1' )
loadPrcFileData( '', 'show-frame-rate-meter #t' )
import direct.directbase.DirectStart, itertools
base.disableMouse()
camera.setPosHpr( ( 20, -30, 50 ), ( 0, -48, 0) )
rootNode = render.attachNewNode( 'rootNode' )
for i, j in itertools.product( range( 40 ), range( 40 ) ):
model = loader.loadModel( 'cube' )
model.setPosHprScale( ( i, j, 0 ), ( 0, 0, 0 ), .4 )
model.setTexture( TextureStage( 'ts' ), loader.loadTexture( 'img.jpg' ) )
model.reparentTo( rootNode )
rootNode.flattenStrong()
run()