|
Revision 10234, 2.0 kB
(checked in by robert, 4 years ago)
|
|
From Roland Smeenk, "Attached you will find some changes to the dae plugin to improve light support.
-Changed the addition of lights to add the lightsource directly into the scenegraph (instead of below a switch node)
-All added lights are enabled in the root stateset and replace the head- or skylight.
(if no lights are available the head- or skylight will remain active)
-Ambient in osg::LightModel? is zeroed out. All ambient now comes from separate ambient only light sources.
-Lights can now be written properly
-Replaced strings by constants defined in the Collada DOM"
|
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 | IF (WIN32) |
|---|
| 2 | INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4 ${COLLADA_BOOST_INCLUDE_DIR} ) |
|---|
| 3 | ELSE () |
|---|
| 4 | INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4) |
|---|
| 5 | ENDIF () |
|---|
| 6 | |
|---|
| 7 | SET(TARGET_SRC |
|---|
| 8 | daeReader.cpp |
|---|
| 9 | daeRGeometry.cpp |
|---|
| 10 | daeRMaterials.cpp |
|---|
| 11 | daeRSceneObjects.cpp |
|---|
| 12 | daeRTransforms.cpp |
|---|
| 13 | daeWGeometry.cpp |
|---|
| 14 | daeWMaterials.cpp |
|---|
| 15 | daeWriter.cpp |
|---|
| 16 | daeWSceneObjects.cpp |
|---|
| 17 | daeWTransforms.cpp |
|---|
| 18 | domSourceReader.cpp |
|---|
| 19 | ReaderWriterDAE.cpp |
|---|
| 20 | ) |
|---|
| 21 | |
|---|
| 22 | SET(TARGET_H |
|---|
| 23 | daeReader.h |
|---|
| 24 | daeWriter.h |
|---|
| 25 | domSourceReader.h |
|---|
| 26 | ReaderWriterDAE.h |
|---|
| 27 | ) |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | IF(COLLADA_DYNAMIC_LIBRARY AND COLLADA_STATIC_LIBRARY) |
|---|
| 31 | OPTION(COLLADA_USE_STATIC "Set to ON to build OpenSceneGraph with static Collada support." OFF) |
|---|
| 32 | ELSEIF(COLLADA_STATIC_LIBRARY) |
|---|
| 33 | SET(COLLADA_USE_STATIC "YES") |
|---|
| 34 | ELSE() |
|---|
| 35 | SET(COLLADA_USE_STATIC "NO") |
|---|
| 36 | ENDIF() |
|---|
| 37 | |
|---|
| 38 | IF(COLLADA_USE_STATIC) |
|---|
| 39 | IF(WIN32) |
|---|
| 40 | ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB) |
|---|
| 41 | SET(TARGET_LIBRARIES_VARS |
|---|
| 42 | COLLADA_STATIC_LIBRARY |
|---|
| 43 | COLLADA_LIBXML_LIBRARY |
|---|
| 44 | COLLADA_ZLIB_LIBRARY |
|---|
| 45 | COLLADA_PCRECPP_LIBRARY |
|---|
| 46 | COLLADA_PCRE_LIBRARY |
|---|
| 47 | COLLADA_MINIZIP_LIBRARY |
|---|
| 48 | COLLADA_BOOST_FILESYSTEM_LIBRARY |
|---|
| 49 | COLLADA_BOOST_SYSTEM_LIBRARY) |
|---|
| 50 | ELSE() |
|---|
| 51 | SET(TARGET_LIBRARIES_VARS |
|---|
| 52 | COLLADA_STATIC_LIBRARY |
|---|
| 53 | COLLADA_LIBXML_LIBRARY |
|---|
| 54 | COLLADA_PCRECPP_LIBRARY |
|---|
| 55 | COLLADA_PCRE_LIBRARY |
|---|
| 56 | COLLADA_BOOST_FILESYSTEM_LIBRARY |
|---|
| 57 | COLLADA_BOOST_SYSTEM_LIBRARY) |
|---|
| 58 | ENDIF() |
|---|
| 59 | ELSE() |
|---|
| 60 | IF(WIN32) |
|---|
| 61 | ADD_DEFINITIONS(-DDOM_DYNAMIC -DBOOST_ALL_NO_LIB) |
|---|
| 62 | SET(TARGET_LIBRARIES_VARS |
|---|
| 63 | COLLADA_DYNAMIC_LIBRARY |
|---|
| 64 | COLLADA_BOOST_SYSTEM_LIBRARY) |
|---|
| 65 | ELSE() |
|---|
| 66 | SET(TARGET_LIBRARIES_VARS |
|---|
| 67 | COLLADA_PCRECPP_LIBRARY |
|---|
| 68 | COLLADA_PCRE_LIBRARY |
|---|
| 69 | COLLADA_DYNAMIC_LIBRARY |
|---|
| 70 | COLLADA_BOOST_FILESYSTEM_LIBRARY |
|---|
| 71 | COLLADA_BOOST_SYSTEM_LIBRARY) |
|---|
| 72 | ENDIF() |
|---|
| 73 | ENDIF() |
|---|
| 74 | |
|---|
| 75 | SET(TARGET_ADDED_LIBRARIES osgSim ) |
|---|
| 76 | |
|---|
| 77 | #### end var setup ### |
|---|
| 78 | SETUP_PLUGIN(dae dae) |
|---|