Hi Steven,
thanks for reply. 
I tryed to add shadows on my scene copying the osgShadow demo example. When I 
clean&build the project, the make returns an error... I don't understand why. 
Can you help me? 

Here is the code I added to my project:

Code:
    int ReceivesShadowTraversalMask = 0x1;
    int CastsShadowTraversalMask = 0x2;

    osg::ref_ptr<osgShadow::ShadowedScene> shadowedScene = new 
osgShadow::ShadowedScene;
    shadowedScene->setReceivesShadowTraversalMask(ReceivesShadowTraversalMask);
    shadowedScene->setCastsShadowTraversalMask(CastsShadowTraversalMask);
    osg::ref_ptr<osgShadow::StandardShadowMap> st = new 
osgShadow::StandardShadowMap;
    shadowedScene->setShadowTechnique(st.get());
    shadowedScene->addChild(root);
    
    viewer.setSceneData(shadowedScene.get());




I alo removed a light, and added the one to shadoewScene and set a model to 
cast and receive shadows...
The make error is the following:
Linking CXX executable ../bin/Room
CMakeFiles/Room.dir/main.cpp.o: In function `main':
main.cpp:(.text+0x621): undefined reference to 
`osgShadow::ShadowedScene::ShadowedScene(osgShadow::ShadowTechnique*)'
main.cpp:(.text+0x698): undefined reference to 
`osgShadow::StandardShadowMap::StandardShadowMap()'
main.cpp:(.text+0x6d0): undefined reference to 
`osgShadow::ShadowedScene::setShadowTechnique(osgShadow::ShadowTechnique*)'
collect2: ld returned 1 exit status
make[2]: *** [bin/Room] Error 1
make[1]: *** [src/CMakeFiles/Room.dir/all] Error 2
make: *** [all] Error 2



I tryed to change ShadowTEcnhique but I obtain the same issue... :(

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36255#36255





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to