From: Angus Dorbie (dorbie++at++sgi.com)
Date: 03/15/2000 11:37:18
This may be caused by the application variables you use. The contexts
are completely separate though.
You should make sure that each draw process has it's own set of
variables (if you use any) and that the code just assumes that ity can
treat each draw process in isolation. Make sure you create the TLUT in
each draw process and make the enable calls and disable calls in each
draw process also, the separate variables should ensure that the draws
don't step on each others toes. For example, the following draw callback
would be really bad if enabled yet existed in shared memory:
{
if(!*enabled_yet)
{
*enabled_yet = 1;
glEnable();
}
}
{
if(*enabled_yet)
{
*enabled_yet = 0;
glDisable();
}
}
You resolve this by either removing the need for a test, creating an
array of variables indexed by pipe number or making sure the test
variable is created off the heap for each draw not the shared arena.
Cheers,Angus.
christopher.g.dorosky++at++lmco.com wrote:
>
> Sorry for the repeat post, but I am still having trouble.
>
> In my scene, there is a terrain node which has all of the terrain data.
> There are also various 3D models.
> The source data for the terrain is greyscale. The source for the models is
> color.
> I can apply a color LUT to the terrain data, and get good results. I do not
> want to apply the LUT to the models, because colorizing a color model has
> bad results.
>
> A solution, on a single pipe system, is to set up a color-LUT, and
> selectively enable and disable it.
>
> Since all terrain is under one node, applying a pre-draw and post-draw
> callback that glEnables and glDisables GL_TEXTURE_COLOR_TABLE_SGI works
> fine. The idea is that before terrain is drawn, the table is turned on, and
> when terrain is done, the LUT is turned off. This works great on a one pipe
> system.
>
> On a two pipe system, I have not figured out how to make the system
> understand the pipe context for the LUT's.
>
> On a previous query, I got the response: "
> > Each pipe should do this in a draw callback and it will just work. The
> > pipes and contexts have separate state information, the draw processes
> > and callbacks will operate on the current context on each pipe. "
> >
> However, what I see when running on two pipes, is intermittent color-to-grey
> flashing of the terrain.
> The pre and post draw callbacks appear to be running on both pipes.
> If I place
> if (!glIsEnabled(GL_TEXTURE_COLOR_TABLE_SGI)) { printf("table was already
> off!!\n"); fflush(stdout); }
> in the post draw callback, I get printouts at each flash (can happen several
> times a second, but usually once every several seconds).
>
> I have not successfully told the two pipes how to use or not use the LUT
> without shutting it off for the other pipe.
>
> Has anybody else run into this?
>
> Christopher Dorosky
> Senior Electronic Systems Engineer - Real Time Simulation
> Lockheed Martin Missiles and Fire Control - Dallas
> christopher.g.dorosky++at++lmco.com
> 972-603-2349
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
-- For Performer+OpenGL tutorials http://www.dorbie.com/"In the middle of difficulty lies opportunity." --Albert Einstein
This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 11:37:26 PST