|
From: Joong Ho \(Johann\) W. <jh...@st...> - 2004-07-26 04:10:46
|
Hi,
I'm testing a combination of readback and tilesort SPUs, of which the
ultimate purpose is to let sort-last parallel apps be able to render on a
DMX mural display. I wrote a simple test script for the first step, which is
a very simple modification of simplemural.conf.
Simplemural.conf uses a tilesort SPU to render an app in two seperate
(possibly remote) windows.
My intension is just to add a readback SPU on top of the tilesort SPU. At
this stage, it has nothing to do with DMX.
What should be rendered must be the same as that of the original
simplemural.conf, but it is not.
SAME part of the application window is rendered on both of the crserver
windows, i.e. the left half.
Configuration for readback is the simplest, as will be shown below.
Mike Houston's guess is that there may be a bug in arguments for DrawPixels.
Even worse is that when the 'extract_depth' option is turned on, nothing is
drawn at all.
Below is my modified simplemural.conf script. Only a few lines related with
readbackSPU are added and without these, everything works fine.
Thanks in advance for any comment.
- johann.
---
import sys
sys.path.append( "../server" )
from mothership import *
if len(sys.argv) > 1:
demo = sys.argv[1]
firstExtra = 2
else:
demo = "bboxtest"
firstExtra = 1
# Collect remaining command line params as program options
ExtraOpts = ""
for arg in sys.argv[firstExtra:]:
ExtraOpts += " " + arg
cr = CR()
cr.MTU( 10*1024*1024 )
TILE_COLS = 2
TILE_ROWS = 1
TILE_WIDTH = 150
TILE_HEIGHT = 300
clientspuname = 'tilesort'
if clientspuname == 'pack' and TILE_ROWS*TILE_COLS != 1:
print >> sys.stderr, "You cant use the pack SPU with more than one
server."
sys.exit(0)
tilesortspu = SPU( clientspuname )
#tilesortspu.Conf('preserve_aspect_ratio', 1)
tilesortspu.Conf('bucket_mode', 'Uniform Grid')
tilesortspu.Conf('draw_bbox', 0)
tilesortspu.Conf('bbox_scale', 1.0)
tilesortspu.Conf('dlist_state_tracking', 0)
readbackspu=SPU('readback')
readbackspu.Conf('window_geometry', [ 500, 0, 300, 300 ] )
#readbackspu.Conf('extract_depth', '1')
clientnode = CRApplicationNode( )
clientnode.StartDir( crbindir )
clientnode.SetApplication( demo + ExtraOpts)
clientnode.AddSPU( readbackspu )
clientnode.AddSPU( tilesortspu )
for row in range(TILE_ROWS):
for col in range(TILE_COLS):
renderspu = SPU( 'render' )
renderspu.Conf( 'window_geometry', [col*(TILE_WIDTH+10),
1.1*row*TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT] )
node = CRNetworkNode( )
if clientspuname == 'tilesort':
node.AddTile( col*TILE_WIDTH,
(TILE_ROWS-row-1)*TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT )
node.Conf('optimize_bucket', 1)
#node.Conf('vertprog_projection_param', 'ModelViewProj')
node.AddSPU( renderspu )
cr.AddNode( node )
tilesortspu.AddServer( node, protocol='tcpip', port=7000 +
row*TILE_COLS + col )
cr.AddNode( clientnode )
cr.Go()
|