Commit Graph

13134 Commits

Author SHA1 Message Date
Robert Osfield
e67466a74f From Sebastian Messerschmidt, "Added setColor function to modify an image based on texture coordinates, parallel to the getColor functionality."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14517 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 16:27:29 +00:00
Robert Osfield
f49d7ae110 Added --db-affinit cpuNum option to osgterrain example to illustrate how to set the thead affinity of the DatabasePager threads.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14516 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 14:46:08 +00:00
Robert Osfield
c71016bd3c From Sebastian Messerschmidt, "Attached you find a change adding a getNumSamples() function to retrieve the value set via setNumSamples."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14515 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 10:44:01 +00:00
Robert Osfield
b9a529148a From Rafa Gaitan, "I finally had some time to change the build system for Android using a Toolchain, which, I think, will be easier to maintain and uses cmake standard system to build it.
My changes:
-------------------
- I changed the cmake files and added a toolchain for building OSG in Android. The toolchain is based on the one used at OpenCV. For building OSG for android you just need to do:

    mkdir build_android_static_gles2 && cd build_android_static_gles2
    cmake .. -DANDROID_NDK=<path-to-the-android-ndk>
                  -DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake
                  -DOPENGL_PROFILE="GLES2"
                  -DDYNAMIC_OPENTHREADS=OFF
                  -DDYNAMIC_OPENSCENEGRAPH=OFF
                  -DANDROID_NATIVE_API_LEVEL=15 # optional
                  -DANDROID_ABI=armeabim #optional
                  -DCMAKE_INSTALL_PREFIX=<path-to-the-install-path> #optional
make -j 8
make install

    The OPENGL_PROFILE works as expected, changing it to "GLES1" it builds and links OSG using GLES1.
    The DYNAMIC_OPENTHREADS/DYNAMIC_OPENSCENEGRAPH parameters also allows to build the dynamic libraries

- I also added some build fixes for android related to the texture formats and added some missing USE_OSG_SERIALIZER_WRAPPER in the osg serializer library to support loading osgb files in static."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14514 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 10:37:33 +00:00
Robert Osfield
2986df22d6 From Björn Blissing, fix for ambiguous defines in Atomic.cpp when compiling with MinGW and GCC
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14513 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 10:21:46 +00:00
Robert Osfield
5da4e80e95 From Claus Steuer, "XCode 6, IOs 8.1 SDK Compile fix : There are some undefined texture formats when compiling osg for IOs 8.1 with XCode 6 and OpenGLES2 enabled."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14510 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 17:37:52 +00:00
Robert Osfield
f8c4ad4b90 From Pjotr Svetachov, "I was experimenting with VBO's to try to get them on par with display
lists when drawing lots of batches and noticed that my program
generated a lot of unneeded glClientActiveTexture calls. Digging
deeper I found out it came from State::disableTexCoordPointer where
the function would call glClientActiveTexture but not
glDisableClientState because the geometry didn't have texture
coordinates for that channel. This is because in our scene there are
some geometries that have move than one uv channels making
State::_texCoordArrayList grow. Then the method
State::applyDisablingOfVertexAttributes() will call
disableTexCoordPointer multiple times.

I rearrange the method a little to combat this. Now the logic has the
same ordering as disableTexCoordPointersAboveAndIncluding which
already combats this."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14508 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 17:00:14 +00:00
Robert Osfield
834c940db1 From Farshid Lashkari, "The obj loader was overriding the existing database path list with the file path of the model, instead of prepending the file path to the path list. The latter seems to be more common behavior for most of the existing loader plugins. Also, the local options weren't actually being used when processing the scene graph for textures. I've attached the fix for both issues."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14507 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 16:38:23 +00:00
Robert Osfield
600e98773e From Marc Helbling, "here is a trivial fix in the Inventor plugin. In one code path, the pointer validity is checked after dereferencing a pointer that can be null (image->valid()) instead of calling ref_ptr::valid (image.valid())."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14505 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 10:52:24 +00:00
Robert Osfield
2da766ff1b From Marc Helbling, "I've come across scenes that contains geometries with initialized but empty vertex arrays and primitives and that would make some optimizers crash.
The submission therefore only contains a test on the size of the vertex array for the VertexCacheMissVisitor and the VertexAccessOrderVisitor visitors."


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14503 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 10:45:05 +00:00
Robert Osfield
1e75ca63f4 From Christian Ruzicka, "while testing this commit on our OSG 3.2 version, I observed that the changes for ETC2 brake ETC1 support. Attached you'll find the changes to get ETC1 running again"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14501 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 10:05:52 +00:00
Robert Osfield
cf7258e03a From Sukender, "Fix for 3DS reader, which may read wrong triangles. Actually, indices may suffer a 'short int' overflow, in two places."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14500 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 09:55:50 +00:00
Robert Osfield
b4354df6fb Fixed segfalt in Texture2DArray copy constructor where it would apply images to an uninitialzed vector.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14498 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 09:41:27 +00:00
Robert Osfield
7ae45b7ac2 From Marc Helbling, "patch adding support for ambient material in the FBX plugin. It's a straightfoward adaptation of the emissive support and has been tested on a proprietary model."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14495 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 09:32:38 +00:00
Robert Osfield
f3859f6d11 From Pjotr Svetachov, fix for build breakage with giflib 5.0.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14493 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 09:21:52 +00:00
Robert Osfield
f0882eda6b From Per Nordqvist, "The README.txt is still somewhat confusing so I have updated it"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14491 16af8721-9629-0410-8352-f15c8da7e697
2014-11-20 08:26:34 +00:00
Robert Osfield
aa17d70853 Removed configure script as it's no longer required as cmake . will now default to Release
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14490 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 17:45:45 +00:00
Robert Osfield
f3eb245e98 Added CMake script to set the default CMAKE_BUILD_TYPE to Release. Approach taken from simgear.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14489 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 17:42:11 +00:00
Robert Osfield
a08b3104a8 Fixed Contributors names
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14486 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 17:29:15 +00:00
Robert Osfield
43bdd32242 From Clement Boesch, "Fix remaining bit of Giflib5 usage"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14485 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 17:10:21 +00:00
Robert Osfield
3dd9f8d430 From Laurens Voerman, "I found a new way to crach the osgviewer:
osgviewer "ProxyNode { FileNameList { cow.osgt } num_children 1 }".osgs

The proxy node reader wrongly assumes options to be non NULL.

fixed in attached zip:
src\osgWrappers\deprecated-dotosg\osg\ProxyNode.cpp

applies to both the 3.2 branch and svn trunk"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14484 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 11:37:37 +00:00
Robert Osfield
34863fe2d2 From Wang Rui, "The submission includes some fixes for osgQt library and osgQtWidgets example: (1) QTextEdit now works with mouse/drag events, (2) scrollbars will change when OSG window is resizing, (3) improve rendering efficiency of QGraphicsViewAdapter so that it works with complex Qt UI, (4) add new setBackgroundWidget() method to indicate a 'background widget', which will ignore mouse/key events on it and pass them to the 3D scene."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14482 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 11:30:53 +00:00
Robert Osfield
5f45a39f28 Changed the way that the cell size is passed to the shader
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14481 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 10:43:07 +00:00
Robert Osfield
5ab861cd04 From James Turner, "Converting the loops to forward versions fixed the issue. The problem is size_t is unsigned; at the limit condition it doesn’t go negative but wraps around to 0xffffffffffffffff …. and boom."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14480 16af8721-9629-0410-8352-f15c8da7e697
2014-11-19 09:33:53 +00:00
Robert Osfield
f40df07ec7 Fixed typo
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14478 16af8721-9629-0410-8352-f15c8da7e697
2014-11-17 15:43:26 +00:00
Robert Osfield
ab47842d6d Fixed typo in comment
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14477 16af8721-9629-0410-8352-f15c8da7e697
2014-11-17 09:19:38 +00:00
Robert Osfield
6661deeb24 Added use of GL_TRIANGLE_STRIP to cut down the size of the primitive indices required.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14476 16af8721-9629-0410-8352-f15c8da7e697
2014-11-14 17:44:20 +00:00
Robert Osfield
bff5b0261b Implemented skirt functionality
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14475 16af8721-9629-0410-8352-f15c8da7e697
2014-11-14 16:47:32 +00:00
Robert Osfield
25cfb81a09 Refactored the handling of use of the osgDB::ObjectCache in the DatabasePager to use a local thread specific ObjectCache to handle new additions and
then have these additions merged with the main Registry ObjectCache during the main loop.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14474 16af8721-9629-0410-8352-f15c8da7e697
2014-11-13 09:40:11 +00:00
Robert Osfield
ed28ec97c7 Moved implementation of ObjectCache functionality out of Registry into a dedicated osgDB::ObjectCache class.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14473 16af8721-9629-0410-8352-f15c8da7e697
2014-11-11 18:28:07 +00:00
Robert Osfield
0e9c93f335 To handle thread safe paging and use of the osgDB::Registry ObjectCache, moved the handling of cache into osgDB::DatabasePager.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14472 16af8721-9629-0410-8352-f15c8da7e697
2014-11-10 16:04:43 +00:00
Robert Osfield
14620aa1dd From Pjotr Svetachov, "I tried your fix and it exposed a bug in my fix :)
The problem is that the readObjectFields method will add the object to the _identifierMap. So all the other instances of that image in the same file will be replaced by the created dummy object. In my fix this was an dummy image and I didn't notice it in our scene's, probably because it covered a small part of an object. In your fix the dummy object was not an image and that leads to a crash when something tries to use it as an image. I have attached a small fix for this bug.

"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14471 16af8721-9629-0410-8352-f15c8da7e697
2014-11-06 10:44:27 +00:00
Robert Osfield
a84df15c0a Introduced use of MarkerObject to IncrmentalCompileOperation/DatabasePager as a way of marking objects that have already been processed and compiled,
thus avoid potential threading conflicts when paged subgraphs are reused.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14470 16af8721-9629-0410-8352-f15c8da7e697
2014-11-06 10:40:54 +00:00
Robert Osfield
7f592b7ad5 Added handling of the reading of field properties to a dummy object for cached images to avoid threading issues associated with reusing and modifying an active object.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14469 16af8721-9629-0410-8352-f15c8da7e697
2014-11-05 16:08:42 +00:00
Robert Osfield
9cda04e51f Reinstated the original mechanism for OperationThread::cancel() that co-operatively releases blocks/barriers to make sure the thread is able to exit correctly.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14468 16af8721-9629-0410-8352-f15c8da7e697
2014-11-05 13:38:50 +00:00
Robert Osfield
7a33cc00cd Improvements to the ShaderTerrain experiemental terrain rendering technique.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14466 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 20:07:40 +00:00
Robert Osfield
1a265f53f7 Changed TerrainTile::setDirty() to use children needing update traversal mechanism to address threadng issues.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14465 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 20:07:15 +00:00
Robert Osfield
5177298dad Change isRunning variable to an Atomic to address possible race condition asscoiated with reading and writing to the variable from different threads.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14464 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 20:06:05 +00:00
Robert Osfield
de0664ef77 Build fixes for ffmpeg LIBAVCODEC_VERSION_MAJOR >= 56
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14462 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 16:29:30 +00:00
Robert Osfield
aa962724e8 Added an InitRegistry static intiialization and destrucion static to help control the order of construction and destruction of the osgDB::Registry.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14461 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 11:18:42 +00:00
Robert Osfield
28a676e105 Replaced use of while(isRunning()) { YieldCurrentThread(); } style loops with use of join() to avoid false positives being reported by valgrind when using the helgrind tool for thread debugging.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14460 16af8721-9629-0410-8352-f15c8da7e697
2014-11-04 10:46:59 +00:00
Robert Osfield
997ee30039 Added experimental osgTerrain::ShaderTerrain TerrainTechnique to osgterrain example to flesh out new shader based displacement mapping approach to osgTerrain databases.
Requires shader files place in OpenSceneGraph-Data/shaders from OpenSceneGraph-Data's svn/trunk to function.

Run osgterrain example with --shader command line option to select displacement mapping shader approach.



git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14458 16af8721-9629-0410-8352-f15c8da7e697
2014-10-21 15:08:44 +00:00
Robert Osfield
174c161daa Removed --sync related code as it's now integrated into osg::DisplaySettings and osgViewer
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14457 16af8721-9629-0410-8352-f15c8da7e697
2014-10-21 14:47:43 +00:00
Robert Osfield
4c1fd06252 Added osg::SyncSwapBuffersCallback to include/osg/GraphicsContext and support for enabling it to include/osg/DisplaySettings, and to the Viewer/CompositeViewer::realize() methods.
To enable the sync of swap buffers set the env var OSG_SYNC_SWAP_BUFFERS to ON or 1, to switch off set to OFF or 0.

One can also use the --sync command line option for application that pass on command line options to the osg::DisplaySettings::instance().


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14456 16af8721-9629-0410-8352-f15c8da7e697
2014-10-21 14:46:12 +00:00
Robert Osfield
fec06828cf Removed checks against Drawable as these are no longer required.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14455 16af8721-9629-0410-8352-f15c8da7e697
2014-10-21 08:27:28 +00:00
Robert Osfield
68c4eaaff1 Added support for writing the file path of a script to the lua package.path to help with loading scripts within lua.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14451 16af8721-9629-0410-8352-f15c8da7e697
2014-09-17 17:40:07 +00:00
Robert Osfield
acbad2424e Changed osgvolume example to use the new tf plugin rather than having local code for reading transfer function
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14450 16af8721-9629-0410-8352-f15c8da7e697
2014-09-16 17:40:13 +00:00
Robert Osfield
f3ba656303 Added write support
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14449 16af8721-9629-0410-8352-f15c8da7e697
2014-09-16 11:00:01 +00:00
Robert Osfield
e35b0796d6 Added .tf & .tf-255 plugin for reading ascii 1D transfer functon files in support for volume rendering.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14448 16af8721-9629-0410-8352-f15c8da7e697
2014-09-15 17:53:44 +00:00
Robert Osfield
e97059df78 Added basic frame rendering for TabWidget
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14446 16af8721-9629-0410-8352-f15c8da7e697
2014-09-12 14:16:08 +00:00