Gordon Tomlinson (gordon++at++paradigmsim.com)
Tue, 20 Jul 1999 15:51:39 -0500
Under OpenGL you use
glDepthFunc( zfunc );
glDisable( GL_DEPTH_TEST) ;
glEnable( GL_DEPTH_TEST) ;
G.
Jorge Valencia Loera wrote:
> Hi pf's,
>
> my configuration:
>
> Onyx
> 12 x R4440 CPUs
> 2 x RE2 w/ MCO on each pipe
> IRIX 6.5.3
> PF 2.2.4
> I use multiple processes, multiple channels, multiple pipes & I link my app
> using Iris GL.
>
> Does anybody know about performer functions (Libpr routines I guess) that
> can do the same work as the GL functions zbuffer() & zwritemask() ???
>
> I am working on a space simulation and I am trying to draw a background
> first (the sun, moon & earth) without writing into the depth buffer (to
> avoid problems w/ the shadow map when casting shadows) & on top of that draw
> a foreground (the space station)
>
> my scene graph is something like this:
> (use a regular font to see the scene graph)
>
> SCENE
> / \
> / \
> BG FG
> /\ \
> / |\ \
> / | \ \
> / | \ \
> STARS SUN MOON SPACE
> STATION
>
> The "background - foreground" effect is working fine but when I try to cast
> shadows I have some color corruption (there is some transparency appearing
> on the space station so that I can see my background through some objects)
> and the shadows are completely wrong!!! (I only see some sort of big
> randomized shadow on the screen)
>
> I guess it's because my background is still blowing up my depth buffer. If I
> remove the BG sub-tree from my scene graph then everything works fine.
>
> I use the following node callbacks for my BG node:
>
> // This function is called during traversal just before drawing a
> // celestial body node. Its purpose is to disable the writing to
> // the Z buffer.
> int
> BGPreDrawCB(pfTraverser *_trav, void *_data)
> {
> zbuffer( FALSE );
> zwritemask( 0 );
>
> return PFTRAV_CONT;
> }
>
> // This function is called during traversal just after drawing a
> // celestial body node. Its purpose is to enable the writing to
> // the Z buffer.
> int
> BGPostDrawCB(pfTraverser *_trav, void *_data)
> {
> zbuffer( TRUE );
> zwritemask( 0xFFFFFFFF );
>
> return PFTRAV_CONT;
> }
>
> I think that the internal libpr record concerning the graphics state is not
> updated due to the fact that I set the graphics state directly through the
> GL so may be libpr is making incorrect assumptions about the current
> graphics state.
>
> or am I doing something wrong?
> Is there a better way to do what I want to do?
> Does anybody know about something related to my problem
>
> Any help, comment,... will be really appreciated.
> Thank you.
>
> Jorge.
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
--Regards
Gordon.
Gordon Tomlinson | Multigen - Paradigm Inc Vega Software Engineer | Suite 400, 14900 Landmark Blvd Email: gordon++at++paradigmsim.com | Dallas, Texas 75240, USA Tel: 972 960 2301 | Fax: 972 960 2303 ______________________________________________________________
'Smoke me a kipper skipper, I'll be back for breakfast' ______________________________________________________________
640K of ram should enough for anybody. Bill Gates 1981
There is no reason anyone would want a computer in their home (Ken Olson, president of Digital Equip Corp 1977 ) ______________________________________________________________
HiUnder OpenGL you use
glDepthFunc( zfunc );
glDisable( GL_DEPTH_TEST) ;
glEnable( GL_DEPTH_TEST) ;
G.
Jorge Valencia Loera wrote:
Hi pf's,my configuration:
Onyx
12 x R4440 CPUs
2 x RE2 w/ MCO on each pipe
IRIX 6.5.3
PF 2.2.4
I use multiple processes, multiple channels, multiple pipes & I link my app
using Iris GL.Does anybody know about performer functions (Libpr routines I guess) that
can do the same work as the GL functions zbuffer() & zwritemask() ???I am working on a space simulation and I am trying to draw a background
first (the sun, moon & earth) without writing into the depth buffer (to
avoid problems w/ the shadow map when casting shadows) & on top of that draw
a foreground (the space station)my scene graph is something like this:
(use a regular font to see the scene graph)SCENE
/ \
/ \
BG FG
/\ \
/ |\ \
/ | \ \
/ | \ \
STARS SUN MOON SPACE
STATIONThe "background - foreground" effect is working fine but when I try to cast
shadows I have some color corruption (there is some transparency appearing
on the space station so that I can see my background through some objects)
and the shadows are completely wrong!!! (I only see some sort of big
randomized shadow on the screen)I guess it's because my background is still blowing up my depth buffer. If I
remove the BG sub-tree from my scene graph then everything works fine.I use the following node callbacks for my BG node:
// This function is called during traversal just before drawing a
// celestial body node. Its purpose is to disable the writing to
// the Z buffer.
int
BGPreDrawCB(pfTraverser *_trav, void *_data)
{
zbuffer( FALSE );
zwritemask( 0 );return PFTRAV_CONT;
}// This function is called during traversal just after drawing a
// celestial body node. Its purpose is to enable the writing to
// the Z buffer.
int
BGPostDrawCB(pfTraverser *_trav, void *_data)
{
zbuffer( TRUE );
zwritemask( 0xFFFFFFFF );return PFTRAV_CONT;
}I think that the internal libpr record concerning the graphics state is not
updated due to the fact that I set the graphics state directly through the
GL so may be libpr is making incorrect assumptions about the current
graphics state.or am I doing something wrong?
Is there a better way to do what I want to do?
Does anybody know about something related to my problemAny help, comment,... will be really appreciated.
Thank you.Jorge.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-----------------------------------------------------------------------
List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com-- Regards Gordon. Gordon Tomlinson | Multigen - Paradigm Inc Vega Software Engineer | Suite 400, 14900 Landmark Blvd Email: gordon++at++paradigmsim.com | Dallas, Texas 75240, USA Tel: 972 960 2301 | Fax: 972 960 2303 ______________________________________________________________ 'Smoke me a kipper skipper, I'll be back for breakfast' ______________________________________________________________ 640K of ram should enough for anybody. Bill Gates 1981 There is no reason anyone would want a computer in their home (Ken Olson, president of Digital Equip Corp 1977 ) ______________________________________________________________
This archive was generated by hypermail 2.0b2 on Tue Jul 20 1999 - 13:48:13 PDT