Re: [Plib-users] plib and shadows
Brought to you by:
sjbaker
|
From: Steve B. <sjb...@ai...> - 2002-06-13 23:36:35
|
> I'm still trying to get shadows. > Now I reduced the code so that stencil buffer is not (yet) used, I just want > to see the projection of my scene to the ground. > There is a callback function for predraw which is being called. > I tried two ways : > - use a glMultMatrixf((GLfloat *) floorShadow) in the callback function, > where floorShadow is the projection matrix You can't do that because SSG culls the scene to the view frustum prior to drawing it - so if you go and change the transforms without SSG knowing about it, you'll get into problems. > - use a setTransform(floorshadow) before calling ssgCullAndFace > Both don't show a projection, the second shows parts of the scene at a > different place. > My guess is the first is superseded by ssg functions and the second is a > transformation but not a projection. Could that be ? Yes - transforms are limited to rotates and translates. It's not possible to do bounding sphere culling when the transform is not shape-preserving. ----------------------------- Steve Baker ------------------------------- Mail : <sjb...@ai...> WorkMail: <sj...@li...> URLs : http://www.sjbaker.org http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net http://freeglut.sf.net http://toobular.sf.net http://lodestone.sf.net |