Commit Graph

10286 Commits

Author SHA1 Message Date
Robert Osfield
6b9bbc7ca9 From Wang Rui, "The OSG book I'm working on will focus on helping beginners build
latest OSG source code with Visual Studio 2010 express, without
setting too many options and without facing unexpected errors. But at
present, the compilation process will fail because the INSTALL project
'cannot find' generated DLLs while copying files. I have looked into
the build directory and found that the places of generated file
folders were just different from previous VS versions. In this case,
the old hack in OsgMacroUtils.cmake may become invalid:

MACRO(HANDLE_MSVC_DLL)
       #this is a hack... the build place is set to lib/<debug or
release> by LIBARARY_OUTPUT_PATH equal to OUTPUT_LIBDIR
       #the .lib will be crated in ../ so going straight in lib by
the IMPORT_PREFIX property
       #because we want dll placed in OUTPUT_BINDIR ie the bin folder
sibling of lib, we can use ../../bin to go there,
       ...
       ELSE(NOT MSVC_IDE)
           SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX
"../../bin/${LIB_PREFIX}${LIB_SOVERSION}-" IMPORT_PREFIX "../")
       ENDIF(NOT MSVC_IDE)
ENDMACRO(HANDLE_MSVC_DLL)

Here the prefix "../../bin" may need to be fixed. I just modified it to:

IF(MSVC_VERSION LESS 1600)
    SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX
"../../bin/${LIB_PREFIX}${LIB_SOVERSION}-" IMPORT_PREFIX "../")
ENDIF()

It should keep compatible with old MSVC versions. There are similar
fixes in the SETUP_PLUGIN and SETUP_EXE macros. I haven't tested them
on more platforms.
"
2010-04-20 16:27:54 +00:00
Robert Osfield
5e70c17f2a From Serge Lages, "Currently if multiple event callbacks are nested on one node, only the first will be called. The proposed fix checks if there is a nested callback." 2010-04-20 13:52:28 +00:00
Robert Osfield
3bef6f9eae Implemented Colin MacDonald's recommended change of "unsigned short" to "unsigned" to solve big endian problem under Solaris.
Also added comment to highlight the oddity of the mixing of types in the associated lib3ds code.
2010-04-20 13:34:57 +00:00
Robert Osfield
2c64536a09 Replaced tabs with four spaces 2010-04-20 11:38:38 +00:00
Robert Osfield
5a50387eb9 UPdated wrappers 2010-04-20 11:34:19 +00:00
Robert Osfield
31e8e37dbd From Jason Beverage, "Here is a fix to the curl plugin CMake to allow it to link against the
CURL_LIBRARY_DEBUG and ZLIB_LIBRARY_DEBUG.  Previously it linked the
debug version against the release libs, which was causing a hang when
running in debug mode on Windows."
2010-04-20 11:23:08 +00:00
Robert Osfield
6a73dfc193 From Farshid Lashkari, "Anaglyphic stereo does not seem to work properly when performing pre-render stages. I believe the reason is that the pre-render stages are performed with the last applied color mask, which is cyan. I've fixed this by resetting the color mask before performing the pre-render stages." 2010-04-20 11:13:27 +00:00
Robert Osfield
eef7da35d1 Fixed the background quad size to fit all the camera stats labels 2010-04-20 11:05:22 +00:00
Robert Osfield
7c38643a77 From Tim Moore, "I noticed that the "Materials" statistic in the camera scene stats display seemed to be identical to the number of drawables. In fact, it displays the nummat member of osgUtil::Statistics, but that variable has nothing to do with materials. nummat tracks the number of matrices associated with Drawable objects in a RenderBin; as I understand it, Drawables pretty much always have a model-view matrix tied to them in RenderBins, so this statistic doesn't seem very useful. So, I added statistics for the number of StateGraph objects in RenderBins and also for the number of Drawables in the "fine grain ordering" of RenderBins. The latter corresponds to the number of Drawables in the scene that are sorted by some criteria other than graphics state; usually that is distance for semi-transparent objects, though it could be traversal order. These two statistics give an idea of the number of graphic state changes happening in a visible scene: each StateGraph implies a state change, and there could be a change for each sorted object too. You can also subtract the number of sorted Drawables from the total number of Drawables and get an idea of how many Drawables are being drawn for each StateGraph.
"
2010-04-20 10:59:44 +00:00
Robert Osfield
92a6b0020d Changed the AbmientBias type from Vec2d to Vec2 as use of double is inappropriate. 2010-04-20 10:35:33 +00:00
Robert Osfield
a8c4fd8761 From Wang Rui, "The new osgShadow and osgFX serializers are attached, and some
modifications of the osgShadow header naming styles as well. The
osgDB::Serializer header is also changed to add new Vec2 serializer
macros because of the needs of osgShadow classes. It should compile
fine on both Windows and Linux. But I have only done a few tests to
generate .osgb, .osgt and .osgx formats with these new wrappers."
2010-04-20 10:29:04 +00:00
Robert Osfield
a0781cba6c From Mourad Boufarguine, "This submission fixes osgDAE::toString(*) unresolved external symbols compile errors (on VS)." 2010-04-20 09:48:45 +00:00
Robert Osfield
b1658ee6df From Farshid Lashkari, "I noticed that osg::State::getInitialViewMatrix returns the monocular view matrix when rendering in stereo. I've made some changes to osgUtil::RenderStage & SceneView so that it will return the correct view matrix depending on which eye is currently being rendered." & "I made a small change to the previous patch so that osg::State::getInitialViewMatrix works correctly with pre/post render stages as well." 2010-04-19 14:49:42 +00:00
Robert Osfield
c091b5c2d1 From Stephan Huber and Mathieu Marache, "attached you'll find framework support for os x via cmake. Please credit
Mathieu Marache, he added the last missing piece to this puzzle.

I think it is safe to commit these changes to trunk, as the traditional
way via dylibs should work as before.

Here's some more info how to get frameworks:

With these modifications it is possible to compile frameworks on OS X,
when you set the Cmake-option OSG_COMPILE_FRAMEWORKS to true. If you
want to embed the frameworks in your app-bundle make sure to set
OSG_COMPILE_FRAMEWORKS_INSTALL_NAME_DIR accordingly.

You'll have to build the install-target of the generated xcode-projects
as this sets the install_name_dirs of the frameworks and plugins."
2010-04-19 13:44:42 +00:00
Robert Osfield
a8332528f4 From Martins Innus,"Here's a fix to allow the serializer to compile on the Mac 10.4 SDK. The definition of GLint seems to be different accross the SDKs. Its defined as "long" in 10.4. I have no idea if this is the correct way to go about this, but it compiles on my end." 2010-04-19 12:09:21 +00:00
Robert Osfield
c0e9fcbb67 From Tim Moore, "This contains a couple of fixes to support changing FrameBufferObject configurations on the fly; the user changes the camera attachments and calls Renderer::setCameraRequiresSetUp(). The major part of this submission is a comprehensive example of setting up floating point depth buffers. The user can change the near plane value and cycle through the available combinations of depth format and multisample buffer formats." 2010-04-19 11:43:06 +00:00
Robert Osfield
488eac94f7 From Wang Rui, "Attached is the osgAnimation wrappers for serialize IO operations. A
few headers and the osgAnimation sources are also modified to make
everything goes well, including:

A new REGISTER_OBJECT_WRAPPER2 macro to wrap classes like
Skeleton::UpdateSkeleton.
A bug fix in the Seralizer header which avoids setting default values
to objects.
Naming style fixes in osgAnimation headers and sources, also in the
deprecated dotosg wrappers.
A bug fix for the XML support, to write char values correctly.
A small change in the osg::Geometry wrapper to ignore the
InternalGeometry property, which is used by the MorphGeometry and
should not be set by user applications.

The avatar.osg, nathan.osg and robot.osg data files all work fine with
serializers, with some 'unsupported wrapper' warnings when converting.
I'm thinking of removing these warnings by disabling related property
serializers (ComputeBoundingBoxCallback and Drawable::UpdateCallback),
which are seldom recorded by users.

By the way, I still wonder how would we handle the C4121 problem,
discussed some days before. The /Zp compile option is set to 16 in the
attached cmake script file. And is there a better solution now?"
2010-04-19 10:35:18 +00:00
Robert Osfield
6ec106b31a From Paul Martz, fixes for static build 2010-04-19 09:39:39 +00:00
Stephan Maximilian HUBER
3b3e8459e2 From Stephan Huber: updated XCode project 2010-04-19 08:41:00 +00:00
Robert Osfield
70d78c0713 From Colin McDonald, "The new 3ds plugin isn't working at all on big-endian machines, due to
a byte order issue.

The problem is that osg::SwapBytes code has been copied from the old
plugin to the new one, but the latest lib3ds also incorporates code to
handle byte ordering in read & writing.  So the net result is that the
swap is done twice.

The solution is simply to remove the custom osg code, and use the
stock lib3ds code.  The attached files are against today's revision
11331.  I've tested on Sparc & Intel.
"
2010-04-15 18:40:40 +00:00
Robert Osfield
51d377c9f6 Ran dos2unix on header files 2010-04-15 18:38:32 +00:00
Robert Osfield
6b73cef997 Ran dos2unix on lib3ds files 2010-04-15 18:38:03 +00:00
Robert Osfield
7ee549bb06 From J.P. Delport, Fix for invalid iterator dereference in DatabasePager. 2010-04-15 12:51:41 +00:00
Robert Osfield
3700263e08 From Sukender, "After discussion with Paul Martz, here is a fix for 3DS reader/writer (on rev. 11315) + some changes. Changelog:
- Fixed handling of MatrixTransforms (still doesn't support other Transforms types). Fixes things for OSG, DeepExploration, 3DSMax...
- Added support for writing double precision vertices by converting them.
- Added base code for future compatibility option (3rd-party apps that don't read animation data). See "DISABLE_3DS_ANIMATION" compile flag."
2010-04-15 11:49:33 +00:00
Robert Osfield
31ec835002 From Jason Beverage, "Here is a small fix to the DatabasePager to fix a crash if you were
running with the OSG_NOTIFY_LEVEL set to INFO.

An iterator was being erased, and then referenced to display a
message.  Just changed it to display the message first, then erase."
2010-04-15 11:45:10 +00:00
Robert Osfield
7db9f18619 From Chris Hanson, build fixes for Solaris-64 2010-04-15 11:41:37 +00:00
Robert Osfield
72e6867679 Changed std::pair declaration to ListTriangle::value_type to avoid Solaris compile errors 2010-04-15 11:40:49 +00:00
Robert Osfield
9045d03a0b Removed the setting of the DatabasePager thread affinity, and moved the setting of the DatabasePager thread priotity to after the creation of the threads 2010-04-15 11:02:22 +00:00
Michael PLATINGS
d5fafcecbd Updated the plugin to be compatible with version 2011.2 of the FBX SDK 2010-04-14 16:43:50 +00:00
Robert Osfield
b6a5754127 Added minimum frame delay of 1/100th second when using
on demand rendering to avoid creating a CPU lock.
2010-04-14 13:39:43 +00:00
Robert Osfield
9df9778658 Updated wrappers 2010-04-14 10:43:16 +00:00
Robert Osfield
c69ddd6bd5 Added BufferData::ModifiedCallback to provide a mechanism for tracking when a osg::Image::dirty() has been called to signify that an image has been modified. 2010-04-13 18:42:58 +00:00
Michael PLATINGS
8e53cfe6fc Added support for double precision geometry 2010-04-13 14:50:31 +00:00
Robert Osfield
88f1b8f19a From Michael Platings with tweaks from Robert Osfield, added Options::s/getPrecisionHint(..) to allow apps to hint to plugins about how to handle double precision geometry data. 2010-04-13 13:06:27 +00:00
Robert Osfield
51924431cd Fixed warnings 2010-04-13 09:42:53 +00:00
Robert Osfield
ccd34b375b updated wrappers 2010-04-13 09:42:36 +00:00
Michael PLATINGS
25cd2970c5 osgAnimation now stores times as doubles 2010-04-12 16:35:15 +00:00
Michael PLATINGS
5d64318597 From Sukender: Fixed FBX writer: now handles double precision arrays (vertices, normals, texcoords) 2010-04-12 15:04:25 +00:00
Robert Osfield
fccda08491 Added corner dirty options to TerrainTechnique, added experimental code paths in GeometryTechnique for accounting for neighbouring corner tiles - optionally compiled out in this check-in.
Changed the normal computation in GeometryTechnique so that it doesn't include diagonals, thus avoid normal jumps at corners.
2010-04-09 08:52:40 +00:00
Robert Osfield
d992f6e018 Updated wrappers 2010-04-03 16:26:32 +00:00
Robert Osfield
c6c26d5d44 Change Terrain so that it subclassed from CoordinateSystemNode.
Implemented new update scheme of GeometryTechnique to avoid potential threading issues.

Added Terrain support to .ive.
2010-04-03 16:21:34 +00:00
Robert Osfield
656efbf03f Removed getNeighbours() method to avoid problems with introspection wrappers 2010-04-01 21:18:39 +00:00
Robert Osfield
47cdee3611 Removed TerrainNeightbours class from wrapping to avoid associated build errors 2010-04-01 21:15:17 +00:00
Robert Osfield
a8bbf0a809 Added support for boundary equalization to GeometryTechnique 2010-04-01 21:06:56 +00:00
Robert Osfield
15afc29018 Added window size event handler 2010-04-01 21:04:36 +00:00
Robert Osfield
31e526f253 Added TerainHandler event handler to provide 'v'/'V' and 'r'/'R' key controls for change vertical scale and sample ratio respectively. 2010-03-29 08:49:20 +00:00
Robert Osfield
8547536387 From Jean-Sebastien Guay, "When the StatsHandler tries to find a context to add itself to, it will first look for a GraphicsWindow, and if none is found it will look for a GraphicsContext. This enables apps that do all their rendering to offscreen contexts (pbuffer) to still use the StatsHandler." 2010-03-26 11:09:10 +00:00
Robert Osfield
7fd81fdd06 Updated wrappers 2010-03-26 11:07:43 +00:00
Robert Osfield
3f39a66035 From Jim Brooks, fix for FreeBSD build where FIND_LIBRARY(DL_LIBRARY..) return NOT_FOUND. 2010-03-26 09:01:49 +00:00
Cedric Pinson
d218032448 Fix compile issue t = fmod(t, (float)_duration); 2010-03-25 20:20:10 +00:00