Fedback spu not always working with textures

"Volz, Bill (WRVO) (Bill.Volz)" <[email protected]> Mon, 18 Oct 2004 15:50:02 -0500
Newsgroups gmane.comp.graphics.chromium.user,gmane.comp.graphics.chromium.devel
Message-ID <5A4AB6EA1F66464EA8C427B72B10B5B00272C76E@bocnte2k2.hou150.chevrontexaco.net>
I have a problem using the feedback SPU. It works, but not the same way
as when CR is not running.

Here's the problem - I have a single rectangle that is rendered using
tiles of textures. This rectangle is outlined with a rectangle box and
each corner has a small cube "handle" for resizing the rectangle. I use
OGL names to identify if I clicked on the outline, one of the handles
(and which one) or the texture area.

I can click on the outline or the handles and I will get correct
feedback, but I get no feedback when I click on the textures.

When the app is run non-CR, all works fine (still under DMX). 

I've attached the config file for this app. This is running under DMX
using the latest code (version 1.2 downloaded two weeks ago). CR is
version 1.7 also downloaded two weeks ago. 

The machines are 6 dual proc AMD opteron, 8 GB Ram, FX3000G, GigE
network, each node dislaying into two 19" LCD at 1280 x 1024 each in a
total array of 3 rows of 4 LCD's.

 <<roamer.conf>> 
> William R Volz,  Senior Research Geophysicist
> 
> ChevronTexaco 
> Energy Technology Company
> Subsurface Characterization Business Line
> Interpretation Product Development & Support
> 4800 Fournace Place, Bellaire, TX, 77401
> Tel 713 432 6666  Fax 713 432 2536
> 
> <mailto:[email protected]>
> This message may contain confidential information that is proprietary
> to ChevronTexaco and is intended only for the use of the parties to
> whom it is addressed. If you are not an intended recipient, you are
> hereby notified that any disclosure, copying, distribution or use of
> any information in this message is strictly prohibited. If you have
> received this message in error, please notify me immediately at the
> telephone number noted above.
> 
>
roamer.conf (application/octet-stream, 4.4 KB)
# Copyright (c) 2001, Stanford University
# All rights reserved
#
# See the file LICENSE.txt for information on redistributing this software.

#
# This configuration file is meant to be used with DMX.
# When everything's set up correctly, you can just type type name of your
# OpenGL app and Chromium will work automatically on your DMX display.
# This is far nicer than manually starting crservers!
#
# Prerequisites:
#  1. Your ~/.crconfigs file needs to be setup.  Specifically, it needs a
#     line like this:
#        *  /usr/local/Chromium/cr/mothership/configs/autodmx.conf %m %p
#     This tells Chromium's libcrfaker to use the autodmx.conf config file
#     when running any application (indicated by *).  The %m is replaced by
#     a random mothership port.  The %p is replaced by the program name.
#
#  2. libGL.so and libGL.so.1 must be symlink to libcrfaker.so
#
#  3. The back-end/cluster machines must have the crserver binary in the
#     search path (typically /usr/local/bin or /usr/bin) and a properly
#     set LD_LIBRARY_PATH (you can tweak it below).
#
#  4. rsh to the back-end/cluster machines must work.
#
# How it works:
#  1. When the app starts, libcrfaker will fail to find the mothership on
#     its first try.  That'll signal it to search the .crconfigs file for
#     a mothership config to spawn.  libcrfaker will choose a random port
#     number for the mothership.
#
#  2. The mothership is spawned with autodmx.conf.  In turn, it uses rsh
#     to start up the crservers on the back-end machines.  Another random
#     port number is used for the crservers.
#
#  3. Control returns to libcrfaker where it proceeds to load the client-side
#     SPU chain (tilesort).  Then, control returns to the application.
#
# Notes:
#  1. We use random port numbers (within a reasonable range) so that multiple
#     GL apps can use DMX/Chromium simultaneously.  If we don't use random
#     numbers we'd need some sort of port broker (complicated).
#
#  2. You will need to tweak 'crdir' here:

# Change this line to the location of your Chromium installation.
#crdir = "/home/sourceforge/Chromium-dmx/cr"
crdir = "/local/lfs1/data/wrvo/dev/cr/cr-1.7"

import random
import sys
sys.path.append( crdir + "/mothership/server" )
from mothership import *

if len(sys.argv) < 3:
	print "Chromium mothership error: no program specified to run!"
	sys.exit(1)

mothershipPort = int(sys.argv[1])
program = sys.argv[2]

cr = CR()
cr.MTU( 10*1024*1024 )

# Call dmx_config to get information about the DMX tile layout.
import os
dmx = os.popen("%s/dmx_config 2>/dev/null"%crbindir).read()
if not dmx:
    print "Chromium mothership error: Chromium does not appear to have"
    print "Chromium mothership error: been compiled with DMX support."
    sys.exit(1)
dmx = eval(dmx)
if not dmx:
    print "Chromium mothership error: DMX does not appear to be running."
    sys.exit(1)

localHostname = os.uname()[1]

# choose random port for server communication
serverPort = random.randint(7000, 7100)

AUTOSTART = 1


# These values don't really matter!
TILE_WIDTH = 2560
TILE_HEIGHT = 1024

#array = SPU('array')
feedback = SPU('feedback')
#expando = SPU('expando')
#fps = SPU('fps')

tilesortspu = SPU('tilesort')
tilesortspu.Conf('use_dmx', 1)
tilesortspu.Conf('retile_on_resize', 1)  # the default
tilesortspu.Conf('bucket_mode', 'Non-Uniform Grid')

clientnode = CRApplicationNode( )
clientnode.SetApplication( program )
#clientnode.AddSPU( array )
clientnode.AddSPU( feedback )
#clientnode.AddSPU( expando )
#clientnode.AddSPU( fps )
clientnode.AddSPU( tilesortspu )
clientnode.Conf('track_window_size', 1)
clientnode.Conf('track_window_position', 1)

for tile in dmx:
    renderspu = SPU( 'render' )
    host = tile['display'].split(':')[0]
    renderspu.Conf('display_string', tile['display'])
    renderspu.Conf('render_to_app_window', 1)

    servernode = CRNetworkNode( host )
    servernode.AddTile( 0, 0, tile['width'], tile['height'])
    servernode.AddSPU( renderspu )

    # optimize_bucket is of no use w/ DMX.
    servernode.Conf('optimize_bucket', 0)
    servernode.Conf('use_dmx', 1)
    cr.AddNode( servernode )

    if AUTOSTART:
        servernode.AutoStart( ["/usr/bin/rsh", host,
                                "/bin/sh -c 'DISPLAY=:0.0  LD_LIBRARY_PATH=%s %s/crserver -mothership %s:%d'" % (crlibdir, crbindir, localHostname, mothershipPort) ] )

    tilesortspu.AddServer( servernode, protocol='tcpip', port=serverPort )

cr.AddNode( clientnode )
cr.Go( mothershipPort )