Jean Daigle (jaydee++at++thor.ats.qc.ca)
Thu, 16 Mar 1995 13:39:06 -0500
On Mar 16, 6:56pm, abrend++at++idt.unit.no wrote:
...
} I'm stuck! I have written a simple viewer using Performer and GL
} routines. These was written on an Indigo with Performer 1.2 and IRIS
} 5.3. Now I got to use an Onyx RE2 and my viewer stopped running. I
} think I'm doing something wrong when reading the input devices (mouse
} and keyboard). My app. runs just fine on the Indigo. What I do is
} this :
}
} qdevice(RIGHTMOUSE);
} qdevice(WINQUIT);
} qdevice(LEFTARROWKEY);
} qdevice(RIGHTARROWKEY);
} qdevice(DOWNARROWKEY);
} qdevice(UPARROWKEY);
} qdevice(PAGEUPKEY);
} qdevice(PAGEDOWNKEY);
} qdevice(HOMEKEY);
} qdevice(PADPLUSKEY);
} qdevice(PADMINUS);
} qdevice(PKEY);
}
} while (!done)
}
} {
} /* Go to sleep until next frame time. */
} pfSync();
}
} while (qtest())
} {
} short arg;
} switch (qread(&arg))
} {
} case (PAGEUPKEY):
} zDirection += step;
} break;
}
} case (PAGEDOWNKEY):
} zDirection -= step;
} break;
}
} .......
}
} }
} }
} }
}
} Do anyone do something similar ? What could be wrong ?
...
}-- End of excerpt from abrend++at++idt.unit.no
Just a quick note -- is your Onyx a multiprocessor model? If so,
the default Performer pfMultiprocess() setting will distribute the
processes over different CPU's.
In general, all your GL stuff (including qdevice() and qtest())
should be done in the DRAW process, rather than APP as I infer
from your code.
A good place to queue your device inputs is in the pipeline
configuration function. Input can subsequently be collected on
passes through the draw callback and passed back to the APP via
shared memory.
You can find sample code in
/usr/src/Performer/src/pguide/libpf/progs/complex.c
Your code works on the Indigo because there's only a single CPU
and Performer resorts to the PFMP_APPCULLDRAW model, which bundles
APP, CULL and DRAW into a single process with the same address
space. Specifying pfMultiprocess(PFMP_APPCULLDRAW) in your
code would also work on the Onyx, but ignores the glories of
SMP.
Cheers,
Jean Daigle.
-----------------------------------------------------------------
| Jean Daigle ATS Aerospace Inc. |
| Software Designer 1250 Boul Marie-Victorin |
| St. Bruno, QC J3V 6B8 |
| jaydee++at++ats.qc.ca Tel: (514) 441-9000 Fax: (514) 441-6789 |
-----------------------------------------------------------------
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:05 PDT