Commit Graph

11779 Commits

Author SHA1 Message Date
Robert Osfield
9995cb70a9 Added password support into osgvnc example and vnc plugin 2011-10-26 12:29:38 +00:00
Robert Osfield
b9d7989b44 Implement a simply attempt at detecting when the pixel format needs to be swapped. 2011-10-26 09:34:50 +00:00
Robert Osfield
2dc271d85f Added support for 32bit depth buffer 2011-10-25 15:55:33 +00:00
Robert Osfield
4b655d9c46 Added hack of using a 32bit depth buffer default setting for Traits when compiling under Apple. 2011-10-25 15:31:46 +00:00
Robert Osfield
9b380c8d49 Moved switching off of the cursor till after the slide event handler has had a chance to switch off the scene. 2011-10-24 13:40:29 +00:00
Robert Osfield
1538ecf113 Fixed handling of slide with no layers. 2011-10-24 11:09:35 +00:00
Robert Osfield
e04ca06fc8 Fixed build of StreamOperator 2011-10-22 09:02:18 +00:00
Robert Osfield
9e903861a2 Fixed handling of Vec3dArray in GLBeginEdnAdapter/ArrayDispatchers. 2011-10-21 15:39:51 +00:00
Robert Osfield
d7cba048f5 Added support for using negative scale_x, scale_y and scale_z values in the <volume> tag to allow presentations to flip the imagery 2011-10-21 11:00:29 +00:00
Robert Osfield
d3cebab9a3 Added flipDepth() method 2011-10-21 10:59:42 +00:00
Robert Osfield
088d00c651 Fixed handling of scale.x, scale.y and scale.z paramters so that all of them now take an effect. 2011-10-21 09:31:56 +00:00
Robert Osfield
6607b373d5 Fixed handling of reading/writing of osgVolume::VolumeTile tiles 2011-10-20 16:49:08 +00:00
Robert Osfield
affe0b4a6d Added support for calling throwException() from InputIterator and added a check for negative string sizes. 2011-10-20 16:35:50 +00:00
Robert Osfield
62888dba38 Added check against build type to avoid the build of the osgviewerWX example with debug build as this fails with unresolved symbols within the internals of WxWidgets. 2011-10-20 11:50:04 +00:00
Robert Osfield
aa14f603d1 From Ulrich Hertlein, fixed build problem due to cmake_policy CMP0017 being only available from cmake-2.8.4, added guard to prevent build problems 2011-10-20 10:52:32 +00:00
Robert Osfield
3fd407a60e Improved handling of recent Cmake versions 2011-10-20 09:23:26 +00:00
Robert Osfield
2c4eb8d181 Fixed typo in command line output, and add an explanation message for when createTexture3D fails to create an osg::Image from a list of input osg::Image. 2011-10-20 08:59:47 +00:00
Robert Osfield
61b2659fab Fixed typo 2011-10-17 15:39:46 +00:00
Robert Osfield
33479c7768 Improvements to the compute near/far 2011-10-17 14:41:49 +00:00
Robert Osfield
bdb0dfe27d Improvements to osgShadow::ViewDependentShadowMap and ShadowSettings 2011-10-17 14:40:29 +00:00
Robert Osfield
0fc0c642bf Quitened down debug message 2011-10-17 11:12:05 +00:00
Robert Osfield
4992f798d7 From Jean-Sebastien Guay, add --mapres size option to ViewDependentShadowMap settings. 2011-10-17 10:25:28 +00:00
Robert Osfield
d9dbff18a2 Add catch for when shadows are enabled between the update and draw traversals. 2011-10-03 15:57:06 +00:00
Robert Osfield
e8e25e82a9 From Jean-Sebastien Guay, changed the border colour for the shadow map to be 1 rather the 0 used for debugging so that areas outside the shadow map default to being unshadowed rather than shadowed.
changed the shadow map texture assigment to StateSet so that it doesn't use OVERRIDE, enabling subgraphs to use the same texture unit for other textures if they so required.
                          tidied up indentation.
2011-10-03 15:25:16 +00:00
Robert Osfield
78ad56f76c Changed getVertical(..) so it uses the same coord scale as the getGlyph 2011-10-03 14:57:39 +00:00
Robert Osfield
951a437c0c Fixed handling of ShadowSetting LightNum 2011-10-03 14:56:38 +00:00
Robert Osfield
bb48cef38c Added Font::getVertical(float& ascender, float& descender) methods. 2011-10-03 10:36:18 +00:00
Robert Osfield
db329cf943 Added catch for NaN vertices that were being generated by osgText, these NaN vertices were causing glu tesselation functions to crash. 2011-09-28 11:52:27 +00:00
Robert Osfield
b32d8e0151 Added computation of the extents, in light space, of the shadow maps RenderStage contents and use of this to produce a tighter bound light space projection. 2011-09-28 10:54:30 +00:00
Robert Osfield
12e8d09ed1 Added a half second sleep after calling system command when the command is run in the background so
that this command has a chance to run and open a window before the calling present3D moves on to the next frame.
2011-09-20 11:46:45 +00:00
Robert Osfield
0b7dbc68c9 Added better error reporting and handling when <key> tag contents are not valid. 2011-09-20 10:59:18 +00:00
Robert Osfield
845d33b353 Added handling of <!DOCTYPE...> tag and "" options. 2011-09-20 10:01:07 +00:00
Robert Osfield
2c1b6789db From Ulrich Hertlein, "attached is a patch that cleans up compiler warnings and common functionality." 2011-09-19 10:42:54 +00:00
Robert Osfield
e557d4f28b From Wojciech Lewandowski, "There was a bug in reading modifier keys when focus to GraphicsWindowWin32 was restored. Handler of WM_SETFOCUS was reading pressed keys and sending WM_KEYDOWN messages to fill initial keyboard state. But WM_KEYDOWN messages sent had 0 on lParam and adaptKey method computing state of modifier mask was using lParam to find which modifier keys are down. Obviously when lParam was 0 it was not recording proper modifier masks.
This patch fixes this code sending proper lParam and also makes sure LEFT_CONTROL will be not confused with RIGHT_CONTROL."
2011-09-19 10:39:19 +00:00
Robert Osfield
8a230d42ed From Luc Frauciel, "You'll find attached a new option that allow, when using LOD in USER_DEFINED_CENTER mode to expand the radius of the node by the radius of loaded objets.
Motivation ;
When using PagedLODs, you don't always know the real size of loaded children,
If it occurs that they  are out of predefined bounds, picking on the parts that are out of bound will fail
They also can be culled out too soon.
The problem often  occurs with long object (roads).
I've modified LOD and ProxyNode to include this option."

and later email:

"Attached the UNION_OF_BOUNDING_SPHERE_AND_USER_DEFINED version
There are impacts on some serializers (dae, osgWrapper).
I haven't modified deprecated osg, since it's deprecated"
2011-09-19 10:34:31 +00:00
Robert Osfield
6e01f05853 Added removal of [..] from names returned from glGetActiveUniform results to avoid issues with name lookups when the driver add the [..] for uniform arrays. 2011-09-19 10:12:53 +00:00
Robert Osfield
f9dffdba2c Copya and Paste Anti-Pattern strikes again! Renamed FreeType usage to Revisions to correct previous mistake when copying and modifying the ReaderWriter. 2011-09-19 09:44:29 +00:00
Robert Osfield
3279e9a5f5 Fixed memory leak 2011-09-14 10:45:11 +00:00
Robert Osfield
420d8f6acf Added missing forward declaration 2011-09-14 10:22:04 +00:00
Robert Osfield
8345c85c3c Added asCamera() methods into osg::Camera and osg::Node 2011-09-14 10:02:11 +00:00
Robert Osfield
0f30c08701 From Laurens Voerman, "attached is a zipped
OpenSceneGraph\src\osgPlugins\ffmpeg\FFmpegDecoderAudio.cpp

It solves a wrong sample format being set for audiostreams type S32 and F32, for the
enum AVSampleFormat (in include/avutil/samplefmt.h) doesn't match
enum SampleFormat   (in include/osg/AudioStream) for anything but
SAMPLE_FORMAT_U8 and SAMPLE_FORMAT_S16
"

and follow up that address versioning issue

"I can find the change, avutil version 50.38.0 introduced a new header file:
libavutil/samplefmt.h
older versions use
libavcodec/avcodec.h
with the sampleformats without AV_

an intermideate fix with the FF_API_OLD_SAMPLE_FMT is removed from ffmpeg 0.8.3 so
I think this is the correct fix:

#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(50,38,0)
#define AV_SAMPLE_FMT_NONE SAMPLE_FMT_NONE
#define AV_SAMPLE_FMT_U8   SAMPLE_FMT_U8
#define AV_SAMPLE_FMT_S16  SAMPLE_FMT_S16
#define AV_SAMPLE_FMT_S32  SAMPLE_FMT_S32
#define AV_SAMPLE_FMT_FLT  SAMPLE_FMT_FLT
#define AV_SAMPLE_FMT_DBL  SAMPLE_FMT_DBL
#define AV_SAMPLE_FMT_NB   SAMPLE_FMT_NB
#endif
"
2011-09-14 09:49:28 +00:00
Robert Osfield
c1af863f78 From Morten Hauknes, "I have been using the getLastVisiblePixelCount on pre 3.0 osg. I believe maybe this was a private function that we made public in our side. I use(d) this method to make a simple algorithm to tell how much visible an object was in percent.
So with the 3.0 api change we propose the following change:
- put OSG_EXPORT on the QueryGeometry class so that we get access to the getNumPixels method.
- Create a function called getQueryGeometry that returns a casted _queryGeode->getDrawable(). Or a function called getQueryGeode that returns _queryGeode."
2011-09-13 13:38:26 +00:00
Robert Osfield
6c46956918 From Jean-Sebastien Guay, removed unneccessary BUILD_QT_EXAMPLES cmake option 2011-09-13 13:33:41 +00:00
Robert Osfield
41924dfc14 From Sukender, "I just fount that writing double precision values (eg. Vec3dArray for vertices) works with .osg but not .osgt/.osgx. So here is the fix (SVN trunk r12712). I suppose .osgb works as expected on this point and did not change anything.
So, as for .osg, if you add "precision 16" (for instance) to the optionString, then you'll get double precision vertices written correctly.
"
2011-09-13 11:48:06 +00:00
Robert Osfield
64fa6aec43 From Robert Milharcic, "This will hopefully fix some issues with osgQt, more precisely with GLWidget event handling. There are at least two current GL context braking events, QEvent::Hide and QEvent::ParentChange. When running in a multithreaded mode they both try to change current GL context in a wrong thread (main GUI thread). The QEvent::ParentChange is also problematic when running in a single threaded model because Qt is going to release current contex then delete it, and then it will create new one, and as a result the osg will continue to render to an invalid deleted context. This changes workaround above problems by deferring execution of the problematic evens. These events has to be enqueued and executed later. The enqueued event processing is currently done right after swap in a swapBuffersImplementation of GraphicsWindowQt while code is running in a render thread by calling QGLWidget handler directly. In principle the deferred events queue should be executed while in GUI thread but I couldn't find any reliable way to do this, that is without risking a deadlock. For now it is assumed, Qt is not going to execute any GUI thread only operations inside the QGLWidget handler." 2011-09-13 11:09:39 +00:00
Robert Osfield
098bc6df5e From Farshid Lashkari, "
The osgUtil::CullVisitor class will display an OSG_INFO notification when attempting to clamp the projection matrix with invalid near/var values. This usually appears when the scene graph is empty or all objects are culled. I don't think this scenario warrants having this message appear every frame. It makes it very difficult to debug other issues when this notification floods the output window.

I'd prefer to have the notification removed, but there might be legitimate cases where you want this displayed. Instead, I just disabled the output if the near/far values are equal to FLT_MAX (their initial values). This should at least prevent the notification for the common case where everything was culled."
2011-09-13 10:15:07 +00:00
Robert Osfield
408c2a2267 From Paul Martz, "Here's my proposed change regarding the osg-users post "small feature culling threshold". I've updated the comments and brought the default values into agreement, but didn't bother to add the environment variable support." 2011-09-13 09:59:21 +00:00
Robert Osfield
c35fdf7333 From Jean-Sebastien Guay, "I added a simple setting in OSG's CMakeLists.txt to be able to disable building anything related to Qt. It just skips the FindPackage(...) for Qt3 and Qt4, so since they are not found nothing related to Qt will be generated by CMake. The default is to build the Qt related stuff, so current behavior is unchanged." 2011-09-13 09:53:34 +00:00
Robert Osfield
698a284da8 From Sukender, "I added a tiny check to avoid an integer divide-by-zero, when image is invalid (ie. all values are 0)." 2011-09-13 09:46:22 +00:00
Robert Osfield
abb7228d56 From Sukender, "I added a crash-guard against corrupted 3DS files, having faces indexes out of the range of existing vertices." 2011-09-13 09:43:45 +00:00