Axel,

I am on Windows but imho CMakeLists.txt should contain osgShadow among REQUIRED osg libs. See the example below:

#####################################################################################
cmake_minimum_required (VERSION 2.6)

set( APP_NAME my_applet )

project (${APP_NAME})

set( CMAKE_DEBUG_POSTFIX "d" )

find_package (OpenGL REQUIRED)
find_package (OpenSceneGraph REQUIRED osgDB osgViewer osgShadow osgText osgGA osgUtil )

include_directories (${OPENSCENEGRAPH_INCLUDE_DIR})

file(GLOB shader_files shaders/*.glsl shaders/*.frag shaders/*.vert data/*.glsl data/*.frag data/*.vert)
file(GLOB cpp_files *.cpp src/*.cpp)
file(GLOB h_files *.h src/*.h)

source_group("Shader Files" FILES ${shader_files} )

add_executable(${APP_NAME} ${cpp_files} ${h_files} ${shader_files} )

# CMAKE_DEBUG_POSTFIX works only for libs. Lets make executable suffixed also. set_target_properties( ${APP_NAME} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX} )

target_link_libraries( ${APP_NAME} ${OPENSCENEGRAPH_LIBRARIES} )
target_link_libraries( ${APP_NAME} ${OPENGL_LIBRARY} )
#####################################################################################

Cheers,
Wojtek

-----Original Message----- From: Axel Spirtaat
Sent: Wednesday, February 02, 2011 4:47 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Some question about osgShadow... can someone helpme?

Hi Wojtek,
thank you for reply and suggestions.

Wojciech Lewandowski wrote:
Axel,

Messages suggest that Linker cannot find symbols. Looks to me as missing
osgShadow lib in your make file.



I was supposing this, and of course I need to change the make file. Unfortunatelly, to create the make file I used the cmake, and my CMakeLists.txt contains the several lines of 4 CMakeLists.txt (openScenegraph 2.3.3, bullet physics 2.76, osgWorks and osgBullet). I checked the OpenSceneGraph's one, but seems that I haven't forgotten anything... seems. I also inclueded all #include <osgShadow/* lines of osgshadow to my main.cpp (the osgshadow app works properly). However, I enclose my CMakeLists.txt file if you have some second... or can you suggest me any other solution to solve this?



Wojciech Lewandowski wrote:
Axel,
For the small scene like yours simplest ShadowMap technique should be
sufficient. I am recomending it because, extending this technique to support
multiple lights will be easiest thing to do. Its still advanced stuff but
probably not that complex as extending other techniques. Basically you would need to multiply resources associated with shadows/light sources. So instead
of single resource of each type,  you will need array of  shadow cameras,
shadow textures, shadow texgens indexed by light ids.

Your modifications will mostly override ShadowMap::cull method. All
technique important work is done there. You will need to take most of the
code from this method (except first part traversing scene for main view
where shadows are applied) and put it into the loop iterating on all your
lightsources rendering neccessary shadows with their cameras and applying
proper texgens. And thats generally all whats needed in a shortcut.
Hopefully when you do this you will learn enough to hack other techniques...



These suggestions are really precious to me. I hope to solve the make problem to try my scene with one light and then try to implement your suggestions with multiple lights.
Thank you again

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




Attachments:
http://forum.openscenegraph.org//files/cmakelists_162.txt


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

Reply via email to