Re: [Plib-devel] Texture and blend modes
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-08-22 03:20:25
|
"Curtis L. Olson" wrote: > Let's see if I understand ... > > I am (by definition) not tweaking any states that ssg normally would > manage. Indeed. > But, since these states are grouped, and doing a > glPushAttribute() saves a whole slew of states, I may unwittingly > alter a state that ssg *does* manage as a side effect of my > glPopAttribute() Yes - by accidentally restoring it to the state BEFORE the most recent state->apply. > I'll give it a try in my sky code ... > > Here's what I get now: > > no matching function for call to `ssgEntity::hasState ()' > no matching function for call to `ssgEntity::getState ()' Doh! These are only members of ssgLeaf - general purpose entities don't have states unless they happen to be leaf nodes. > A check of ssg.h indicates that these are indeed not members of > ssgEntity. Yep. > But, the compiler lets me get away with this ... sound reasonable? > > ssgLeaf *f = (ssgLeaf *)e; > if ( f -> hasState () ) f->getState()->apply() ; Yep - so long as you only attach this callback to a leaf node. If you were playing it super-safe you could do an 'isAKindOf' test to check before you did the cast. > I'll play around with this some more. I'm still having a touch of bad > luck with GL_DEPTH_TEST, but I'm forcing this in other places in my > code too. Could be that I'm entering the code with it off and since > the sky code is actually preserving the state rather than turning it > [back] on when it is done, I could be exiting they sky rendering > section with the state set different now. Urrrggggg ... brainnn ... can't ... quite .... reach ... Hold on - it's coming <rumble> - yes - comprehension is dawning <creak> <rattle> <rattle> *POP* Yes. By doing this "right" you could actually be cancelling out one half of an elegant matched pair of antique Colonial bugs...which erm...greatly reduces their value. Hmmm - so this might mean that my explanation is not the right one (although it's still "TRUE" and must still be attended to). -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |