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
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
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
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
Robert Osfield
6d1ba5b06d
From Farshild Lashkari, "Attached is a simple patch that avoids the depth write pass in Text::renderWithDelayedDepthWrites if the current osg::State object has GL_DEPTH_TEST disabled."
2011-09-13 09:21:07 +00:00
Robert Osfield
43483408f3
Reverted Paul Idstein warning fix as this was breaking the build
2011-09-13 09:17:21 +00:00
Robert Osfield
757d00c3c8
From Ulrich Hertlein, Added some error checks and memory cleanup.
2011-09-12 16:24:08 +00:00
Robert Osfield
cd6e174a5c
From Stephan Huber, fixed build for OSX 10.6 and earlier
2011-09-12 16:20:45 +00:00
Robert Osfield
6e6dafcd3e
From Luc Frauciel, "When osgUtil::DelaunayTriangulator triangulate() function ends with no triangle generated, it crashes.
...
This patch fixes that"
2011-09-12 12:26:55 +00:00
Robert Osfield
796ccd14c8
From Cedric Pinson, from three submissions:
...
"Here a patch that correct like the previous assign collada material name
to stateset."
and
"I changed how the collada reader set object name in osg. Current
implementation use collada ID to setup name. with this patch I use
collada name to setup name in osg object and if collada provide no name
I use as fallback ID. I am not sure we want this fallback.
The motivation of this change is that when an artist set names to its
objects and export to collada, I am not able to use those names in osg
to retrieve the node."
and
"Here the update of the file that fix the light id stuff"
2011-09-12 11:28:14 +00:00
Robert Osfield
19b8b1f474
From Bob Kuehne, build fix for OSX 10.7 SDK.
2011-09-12 11:24:52 +00:00
Robert Osfield
edd83a03fe
From Paul Idstein, warning fixes for OSX 10.7
2011-09-12 11:24:24 +00:00
Robert Osfield
9be4a1a1c8
From Magnus Kessler, typo fixes
2011-09-12 10:52:16 +00:00
Robert Osfield
83524f958e
Added handling the ShadowSettings::LightNum for selecting which light to use.
2011-09-07 20:05:25 +00:00
Robert Osfield
b2fd8f4059
Added handling of the case when RenderLeaf::_modelview matrix is NULL, such as when LightPointNode is used in the scene graph.
2011-09-07 16:26:57 +00:00
Robert Osfield
3a79bc343d
Moved ViewDependetShadowMap parameter settings into a dedicated ShadowSettings object in prep for making it possible to scale the API to handle multiple lights and multiple shadow maps per light.
2011-09-07 15:55:54 +00:00
Robert Osfield
772c7d75c5
Added setting of the shadow map Camera's name to "ShadowCamera" to improve integration with osgOcean.
2011-09-06 17:26:27 +00:00
Robert Osfield
f83722d62b
Added s/getPerspectiveShadowMapCutOffAngle() and use of this when setting up light space to avoid sigularaties when
...
the light and view directions are co-incident.
2011-09-06 10:12:45 +00:00
Robert Osfield
15ad6eda63
Added support for setting whether ViewDependentShadowMap should provide it's own vertex and fragment shaders.
2011-09-05 12:36:47 +00:00
Robert Osfield
52c2bc3ff5
Added s/getTextureSize() method for setting the shadow map texture size.
2011-09-02 10:16:16 +00:00
Robert Osfield
f476406ae1
Disabled the use of the ReceivesShadowTraversalMask() mask
2011-09-02 07:46:08 +00:00
Robert Osfield
ec3b2ba2d3
Added test line for COMPUTE_NEAR_USING_PRIMITIVES
2011-09-01 18:49:33 +00:00
Robert Osfield
1fd3c84287
Added fine grained computation of the far plane when using the COMPUTE_NEAR_FAR_USING_PRIMITIVES ComputeNearFarMode.
...
Added COMPUTE_NEAR_FAR_USING_PRIMITIVES option that provides the original functionality where only the near plane
is computed in a fine grained way, with the far plane being computed simply from bound volumes.
2011-09-01 18:48:21 +00:00
Robert Osfield
b21d206d3a
From Tony Horrobin, build fix
2011-08-29 16:01:02 +00:00
Robert Osfield
47db350da1
Added fallback base texture
2011-08-29 10:26:05 +00:00
Robert Osfield
2d71a390d3
Added support for setting the MinimumShadowMapNearFarRatio.
2011-08-29 09:59:47 +00:00
Robert Osfield
771075084b
Fixed bug in computaton of the min/max x/z ratios.
2011-08-26 15:40:09 +00:00
Robert Osfield
0f14f53698
Added releaseGLObjects/resizeGLObjectBuffers support
2011-08-26 10:52:25 +00:00
Robert Osfield
966981f100
Improved the handling of depth partitioning and orthographic datasets
2011-08-25 17:21:38 +00:00
Robert Osfield
0d3169f645
Added support for user defined setting of the shadow texture unit
2011-08-24 19:38:58 +00:00
Robert Osfield
26e2106636
Changed new ViewDependentShadowMap to default to a perspective shadow map with automatic detection of a spot light/perspetive light projection
...
matrix to prevent inappropriate usage of perspective shadow map.
2011-08-24 13:57:15 +00:00
Robert Osfield
622cfb524c
Imorovements to the new perspective/lispsm style shadow implementation.
2011-08-24 12:32:03 +00:00
Robert Osfield
3db0557ed5
Quitened down and fixed warning
2011-08-24 12:31:35 +00:00
Robert Osfield
3a70830e89
Quitended down debug messages and added passing of RenderStage to LispSM code
2011-08-19 12:42:51 +00:00
Robert Osfield
7c4fb17298
Improved the LispSM computation
2011-08-19 10:43:38 +00:00
Robert Osfield
36fea2bd60
Changed the local variable near/far type
2011-08-19 10:43:15 +00:00
Robert Osfield
c71a0c72e4
Added back in control of the backface culling.
2011-08-17 17:06:55 +00:00
Robert Osfield
1d54065646
intermin check-in of work on new LispSM implementation
2011-08-17 16:09:17 +00:00
Robert Osfield
04ffdf1801
Added missing assignement of _simulationTime.
2011-08-15 14:37:16 +00:00
Robert Osfield
1625f61812
From Paul Martz, "Recent changes to osgShadow on trunk were apparently not yet tested with ref_ptr implicit casting disabled. Attached is a fix. "
2011-08-13 19:09:58 +00:00
Robert Osfield
b15317481c
Added public interface for selecting use of perspective and light space perspective shadow maps. Implementation
...
of backends not implemented yet so will follow.
2011-08-12 20:29:14 +00:00
Robert Osfield
6b7175baac
Implemented first pass at shaders for new ViewDepedentShadow map class
2011-08-12 14:53:40 +00:00
Robert Osfield
675a61ea87
Implemented ViewDependentShadowMap::setDebugDraw(bool) to allow osgshadow to enable/disable the debug display via the
...
standard --debugHUD option.
2011-08-09 15:57:37 +00:00
Robert Osfield
c14516d5f6
Changed RTT Camera to use depth.
2011-08-09 15:20:25 +00:00