Re: pfHighlight

New Message Reply Date view Thread view Subject view Author view

Liu Xiaoyan (liuxy++at++nsrc.nus.sg)
Tue, 17 Mar 1998 19:35:48 +0800


Hi, thanks for your help. Unfortunately, it doesn't work for me.
Referring to your suggestion on my programming, I think it is better
for me to describe briefly what I'm doing.

I'm subclassing a class from pfDCS with intersection detection as
well. All these "getInto and goOut" and intersection code are called
from the "grabDCS::app(trav)" function.I understand that this may
not be a good way in Performer. But the pguide says it impossible
now to overload libpf's intersection or cull traversals. Or shall I
overload the "draw" functioin?

In fact, I'm programming this for a CAVE application. So it is a
multiprocess program and all the initialization are done by the library.

> > I just ran into a problem of pfHighlight, it doesn't work at all.
> > What I'm trying to do is to HighLight an object when the mouse is
> > inside its bounding box. It's coded inside a C++ class. I'm using
> > Performer 2.1 on Onyx2IR ( 2 graphics pipes).
void grabDCS::getInto(void)
{
  if (!inside) {
    printf("\n IN INININNNN*********"); // true

   pfHighlight *hl;
   hl = new pfHighlight;
   pfEnable(PFEN_HIGHLIGHTING);
   pfOverride(PFSTATE_ENHIGHLIGHTING | PFSTATE_HIGHLIGHT,PF_ON);
   hl->setMode(PFHL_BBOX_LINES);
   //hl->setMode(PFHL_LINES | PFHL_LINESPAT);
    hl->setColor(PFHL_FGCOLOR, 1.0f, 0.0f, 0.0f);
   hl->setColor(PFHL_BGCOLOR, 1.0f, 0.0f, 0.0f);
   hl->apply();
  }
}
> > void grabDCS::goOut(void) // remove highlight when mouse is outside
> > { pfDisable(PFEN_HIGHLIGHTING);
> > }
  
> Your geostate information probably doesn't have highlighting
> enabled so you need to override highlight state on after you
> enable in the pre draw then turn override off in the post draw
> callback.
>
> Also your methods look like application level code which is
> legal if you are running single threaded but very wrong if
> you run multiprocessed asumming you are using libpf not libpr
> and aren't calling these in and out methods from draw callbacks.
> You need to use draw callbacks if you aren't already.

I'm relatively new to Performer and have some questions about the basics
of it.
1. What's the relationship between pfPipe and hardware pipeline? For a
   performer application, which part of work is done in the hardware
pipe?
   What if I specify more than hw pipes in a program?
2. How to compile sample programs? I got the following message all the
time:
   Is there any dependency between the "Makefiles" under each directory?

     making OpenGL DSO version of fillstats.ogldso
     /usr/bin/cc -nostdinc -I/usr/include -mips2 -o32 -O -Olimit
2000 -MDupdate Makedepend -woff
    1685,515,608,658,799,803,852,1048,1233,1499 -o fillstats.dsocmd
fillstats.o -L/usr/lib -L/usr/lib/libpfdb -L/lib
    -all -lpf_ogl -lmpc -limage -
   ld: WARNING 134: weak definition of __ct__6pfVec3Fv in fillstats.o
preempts that weak definition in
   /usr/lib/libpf_ogl.so.
   ld: WARNING 134: weak definition of __ct__6pfVec4Fv in fillstats.o
preempts that weak definition in
   /usr/lib/libpf_ogl.so.
   ld: FATAL 9: I/O error (-lGLw): No such file or directory
   *** Error code 1
   smake: Error: 1 error
   *** Error code 2
   smake: Error: 1 error

3. When I run the "fog" sample, the window pops up and dies as:
   PF Debug/Resource: pfInitGfx() - Window "fog" has 23 bits
of depth buffer.
   PF Debug/Resource: pfInitGfx() - Window "fog" has 1 bits
of stencil.
   PF Debug/Resource: pfInitGfx() - Window "fog" has
multisample context with 8 samples.
   PF Notice: Radius: 0.649295
   PF Notice: Caught SIGCHLD. Exiting due to death
of child with pid 10878.
   What's the possibel cause?

Sincere thanks to all.

Liu Xiaoyan
***********************************************************************
Liu Xiaoyan National Supercomputing Research Center
Data Visualization Group http://www.nsrc.nus.edu.sg Tel:(65)7709267
***********************************************************************
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:02 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.