Hi Terry,

On Thu, 2005-07-07 at 16:26 -0500, Terry Welsh wrote:
> In order to do shadow mapping, I have to enable depth comparisons. 
> Since depth comparison OpenGL state is not wrapped by OpenSG, I have
> to use glTexParameteri to set it up the same way it is set up in
> ShadowMapViewport.  (I'm not using ShadowMapViewport because I need
> more flexibility, such as the ability to assign my shadow maps to
> shaders.)
> 
> mTexture->activate((DrawActionBase *)gSimpleSceneManager->getAction(), 0);
> 
> gives me a core dump because of the first line of TextureChunk::activate:
> 
> Window *win = action->getWindow();
> 
> assigns 0 to win.
> 
> I try running this code after my window is opened, but before the
> first frame is rendered.  Is there some additional set up that I need
> to do to make this work?  I can't think of anything I'm missing.

The Window in the Action is set by Window::renderAllViewports when you
do a normal rendering. If you need it outside, you have to set it
yourself (as one Action can be used for an arbitrary number of Windows,
the relation is transient). Just call action->setWindow() before your
Texture activation.

        Dirk




-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to