Black screen with OpenPerformer

Eric Sandall <[email protected]>
Newsgroups gmane.comp.graphics.chromium.user
Message-ID <[email protected]>
Hey all,

I am having a problem when using Chromium 1.9 and SGI's OpenPerformer 3.2.2. 
When we run our program with the attached tiles.conf and vrcim.in (I am aware 
the tiles.conf isn't entirely configured from vrcim.in ;), my first intention 
was to get the program working, then I'll clean (I am also aware this doesn't 
always happen :)). When we try to run our program, our expected output 
windows are opened on the tiles, but then a black window is opened above 
them. We can move these windows out of the way, but this is very 
inconvenient. I am not sure where they are coming from, so any hints on where 
I can look to find out or others who have experienced this would be much 
appreciated.

Thank you,

-sandalle

-- 
Eric Sandall                     |  Source Mage GNU/Linux Developer
[email protected] PGP: 0xA8EFDD61  |  http://www.sourcemage.org/
http://eric.sandall.us/          |  http://counter.li.org/  #196285

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Chromium-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chromium-users
tiles.conf (application/x-python, 8.6 KB)
#!/usr/bin/python

#
# Copied from http://www.cs.utk.edu/~seelab/powerwall/files/tiles.conf
#

# -----------------------------------------------------------------------------
# SETUP
# -----------------------------------------------------------------------------
import sys
import os
import string

# OpenGL Application might need head node to be DISPLAY :0
os.environ['DISPLAY'] = ':0.0'

# -----------------------------------------------------------------------------
# OPTIONS
# -----------------------------------------------------------------------------
crsite_file = sys.argv[1]

# -----------------------------------------------------------------------------
# CRSITE
# -----------------------------------------------------------------------------
if not os.access (crsite_file, os.F_OK):
   print '%s cannot read file %s.' % (sys.argv[0], crsite_file)
   sys.exit (1)

f = open (crsite_file, 'r')
exec (f.read())
f.close()

# fetch environment for Chromium based on environment
cr_path = crsite["chromium"]
os.environ['LD_LIBRARY_PATH'] = cr_path + '/lib/Linux'

sys.path.append (cr_path + "/mothership/server")
from mothership import *
import crmatrix

# -----------------------------------------------------------------------------
# CHROMIUM STUFF
# -----------------------------------------------------------------------------
# create mothership
cr = CR()
cr.MTU (4098 * 2048)

TILE_COLS = 2  # don't change these unless you overhaul LayoutTiles()
TILE_ROWS = 1
TILE_WIDTH = 1280
TILE_HEIGHT = 1024
# 1280x1024 for wall
# MAX_WALL_WIDTH = 2560 * (4.699m/6.096m) = 1973.33
# MAX_TILE_WIDTH = MAX_WALL_WIDTH - 1280 = 693
# 1696x480 for helmet
MAX_WALL_WIDTH = 1973
MAX_TILE_WIDTH = 738
MAX_TILE_HEIGHT = 1024
EYE_NAMES = [ "left", "right" ]

HELMET_RESOLUTION = [0, 480, 1696, 480]

BLEND = 'blend' # 'knockout' or 'blend'
REASSEMBLE = 0   # use readback SPUs and downstream render SPU
RENDER_BACK = 0  # render back into app window
RESIZABLE = 0    # track client window size changes
FULLSCREEN = 0
BORDERLESS = 1
DLIST_BBOX = 1
LAZY_DLIST = 1

# This is a callback which we register with spu.TileLayoutFunction()
def LayoutTiles(muralWidth, muralHeight):
	"""Return list of tuples of new tiles for the given mural size.
	Each tuple is of the form (serverIndex, x, y, width, height)."""

	if muralWidth > MAX_TILE_WIDTH * TILE_COLS:
			print "Warning: mural size is too wide!"
			muralWidth = MAX_TILE_WIDTH * TILE_COLS
	if muralHeight > MAX_TILE_HEIGHT * TILE_ROWS:
			print "Warning: mural size is too tall!"
			muralHeight = MAX_TILE_HEIGHT * TILE_ROWS

	# two tiles
	w = muralWidth / 2
	h = muralHeight / 2
	# (server, x, y, w, h)
	t0 = (0, 0, 0, w, h) # left
	t1 = (0, MAX_TILE_WIDTH, 0, muralWidth - w, h) # right

	tiles = []
	tiles.append(t0)
	tiles.append(t1)
	return tiles

# -----------------------------------------------------------------------------
# HANDLE LOCAL APPLICATIONS
# -----------------------------------------------------------------------------
render_nodes = crsite["render_nodes"]

for local in crsite["local_run"]:
  machine = render_nodes[local[0] - 1][0]
  os.system('/usr/bin/ssh ' + machine + ' "/bin/sh -c \'source $HOME/.bashrc; ' + local[1] + '\'" &')
  os.system('sleep 1')

# -----------------------------------------------------------------------------
# HANDLE CLIENT NODE
# -----------------------------------------------------------------------------
for client in crsite["client_nodes"]:
  # setup a tilesort SPU
  tilesort_spu = SPU ('tilesort')
  tilesort_spu.TileLayoutFunction( LayoutTiles )
  tilesort_spu.Conf('bucket_mode','Frustum')
  tilesort_spu.Conf('auto_dlist_bbox',DLIST_BBOX)
  tilesort_spu.Conf('lazy_send_dlists',LAZY_DLIST)
  tilesort_spu.Conf('stereo_mode', "Passive")

  # If one monitor, turn off sync for performance
  if len(client[2]) == 1:
    tilesort_spu.Conf('sync_on_swap', 0)
    tilesort_spu.Conf('sync_on_finish', 0)

  # setup a client/application node
  client_node = CRApplicationNode (client[0])
  client_node.Conf('track_window_visibility',1) # Useful for Performer to clean up temporary windows
  client_node.Conf('track_window_size', RESIZABLE)

  # set starting directory and executable for client
  client_node.StartDir(client[3])
  client_node.SetApplication (client[4])
  #client_node.AddSPU (tilesort_spu)

  client_node.AutoStart ('/usr/bin/ssh ' + client[0] + ' /bin/sh -c \'source $HOME/.bashrc; ' + cr_path + '/bin/Linux/crappfaker\'')
  client_node.AddSPU (tilesort_spu)

  if client[5] != 0:
    client_node.Conf ('match_window_count', client[5])

  # Create the render SPU and node outside of the loop
  if REASSEMBLE:
	# Setup render display
	render_node = CRNetworkNode(client[0])
	render_node.Conf ('shared_windows', 1)

	# Setup render SPU
	render_spu = SPU ('render')
	render_spu.Conf ('track_window_visibility',1) # Useful for Performer to clean up temporary windows
	render_spu.Conf ('display_string', ':0.0')
	render_spu.Conf ('render_to_app_window', RENDER_BACK )
	render_spu.Conf ('ontop', 1)
	if FULLSCREEN:
		render_spu.Conf ('fullscreen', FULLSCREEN )
	else:
		# window_geometry ( x, y, w, h )
		render_spu.Conf ('window_geometry', HELMET_RESOLUTION )
	render_spu.Conf ('borderless', BORDERLESS )
	render_spu.Conf ('resizable', RESIZABLE )
	render_spu.Conf ('only_swap_once', 1 )

	# Add the render SPU to the render node
	render_node.AddSPU ( render_spu )

	# Add the render node to Chromium
	cr.AddNode ( render_node )
	render_node.AutoStart ('/usr/bin/ssh ' + client[0] + ' source $HOME/.bashrc && crserver')

# -----------------------------------------------------------------------------
# HANDLE RENDERING NODES
# -----------------------------------------------------------------------------
  for row in range(TILE_ROWS):
    index = 0
    for col in range(TILE_COLS-1,-1,-1):
      for eye in range(2): # starts at 0
        machine = render_nodes[index]

       	# each tile will do some rendering
       	# set up a rendering node
	node = CRNetworkNode (machine[0])
	# AddTile ( x, y, TILE_WIDTH, TILE_HEIGHT )
	node.AddTile( col*MAX_TILE_WIDTH, (TILE_ROWS-row-1)*TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT )

	if REASSEMBLE:
		# Set the render nodes to send their data back to the client
		readbackspu = SPU( 'readback' )
		if FULLSCREEN:
			readbackspu.Conf ('fullscreen', FULLSCREEN )
		else:
			# window_geometry ( x, y, w, h )
			readbackspu.Conf( 'window_geometry', [0, index * (MAX_TILE_HEIGHT), 2 * TILE_WIDTH, TILE_HEIGHT] )
		readbackspu.Conf ('borderless', BORDERLESS )
		readbackspu.Conf( 'extract_alpha', 0 )
		readbackspu.Conf( 'extract_depth', 0)
		readbackspu.Conf('track_window_visibility',1) # Useful for Performer to clean up temporary windows
		readbackspu.Conf( 'title', 'readback SPU %d' %index )
  
		# Add the readback SPU to the node
		node.AddSPU( readbackspu )

		packspu = SPU( 'pack' )
		node.AddSPU( packspu )
		node.AutoStart ('/usr/bin/ssh ' + machine[0] + ' source $HOME/.bashrc && crserver')
		packspu.AddServer( render_node, protocol='tcpip' )
	else:
		render_spu = SPU( 'render' )
		render_spu.Conf('track_window_visibility',1) # Useful for Performer to clean up temporary windows
		render_spu.Conf ('ontop', 1)
		if FULLSCREEN:
			render_spu.Conf ('fullscreen', FULLSCREEN )
		else:
			# window_geometry ( x, y, w, h )
			render_spu.Conf ('window_geometry', [0, 0, TILE_COLS * MAX_TILE_WIDTH, TILE_ROWS * MAX_TILE_HEIGHT] )
		render_spu.Conf ('borderless', BORDERLESS )
		render_spu.Conf ('resizable', RESIZABLE )

		# Add the render SPU to the network node
		node.AddSPU (render_spu)

	tilesort_spu.AddServer (node, protocol='tcpip', port=7000 + index)
	node.Conf('optimize_bucket',0)
	node.Conf('overlap_blending',BLEND)
	node.Conf('stereo_view', EYE_NAMES[eye])
	node.AutoStart ('/usr/bin/ssh ' + machine[0] + ' source $HOME/.bashrc && crserver')
	# add rendering node to mothership
        cr.AddNode (node)

	# Increment to the next machine in the array
	index = index + 1

  cr.AddNode (client_node)

cr.Go()

# -----------------------------------------------------------------------------
# CLEAN UP
# -----------------------------------------------------------------------------
# Remove crserver, crappfaker, or opengl program
print "Killing"

#Kill all crserver and crappfaker
for client in crsite["client_nodes"]:
  #Connect to each server node and kill crserver
  for i in client[2]:
    os.system('/usr/bin/ssh ' + render_nodes[i-1][0] + ' killall -9 crserver')

  os.system('/usr/bin/ssh ' + client[0] + ' killall -9 crappfaker')
  program = string.split(client[4])
  os.system('/usr/bin/ssh ' + client[0] + ' killall -9 -e ' + program[0])

#Kill all programs that running locally on cluster
for local in crsite["local_run"]:
  machine = render_nodes[local[0] - 1][0]
  program = string.split(local[1])
  os.system('/usr/bin/ssh ' + machine + ' killall -9 -e ' + program[0])
vrcim.in (text/plain, 1.1 KB)
# For use with windows.conf.  Multi Tilesort and Application config

#Position, Size of monitor
a = [0, 0, 1400, 1050]

#Specifiy Programs (including input) and the Directories for the Programs
dir1 = '/home/chromium/VADE/'

app1 = dir1 + 'THIRD_PARTY/cr/bin/Linux/stereocube -s'

crsite = {
   # List of Boba cluster rendering machines
   "render_nodes"  : [['slave1', a, [0, 1050, 1400, 1050]],
                      ['slave2', a, [1400, 1050, 1400, 1050]],
                      ['slave3', a, [0, 0, 1400, 1050]],
                      ['slave4', a, [1400, 0, 1400, 1050]],
                     ],

   # Applications Nodes.  Format:
   # ['client_machine', [#_horizontal, #_veritcal], [render_nodes], 
   #   app_dir, app, window_count],
   "client_nodes"  : [['vr-master', [2, 2], [1, 2, 3, 4], dir1, app1, 1],
                     ],

   # Run a program locally on render node. Format:
   # [render_node, app]
   # To be fullscreen, the application must fit monitor size
   #"local_run"  : [[1, app1],
   #               ],
   "local_run"  : [
                  ],

   #Chromium directory
   "chromium"   : '/home/chromium/VADE/THIRD_PARTY/cr'
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.