Robert Osfield
5237185e8c
From Chris Denham, "I found a couple of memory leaks in 3DS reader plugin and I have attached corrected files. I have attached an example 3DS file I used to test the leaks/fixes using osgviewer for trunk at rev [14853] and the tagged version 3.2.1.
...
The first leak is in the lib3ds module (yeah, I know that probably should be corrected at http://code.google.com/p/lib3ds/ but I'm assuming that as no commits have happened there since 2011 that it may be better to fix the copy we have in the OSG of that project) The leak is caused by lib3d's use of realloc(ptr, 0) to free up memory allocations, but realloc, when ptr==NULL returns malloc(0) rather than NULL and thus leaks a zero byte allocation. The solution here was to adjust the 'lib3ds_util_reserve_array' function so that it realloc is not used to release a NULL pointer.
The second leak is in ReaderWriter3DS.cpp and arises when any of the created StateSet objects added to the StateSetMap don't subsequently get applied to a Node. The solution here was just to simply use the osg::ref_ptr around the raw StateSet pointer that was used in the locally defined StateSetInfo struct."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14854 16af8721-9629-0410-8352-f15c8da7e697
2015-04-21 17:29:15 +00:00
Robert Osfield
6a4a21afe3
Updated AUTHORS
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14851 16af8721-9629-0410-8352-f15c8da7e697
2015-04-20 10:41:45 +00:00
Robert Osfield
e08fd168f6
Build fix
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14850 16af8721-9629-0410-8352-f15c8da7e697
2015-04-20 10:36:42 +00:00
Robert Osfield
54b389a18a
Build fix
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14849 16af8721-9629-0410-8352-f15c8da7e697
2015-04-20 10:19:04 +00:00
Robert Osfield
1020e22c33
Moved uniform substitution to infront of vertex attribute substituion to make sure gl_Vertex usage is replaced when required.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14848 16af8721-9629-0410-8352-f15c8da7e697
2015-04-20 09:39:00 +00:00
Robert Osfield
14ef282297
From Tim Moore, "The order_by_primitive_mode comparer was not providing a strict weak
...
ordering, which was causing a crash in the sort() call in
VertexAccessOrderVisitor::optimizeOrder (gcc 4.9, Fedora 21)."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14846 16af8721-9629-0410-8352-f15c8da7e697
2015-04-20 09:08:56 +00:00
Robert Osfield
ed7629351f
Updated dev release number
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14845 16af8721-9629-0410-8352-f15c8da7e697
2015-04-17 14:36:05 +00:00
Robert Osfield
f4196dfe64
Added implementations for the libraryName and className for the AntiSquish node.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14844 16af8721-9629-0410-8352-f15c8da7e697
2015-04-17 13:33:08 +00:00
Robert Osfield
3bc1102f11
Fixed CollectParentPaths visitor so that it sets the setNodeMaskOverride(0xffffffff) to make sure all parents are traversed to find parents, even ones that have their NodeMask set to 0x0.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14843 16af8721-9629-0410-8352-f15c8da7e697
2015-04-17 13:24:44 +00:00
Robert Osfield
a583b306c5
Added --test-NodeMask option to test crash when a parent of osgmanipulator::AntiSquish node has a NodeMask set to 0x0.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14842 16af8721-9629-0410-8352-f15c8da7e697
2015-04-17 13:22:07 +00:00
Robert Osfield
3a2380932f
Changed MSVC version test to <= to enable fallback for VS2010.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14841 16af8721-9629-0410-8352-f15c8da7e697
2015-04-16 11:19:50 +00:00
Robert Osfield
c61c3d5500
Fixed crash when AntiSquish node is the root of the scene graph.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14840 16af8721-9629-0410-8352-f15c8da7e697
2015-04-16 10:07:23 +00:00
Robert Osfield
4a734b314c
Updated ChangeLog
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14839 16af8721-9629-0410-8352-f15c8da7e697
2015-04-15 18:34:16 +00:00
Robert Osfield
bf0425f628
Updated version number of dev release
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14837 16af8721-9629-0410-8352-f15c8da7e697
2015-04-15 18:05:43 +00:00
Robert Osfield
eb893eba75
Added missing const to find VS2005 build
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14836 16af8721-9629-0410-8352-f15c8da7e697
2015-04-15 17:12:52 +00:00
Robert Osfield
1909de938a
Added check for changes to window size during GraphicsWindowWin32::init() to fix bug that occurs when the window manage resizes the window automatically on creation.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14835 16af8721-9629-0410-8352-f15c8da7e697
2015-04-14 18:16:32 +00:00
Robert Osfield
3add98180c
From Philippe Renon, MingW build fix
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14834 16af8721-9629-0410-8352-f15c8da7e697
2015-04-14 15:50:51 +00:00
Robert Osfield
87122ca369
Fixed typo of SEPARATE enums
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14833 16af8721-9629-0410-8352-f15c8da7e697
2015-04-13 11:48:28 +00:00
Robert Osfield
0a1db3d6fc
From Jannik Heller, typo fixes
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14832 16af8721-9629-0410-8352-f15c8da7e697
2015-04-13 10:43:56 +00:00
Robert Osfield
166c49eedd
From Konstantin Matveyev, "I've added GLES3 profile, which also enables GLES2 features (OSG_GLES3_AVAILABLE=true => OSG_GLES2_AVAILABLE=true).
...
If OSG_OPENGL_PROFILE="GLES3" =>
GraphicsWindowIOS will create gles3 context.
If failed, GraphicsWindowIOS will create gles2 context.
Multisampling also working.
"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14831 16af8721-9629-0410-8352-f15c8da7e697
2015-04-13 10:11:32 +00:00
Robert Osfield
a711fdba36
From Laurens Voerman, I have modified the FindOpenEXR.cmake to find the debug libraries, and to define a variable
...
(OPENEXR_LIBRARIES_VARS) with the variable names that might have a _DEBUG version defined.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14830 16af8721-9629-0410-8352-f15c8da7e697
2015-04-13 09:50:27 +00:00
Robert Osfield
0335ea3760
Added passing of command line arguments to viewer construction to allow one to specify extra controls for the viewer such as window size etc.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14829 16af8721-9629-0410-8352-f15c8da7e697
2015-04-13 08:55:08 +00:00
Robert Osfield
16b19a0c30
Refactored AntiSquish::computeUnSquishedMatrix() method to use the parent node path of the AntiSquish node
...
to compute the required matrix rather than using the NodePath provided by the NodeVistor. This is required
as in osg::computeLocalToWorld() usage case the NodeVisitor pointer is NULL, so the correct matrix isn't possible to compute.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14828 16af8721-9629-0410-8352-f15c8da7e697
2015-04-09 18:42:08 +00:00
Robert Osfield
595a048319
Added WindowSizeHandler to osgmanipulator example
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14827 16af8721-9629-0410-8352-f15c8da7e697
2015-04-09 18:38:53 +00:00
Robert Osfield
70b5297575
From Jannik Heller, typo fixes
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14826 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 18:01:12 +00:00
Robert Osfield
ab2fc1be76
From Giampaolo Viganò, "you can find in the attached ZIP archive a fix for 3ds plugin transparent/diffuse textures and opacity maps and the support for reflection map"
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14825 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 16:58:31 +00:00
Robert Osfield
abdb23e367
From Janik Heller, clean up of drawable/node usage
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14824 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 15:53:17 +00:00
Robert Osfield
31488eeba1
Removed unused ShapesToGeometriesVisitor.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14823 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 15:52:02 +00:00
Robert Osfield
6cff8650f2
Cleaned up handling of Drawables so it utilizes the Node inheritance properly.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14822 16af8721-9629-0410-8352-f15c8da7e697
2015-04-07 15:49:06 +00:00
Robert Osfield
814693ffc1
Build fix for VS2005.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14821 16af8721-9629-0410-8352-f15c8da7e697
2015-04-03 15:43:34 +00:00
Robert Osfield
4c84742664
Improved the doxygen comment for the new createImageWithOrientationConversion(..) function.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14820 16af8721-9629-0410-8352-f15c8da7e697
2015-04-03 13:34:13 +00:00
Robert Osfield
c753dbc3e6
Added automatic rotation of jpeg image based on EXIF rotation information provided in the header.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14819 16af8721-9629-0410-8352-f15c8da7e697
2015-04-03 13:29:31 +00:00
Robert Osfield
40a7f903ec
Implemented an osg::createImageWithOrientationConversion(...) method to aid for changing orientation of images.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14818 16af8721-9629-0410-8352-f15c8da7e697
2015-04-03 13:19:32 +00:00
Robert Osfield
8fb08496ae
Added reading of EXIF_Orientation tags when present in a jpeg file.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14817 16af8721-9629-0410-8352-f15c8da7e697
2015-04-02 16:11:22 +00:00
Robert Osfield
950d7bb60b
From Wojciech Lewandowski, Windows build fixes, "These are the tweaks I had to make. JSON_Objects / json_stream headers attached. I am not sure how these will behave on VS 2010. Someone with VS 2010 should test it. Should be okay on VS 2008 and below + VS 2012 and above, though."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14816 16af8721-9629-0410-8352-f15c8da7e697
2015-04-02 10:12:22 +00:00
Robert Osfield
9aa8d641a0
From Lionel Largarde, "fix for the Image::computeNumberOfMipmapLevels method. The method did use the float version of the log function and the / operator.
...
It works for most of the input sizes, but fails for 8192, 32768...
For 8192, the method returns 13 instead of 14."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14814 16af8721-9629-0410-8352-f15c8da7e697
2015-04-01 09:37:44 +00:00
Robert Osfield
de415fbcf9
Fixed crash when using a subload callback, where the _images array is empty by _images[0] was still being accessed.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14813 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 19:31:34 +00:00
Robert Osfield
5229280901
Added --subload command line option and test subload callback for testing purposes
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14812 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 19:29:02 +00:00
Robert Osfield
a7ba138dc7
Introduced osg::Camera::resize(..) method and associated enum thus:
...
enum ResizeMask
{
RESIZE_VIEWPORT=1,
RESIZE_ATTACHMENTS=2,
RESIZE_PROJECTIONMATRIX=4,
RESIZE_DEFAULT=RESIZE_VIEWPORT|RESIZE_ATTACHMENTS
};
/** Resize, to the specified width and height, the viewport, attachments and projection matrix according to the resizeMask provided.
* Note, the adjustment of the projection matrix is done if the RESIZE_PROJECTIONMATRIX mask to set and according to the rules specified in the ProjectionResizePolicy. */
void resize(int width, int height, int resizeMask=RESIZE_DEFAULT);
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14811 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 16:23:43 +00:00
Robert Osfield
99f7bfab3b
Introduced Camera::resizeAttachments(int width, int height) to resize all the Texture and Image assigned the the Camera attachments.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14810 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 15:08:13 +00:00
Robert Osfield
296c12a8e9
Refactor the RTT Camera resize code into a seperate Callback method in prep for this all being done by a single Camera API call.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14809 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 10:41:33 +00:00
Robert Osfield
307e70f13b
Added Camera::dirtyAttachmentMap(), Camera::s/getAttachmentMapModified() value and usage of this in RenderStage as a new mechanism
...
for telling the rendering backend to update itself to reflect new values in the attachments such as new texture or image sizes.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14808 16af8721-9629-0410-8352-f15c8da7e697
2015-03-31 10:36:38 +00:00
Robert Osfield
06e6f368fc
Added StatsHandler to osgtessellationshaders example to test out rendering bug associated with stats rendering.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14807 16af8721-9629-0410-8352-f15c8da7e697
2015-03-23 11:36:02 +00:00
Robert Osfield
890aea9537
Added event handle to alter the RTT Camera's dimensions to follow the windows resizes.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14806 16af8721-9629-0410-8352-f15c8da7e697
2015-03-20 17:58:34 +00:00
Robert Osfield
953828a817
Fixed resize dimensions of X11 window
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14805 16af8721-9629-0410-8352-f15c8da7e697
2015-03-20 15:49:12 +00:00
Robert Osfield
6854d2968f
From Jannik Heller, "Fix for Qt4 multi-threaded crash. This patch adds the AA_X11InitThreads flag to the QApplication setup, meaning QT will call XInitThreads for us. This also bumps the required QT version to 4.8+, because the AA_X11InitThreads flag was introduced in that version. If that is not acceptable, we could add a QT_VERSION >= 0x040800 guard, or manually call XInitThreads() instead. Let me know what you think."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14804 16af8721-9629-0410-8352-f15c8da7e697
2015-03-20 11:48:21 +00:00
Robert Osfield
63a3595aab
Added Texture wrap setting to CLAMP_TO_EDGE to fix rendering problem when running the default osgdistortion example
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14803 16af8721-9629-0410-8352-f15c8da7e697
2015-03-19 10:49:17 +00:00
Robert Osfield
d9f920ee37
Fixed VisualStudio warning
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14802 16af8721-9629-0410-8352-f15c8da7e697
2015-03-17 18:10:21 +00:00
Robert Osfield
31fd2456b6
From Konstantin Matveyev, "Added ComputeBoundingBoxCallback, ComputeBoundingSphereCallback and UpdateCallback implmenentations to serializers"
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14801 16af8721-9629-0410-8352-f15c8da7e697
2015-03-17 14:50:34 +00:00
Robert Osfield
bf86b031e0
Updated ChangeLog and AUTHORS file for dev release
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14800 16af8721-9629-0410-8352-f15c8da7e697
2015-03-17 09:40:31 +00:00