Commit Graph

5659 Commits

Author SHA1 Message Date
Robert Osfield
720551d549 From Michael Platings, Converted std::fstream/ifstream/ofstream to osgDB::fstream/ifstream/ofstream and
fopen to osgDB::fopen to facilitate support for wide character filenames using UT8 encoding.
2008-11-07 15:08:08 +00:00
Robert Osfield
0ccf7d8383 Converted tabs to four spaces 2008-11-07 15:01:15 +00:00
Robert Osfield
4f5379389d From Martins Innus, "Here is a fix to add requestWarpPointer for OS X. It seems to work for me, I just took what osgProducer had. These are updated files to 2.7.3" 2008-11-07 10:23:57 +00:00
Robert Osfield
20eba3fb74 Changed to using stdio.h. 2008-11-06 16:48:55 +00:00
Robert Osfield
566b4cd999 Updated wrappers 2008-11-06 14:56:31 +00:00
Robert Osfield
7b9474e33e Fixed constness of getTexture/getRenderBuffer() const and added non cost version. 2008-11-06 14:46:11 +00:00
Robert Osfield
b5aa966d12 From Michael Platings, "I've added functions to get the
texture, renderbuffer and other properties from a FrameBufferAttachment."
2008-11-06 14:29:35 +00:00
Robert Osfield
bfec6546ce From Thomas Wedner, "use osgViewer::CompositeViewer with several views. All views share
parts of their scene graphs. Within these common part some nodes have
event handlers which use the action adapter argument to the event
handler to determinate which view received the event.
Here is the problem, osgViewer::CompositeViewer::eventTraversal sets
the action adapter field in the EventVisitor always to the last view
which received an event, instead of using the view which actually
received the event, so determination of the correct view does not work.
I looked at the code a bit, and moved the code for setting the action
adapter to a IMO better place"
2008-11-06 13:57:14 +00:00
Robert Osfield
45c7ca720c Fixed IntersectionVisitor::accept(Camera) handling of relative Cameras. 2008-11-06 13:38:11 +00:00
Robert Osfield
2d10404a2f Added support for different pixel formats and datatypes in copyImage() method 2008-11-05 15:04:11 +00:00
Robert Osfield
766dcf4aeb Fixed return value of ArgumentParser::find() for when the search string is not found, the correct value is now -1. 2008-11-05 11:56:44 +00:00
Robert Osfield
822b1c9566 Added extra data types info to debug message 2008-11-05 10:29:45 +00:00
Robert Osfield
484ead14b5 Added Thread::Init() to CurrentThread 2008-11-05 10:27:49 +00:00
Robert Osfield
80a6e5eb2a Compiled fix for gcc 4.3.2 2008-11-04 16:31:47 +00:00
Robert Osfield
2f541fc076 Added GPL copyright notice 2008-11-03 16:55:06 +00:00
Robert Osfield
c73f33d27c Added handling of texture matrices and texture rectangles in InteractiveImageHandler 2008-11-03 16:31:44 +00:00
Robert Osfield
5e56fb6eb6 Added vnc plugin. 2008-11-03 15:57:21 +00:00
Robert Osfield
70e1c60819 Added sendPointerEvent and sendKeyEvent virtual methods to osg::Image to
facilitate the subclassing of Image providing interactive behaviours so as
used in the vnc interactive VncImage class.

osgViewer::InteractiveImageHandler provides an event handler that convertes osgGA 
mouse and keyboard events into the coordinate frame of an image based on ray intersection with geometry in
the associated subgraph.

Changed the ordering of events processing in Viewer and CompositeViewer to allow
scene graph event handlers to take precidence over viewer event handlers and camera manipulators
2008-11-03 15:08:04 +00:00
Robert Osfield
4741893563 Changed Tiff plugin to link to TIFF_LIBRARIES to handle case where JPEG and ZLIB are dependencies. 2008-11-03 10:17:26 +00:00
Robert Osfield
ae61033a32 Removed renduent osgDB::Registry DatabasePager methods 2008-10-30 13:05:08 +00:00
Robert Osfield
3d07ab5664 Warning fixes 2008-10-29 11:15:33 +00:00
Robert Osfield
d7bc94d7cd Added missing implementations 2008-10-29 11:09:08 +00:00
Robert Osfield
73e4e55328 Updated wrappers 2008-10-29 10:38:55 +00:00
Robert Osfield
5034e223ec From Lionel Lagrade, "I've replaced readsome by read+gcount."
From Robert Osfeld, added throw on uncompress error.
2008-10-28 17:28:14 +00:00
Robert Osfield
5471bb9932 Added --help-env docs for OSG_MAX_PAGEDLOD 2008-10-27 17:42:04 +00:00
Robert Osfield
10834cdea4 Merged in comment split code from the old flt plugin so that FLT comments string with returns
in them are put into separate description entries.
2008-10-27 17:11:01 +00:00
Robert Osfield
9568a062f1 From Wojciech Lewandowski, "I am sending a really minor fix for StatsHandler::reset method. We dynamically add and remove slave cameras in our application. StatsHandler does not automatically adapt to this situation, and we call StatsHandler::reset to force it to update number of cameras and their graphs. Unfortunately, if stats were already drawn, reset would not remove former graph drawables and they would remain frozen below new stats. This update fixes it.
"
2008-10-27 17:09:36 +00:00
Robert Osfield
10b6309f79 From Chris Denham, fixed support of in scene graph osg::Camera's with ReferenceFrame of RELATIVE_RF. 2008-10-27 16:06:24 +00:00
Robert Osfield
72200de866 From Katharina Plugge, "I found a bug in the OpenFlight-Plugin. When exporting to OpenFlight it could happen that palettes of an external reference like the texture palette are set wrong, because they are overwritten by parent settings (userData), which actually do not refer to palette entries respectively ParentPools (happens for example if a Transform is parent of a ProxyNode). The static cast from userData to ParentPools should therefore be a dynamic cast.
---------------------------

function FltExportVisitor::writeExternalReference( const osg::ProxyNode& proxy ):

Line 423 in file expPrimaryRecords.cpp has to be changed from

const ParentPools* pp = static_cast<const ParentPools*>(proxy.getUserData() );

to

const ParentPools* pp = dynamic_cast<const ParentPools*>(proxy.getUserData() );
"
2008-10-27 15:26:53 +00:00
Robert Osfield
b28612bce2 Various warning fixes 2008-10-27 13:09:43 +00:00
Robert Osfield
e062524cb4 Updated wrappers 2008-10-27 11:49:31 +00:00
Robert Osfield
756b9c389a From Mathias Froehlich, "This change is a result of a recent thread on osg-users.
The semantic change that went into the ac loader with the past patch was
incorrect wrt the document describing the behaviour of ac files and
inconsistent with what ac3d itself displays for that files.
This attached change reverts the behaviour to the original one. The
infrastructure to change this is left in place.
The change is based on rev 9045."
2008-10-27 11:08:54 +00:00
Robert Osfield
d703c58936 From Blasius Czink, "Among other things I added support for atomic operations on BSD-like systems and additional methods (for "and", "or", "xor").
"

and a later post the same osg-submissions thread:

"it's been a while since I have made the changes but I think it was due to problems with static builds of OpenThreads on windows. I was using
OpenThreads in a communication/synchronisation library (without
OpenSceneGraph). It seems I forgot to post a small change in the CMakeLists file of OpenThreads. If a user turns DYNAMIC_OPENTHREADS to OFF (static build) OT_LIBRARY_STATIC will be defined in the Config.
Without these changes a windows user will always end up with a "__declspec(dllexport)" or "__declspec(dllimport)" which is a problem for static builds."

And another post from Blasius on this topic:

"I tested with VS2005 and VS2008. For 32 bit everything works as expected. For x64 and VS2008 I could successfully do the cmake-configure and then the compilation but I had occasional crashes of cmTryCompileExec.exe (during the cmake-configure phase) which seems to be a cmake bug. With VS2005 and 64bit cmake does not set _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED although the interlocked functionality should be there. If I place the source snippet from the CHECK_CXX_SOURCE_RUNS macro to a separate sourcefile I can compile and run the resulting executable successfully. Forcing OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED (on VS2005/x64) reveals a bug in "intrin.h" which seems to be fixed in VS2008 but not in VS2005.

In case anyone is interested the lines:
__MACHINEI(unsigned char _interlockedbittestandset(long *a, long b))
__MACHINEI(unsigned char _interlockedbittestandreset(long *a, long b))
__MACHINEX64(unsigned char _interlockedbittestandset64(__int64 *a, __int64 b))
__MACHINEX64(unsigned char _interlockedbittestandreset64(__int64 *a, __int64 b))

should be changed to:
__MACHINEI(unsigned char _interlockedbittestandset(long volatile *a, long b))
__MACHINEI(unsigned char _interlockedbittestandreset(long volatile *a, long b))
__MACHINEX64(unsigned char _interlockedbittestandset64(__int64 volatile *a, __int64 b))
__MACHINEX64(unsigned char _interlockedbittestandreset64(__int64 volatile *a, __int64 b))

The worst thing that can happen is that interlocked funtionality is not detected during cmake-configure and the mutex fallback is used.
Which reminds me another small glitch in the Atomic header so I attached a corrected version.



    Why is the OT_LIBRARY_STATIC added to the config file? It is not needed anywhere.

OT_LIBRARY_STATIC is needed if you are doing static-builds on Windows. See my previous post on that.
"
2008-10-27 10:42:58 +00:00
Robert Osfield
32907d679f From Alberto Lucas, fixed typo 2008-10-27 09:44:49 +00:00
Robert Osfield
0ff3f48693 Improved the support for no pre compile, and configuring the number of threads in the DatabasePager. 2008-10-26 22:22:38 +00:00
Robert Osfield
1cb2fc259e Improved the error reporting 2008-10-26 22:21:09 +00:00
Robert Osfield
20da8e55a8 From Jim Vaughan,
- Matrix transform nodes were stripped out, and the
vertices and normals of each node were
transposed by the modelling matrix.  My change preserves
the matrix transform nodes, so that
models can still be articulated by changing the matrices.

- Lights were copied from the COIN scenegraph to the OSG
scenegraph, but they were not associated
with a LightSource node.  My change for this creates a
Group and adds a LightSource for each Light.

- If VRML textures have names, the name is now copied to

--

Form Robert Osfild, changed SbString to std::string usage


M    Inventor/ConvertFromInventor.h
M    Inventor/ConvertFromInventor.cpp
2008-10-25 13:17:22 +00:00
Robert Osfield
48c31e5885 From Alberto Luaces, "it seems a copy-paste error is present on the OBJ loader when parsing the
options given by the user. "noTesselateLargePolygons" is being activated
instead of "noTriStripPolygons". I'm attaching the fixed file."
2008-10-24 11:38:40 +00:00
Robert Osfield
37cd3b419c Fixed typo 2008-10-24 10:02:13 +00:00
Robert Osfield
284d7c911d Add osgParticle:: qualifiers in front of Program entries to avoid issues when combining osg::Program and osgParticle::Program in a single app 2008-10-24 09:59:12 +00:00
Robert Osfield
b2ffdacd80 Changed timing stats to osg::INFO level 2008-10-24 09:49:55 +00:00
Robert Osfield
19a51b5aff Removed debugging test. 2008-10-24 08:09:36 +00:00
Robert Osfield
c1fd14fb2c Introduced new method of management the number of PagedLOD active, by using
a capping the number of PagedLOD to a sepcified maximum, with pruning of inactive
PagedLOD when the total number of inactive and active PagedLOD goes above the maximum.

To enable the mode set the env var OSG_MAX_PAGEDLOD to a value something like 1000.
2008-10-23 16:33:14 +00:00
Robert Osfield
f4f6aa288d From Panagiotis Koutsourakis, "We are using Open Scene Graph for an application and we need COLLADA
support. While testing the pluggin we found a small bug and we are
submitting a patch.

The first attachment is a small program that creates a scene with two
pyramids, transformed by two instances of
osg::PositionAttitudeTransform. One of them is rotated 90 degrees in
the X axis, and the scene is exported both in the native OSG (.osg)
and COLLADA (.dae)  formats. In the first case the rotated pyramid is
displayed correctly whereas in the second the pyramid seems not to be
rotated.

In the COLLADA 1.4.1 specification (found at
http://www.khronos.org/collada/) it is specified that
"The <rotate> element contains a list of four floating-point values
[...] followed by an angle in degrees" but the plugin seems to write
the value in radians.

The problem seems to be in the method daeWriter::apply() that seems to
be writing the angle value in radians to the COLLADA file. The patch
can be found in the second attachment and is simply a call to
RadiansToDegrees wrapped around the angle.
"
2008-10-21 16:39:24 +00:00
Robert Osfield
fd5f9741d3 From Wojciech Lewandowski, "I made a minor tweak in StandardShadowMap.cpp. As agreed with J-S I have added AlphaFunc/AlphaTest to shadow camera stateset to make sure transparent objects will not cast blocky solid shadows." 2008-10-21 16:32:55 +00:00
Robert Osfield
3b5f9f1e5d From Chris Denham, "However, just spotted another inconsistency between UFOManipulator::getMatrix() and UFOManipulator::getInverseMatrix()
It assumes that inverse(_inverseMatrix * _offset) = _offset * _matrix
This is only true when _offset=identity, so I think it should be inverse(_offset) * _matrix
This inconsistency can cause problems when switching from UFO to other manipulators, because the UFO:Manipulator::getMatrix function is not necessarily returning a correct inverse of the currently set ModelViewTransform.
It was tempting to change the name of the _offset member to _inverseOffset, or to maintain both variables, but in the end went for the minimal change."
2008-10-21 16:31:01 +00:00
Robert Osfield
144e44a749 From Per Fahlberg, "I ran into a problem when using another library that implemented the same functions as the osg jpeg plugin, i guess they both originated from the same example code :) As a solution I added a namespace in ReaderWriterJPEG.cpp around the functions.
"
2008-10-21 16:27:22 +00:00
Robert Osfield
01593240ed #if'd out an premature StateSet optimization that was causing problems with datasets that mixed multi-texture coord geometry with single texture coord geometries in a single scene graph. 2008-10-21 15:51:56 +00:00
Robert Osfield
f058fc299e Updated wrappers 2008-10-21 09:50:07 +00:00
Robert Osfield
24eb2f6c43 Introduce osgDB::FileCache, and updated osgfilecache and DatabasePager to use it. 2008-10-20 16:24:57 +00:00