scrawl
4e1a2d3246
Fix handling of in-scenegraph Drawables in ShaderGenVisitor
2017-02-03 17:51:03 +01:00
scrawl
e48aa118b6
Fix handling of in-scenegraph Drawables in MeshOptimizers
2017-02-03 17:48:18 +01:00
scrawl
c901694290
Fix handling of in-scenegraph Drawables in DrawElementTypeSimplifier
2017-02-03 17:43:42 +01:00
scrawl
853418db94
Remove redundant handling of Geode in DisplayRequirementsVisitor
2017-02-03 17:42:21 +01:00
scrawl
a858b2a2cd
Add a comment explaining some confusing code in UpdateVisitor and EventVisitor
2017-02-03 17:39:56 +01:00
scrawl
09ca132102
Remove redundant handling of Geode in SharedStateManager
2017-02-03 17:35:40 +01:00
scrawl
a13b66135f
Fix handling of in-scenegraph drawables in osgUtil::Simplifier
2017-02-03 17:35:40 +01:00
scrawl
f13fbff251
Remove CheckGeometryVisitor which was a no-op
2017-01-20 23:02:15 +01:00
scrawl
4a05caf4f7
MakeFastGeometryVisitor: fix handling of Geometries that are directly in the scene graph not attached to a Geode
2017-01-20 23:01:04 +01:00
scrawl
833f37ea57
StateVisitor: remove redundant code for Geode handling
2017-01-20 22:49:17 +01:00
scrawl
f229b19496
TessellateVisitor: fix handling of Geometries that are directly in the scene graph not attached to a Geode
2017-01-20 22:47:51 +01:00
scrawl
41cbf9a45e
FlattenStaticTransformsVisitor: fix handling of Drawables that are directly in the scene graph not attached to a Geode
2017-01-20 22:43:58 +01:00
scrawl
ff1a9a195a
StaticObjectDetectionVisitor: make use of apply(Drawable) visitor function
2017-01-20 21:48:45 +01:00
scrawl
764b2f60c6
TextureAtlasVisitor: fix handling of Drawables that are directly in the scene graph not attached to a Geode
2017-01-20 21:47:21 +01:00
scrawl
dc2689f779
TextureVisitor: remove redundant code for Geode handling
2017-01-20 21:47:13 +01:00
scrawl
7611f95078
RemoveEmptyNodesVisitor: remove redundant code for Geode handling
2017-01-20 21:46:03 +01:00
Robert Osfield
255a86cbe2
Added public accessors
2017-01-17 10:52:26 +00:00
d-a-heitbrink
3d2f4ea404
Added support for Bindless texture extension,
...
64 bit uniforms, 64 bit buffers
Added new bindless texture example
2017-01-13 09:56:42 -06:00
Hartwig
5e0b3dacc6
Replaced tabs with spaces
2017-01-07 13:54:21 +01:00
Hartwig
7c1098c843
Addition of documentation for LOD and PagedLOD
...
Documentation has been added for their default constructors. Furthermore, the consequences of different center modes have been explained. A comment regarding the setting of the radius has been fixed.
2017-01-07 09:20:56 +01:00
blobfish
a41f498e1f
osgManiputor: TranslateInLineCommand wants Vec3d instead of Vec3
2016-12-08 10:12:17 -05:00
Robert Osfield
b04271f93e
Fixed crash in handling of an osg::Callback attached to a Drawable as update callback.
...
Added handling of osg::Callback when attavhed to a Drawable as a cull callback.
2016-11-23 18:19:59 +00:00
Robert Osfield
1abd99f084
Added support for glObjectLabel debugging
2016-11-15 14:35:47 +00:00
Robert Osfield
ddbb1cb064
Removed todo that is not required
2016-11-15 09:47:48 +00:00
Robert Osfield
87a3648e68
To avoid noise in documentation replaced nested namespaced enum with enum with FILE_COPY_ wording prefixed into enum values.
2016-11-15 08:57:24 +00:00
Robert Osfield
80f75bcbdd
Fixed doxygen warnings
2016-11-15 08:37:05 +00:00
Robert Osfield
5b375124cc
Added osg::Geometry::configureBufferObjects() and ConfigureBufferObjectsVisitor visitor to help with setting up buffer objects in a coherent fashion.
2016-11-14 17:59:25 +00:00
Robert Osfield
99cb8ebacf
Added more flexibility into the State::checkGLErrors() method, allowing calling code to pass in two strings.
...
Improved the StateSet::compileGLObjects() usage of checkGLErrors() to make the warning reports more meaningful.
2016-11-14 11:59:47 +00:00
Robert Osfield
e6052ef4b4
Added Dragger::applyAppropriateFrontFace(StateSet*) to make it easy to handle inverted matrices by toggling the FrontFace to sure the correct face is visible.
2016-11-11 17:18:13 +00:00
Robert Osfield
d16ca33f38
Fixed handling of Locator's with negative extents
2016-11-11 14:01:40 +00:00
Robert Osfield
b10d30242d
Fixed GLES build due to lack of GLclampd
2016-10-12 18:00:05 +01:00
Laurens Voerman
1a664b19de
add #define GL_TEXTURE0 for windows users previously provided by GLBeginEndAdapter
2016-10-12 13:29:58 +02:00
Robert Osfield
0314fd593a
Added VAO support to osgTerrain::GeometryPool
2016-10-11 20:11:39 +01:00
Robert Osfield
38ff11f8c5
Renamed ArrayDispatchers to AttributeDispatchers to better reflect it's role
2016-10-11 15:14:14 +01:00
Robert Osfield
e14ee80282
Streamlined the dispatch and activation of attribute dispatchers
2016-10-11 11:29:29 +01:00
Robert Osfield
364c838ea1
Removed unused vertex and texcoord array dispatchers
2016-10-11 11:29:29 +01:00
Fabian Wiesel
b13bbe3bdb
VAO id is a GLuint
2016-10-11 11:29:29 +01:00
Robert Osfield
0ee65c9d2f
Removed unneccessary parameter
2016-10-11 11:29:29 +01:00
Robert Osfield
e11e45a2e3
Removed GLBeginEndAdapter as it is no longer needed
2016-10-11 11:29:29 +01:00
Robert Osfield
0f3e61146d
Refactored osgText so that it no longer uses GLBeginEndAdapter
2016-10-11 11:29:29 +01:00
Robert Osfield
aa0c8fdefd
Added ApplyTextureModeProxy for temporarily applying a texture mode
2016-10-11 11:29:29 +01:00
Robert Osfield
53cdacd926
Refactored Text3D so that it no longer depends upon GLBeginEndAdapter
2016-10-11 11:29:29 +01:00
Robert Osfield
1914eb435b
Added State::ApplyModeProxy to help with temporarily applying a mode
2016-10-11 11:29:29 +01:00
Robert Osfield
a471973eab
Added missing export
2016-10-11 11:29:29 +01:00
Robert Osfield
5a4754deef
Refactored osgParticle so that it natives support vertex arrays, vertex buffer objects and vertex array objects
2016-10-11 11:29:29 +01:00
Robert Osfield
cd3a5f8097
Added osg::convertToRGBA8(Vec4f) convenience function
2016-10-11 11:29:29 +01:00
Robert Osfield
8febae1546
Fixed VertexArrayState::bind*BufferObject(..) methods so they correctly handle dirtied buffer objects
2016-10-11 11:29:29 +01:00
Robert Osfield
a5e0398a29
Fixed typo in comment
2016-10-11 11:29:29 +01:00
Robert Osfield
886b922596
Beginings of refactoring ParticleSystem so that it does uses vertex arrays rather than GLBeginEndAdapter
2016-10-11 11:29:29 +01:00
Robert Osfield
611b7afb07
Added OSG_EXPORT
2016-10-11 11:29:29 +01:00
Robert Osfield
56ed225f17
Removed Particle::Shape support for QUAD_TRIANGLESTRIP, HEXAGON, USER as these are unlikely to be used as their implementation prevents refactoring to use vertex array code paths
2016-10-11 11:29:29 +01:00
Robert Osfield
c637010c9d
Refactored ImpostorSprite so that it no longer uses GLBeginEndAdapter
2016-10-11 11:29:29 +01:00
Robert Osfield
7c432fbe11
Refactored osgSim::SphereSegment so that it no longer uses GLBeginEndAdapter
2016-10-11 11:29:29 +01:00
Robert Osfield
e5ab4355be
Added osg::convertShapeToGeometry(...) convinience functions for creating osg::Geometry from osg::Shape descriptions.
2016-10-11 11:29:29 +01:00
Robert Osfield
83b5cabac9
Refactored ShapeDrawable so that it is subclassed from osg::Geometry rather than osg::Drawable.
...
Created a BuildShapeGeometryVisitor visitor that can create osg::Geometry for osg::Shape objects
2016-10-11 11:29:29 +01:00
Robert Osfield
f842750342
Removed no longer used member variables
2016-10-11 11:29:29 +01:00
Robert Osfield
65884f296b
Removed no longer used data structures
2016-10-11 11:29:29 +01:00
Robert Osfield
16da432be3
Moved FOG_COORD and SECONDARY_COLOR #define's from State header into VertexArrayState.cpp
2016-10-11 11:29:29 +01:00
Robert Osfield
359b136b5e
Added check against State::useVertexBufferObjects(..) so that Display Lists are only used when VBO is OFF.
2016-10-11 11:29:29 +01:00
Robert Osfield
961bffcca4
Added automatic assignment of _markerObject to CompileSet.
2016-10-11 11:29:29 +01:00
Robert Osfield
94891778c4
Restructred the enabling of vertex array object support to allow one to set enable the default via osg::State.
...
Added OSG_VERTEX_BUFFER_HINT env var to osg::DisplaySettings with VERTEX_BUFFER_OBJECT/VBO, VERTEX_ARRAY_OBJECT/VAO and NO_PREFERENCE to allow one to foce on VBO or VAO usage.
Restructred BufferObject assigned in osg::Geometry
Added
2016-10-11 11:29:29 +01:00
Robert Osfield
ee31921520
Streamlined State::_is*Supported variables
2016-10-11 11:29:29 +01:00
Robert Osfield
1d75089bf8
Build fixes when compiling wuth CMake options OPENGL_PROFILE set to GLCORE
2016-10-11 11:29:29 +01:00
Robert Osfield
e3c663bb02
Removed deprecated code paths and moved implementations into headers
2016-10-11 11:29:29 +01:00
Robert Osfield
bf28e2d037
Refactored the VertexArrayState's handling of vertex attribute aliasing
2016-10-11 11:29:29 +01:00
Robert Osfield
1f147f6bc6
Moved implementations from .cpp's to headers as inline methods to improve performance.
2016-10-11 11:29:29 +01:00
Robert Osfield
97df15b205
Improved naming of createVertexArrayState(..) method
2016-10-11 11:29:29 +01:00
Robert Osfield
83f73df814
Added State::useVertexArrayObject() member to streamline toggling on/off of VAO usage
2016-10-11 11:29:29 +01:00
Robert Osfield
a4e682bb28
Added support for clean up Vertex Array Objects
2016-10-11 11:29:29 +01:00
Robert Osfield
4131d2da34
Added intialization of the VAO in Geometry::compileGLObjects() and refined the invocation of updates to the VAO
2016-10-11 11:29:29 +01:00
Robert Osfield
078598872f
Added lazy setting of arrays for osg::Geometry using vertex_array_object
2016-10-11 11:29:29 +01:00
Robert Osfield
4b4cd13d31
Implemented lighter weight setting of the CurrentVertexArrayState and introduced GlobalVertexArrayState.
2016-10-11 11:29:29 +01:00
Robert Osfield
7d83d735ad
Implemented a different approach to vertex array object support to enable creation of a single global vertex array object as well as provide individual vertex array objects per Drawable when required.
2016-10-11 11:29:29 +01:00
Robert Osfield
4d8a29b987
Added ability to initializer GL vertex array object id with Geometry::compileGLObjects().
...
Improved the handling of buffer object state when not using VAO's
2016-10-11 11:29:29 +01:00
Robert Osfield
14d1483b06
Experimental support for OpenGL Vertex Array Object
2016-10-11 11:29:29 +01:00
scrawl
295742c0d7
Fix typo in processor affinity API
2016-10-10 18:02:38 +02:00
Robert Osfield
7ba7b13aa0
Fixed VisualStudio warning
...
Added local implementation of asEventHandler()
2016-10-07 14:51:39 +01:00
Robert Osfield
268d89c426
Fixed VisualStudio warning
...
Added local implementation of asEventHandler()
2016-10-07 14:45:33 +01:00
Robert Osfield
91538d90f8
Added ViewerBase::s/getUseConfigureAffinity(bool flag) to allow users to toggle whether they want the ViewerBase::setUpThreads() method to call ViewerBase::configureAffinity() or not.
2016-10-07 12:17:03 +01:00
Robert Osfield
ee97db3488
Introduced OpenThreads::Affinity support into osg::Camera, osg::GraphicsContext::Traitse, osgDB::DatabasePager and osgViewer::ViewerBase/Viewer/CompositeViewer.
...
Added ViewerBase::configureAffinity() to help with the setting of the affinity of camera, graphics context and pager threads
2016-10-07 12:17:03 +01:00
Robert Osfield
77c5e96ccb
Added DatabasePager::setProcessorAffinity(const OpenThreads::Affinity&) support to allow the database threads to have affinity to user controls sets of CPU cores.
2016-10-07 12:17:03 +01:00
Robert Osfield
00aac43cdb
Added missing export
2016-10-07 12:17:03 +01:00
Robert Osfield
bc44da49e6
Introduced new OpenThreads::Affinity class to wrap up specification of thread affinity.
...
Simplified the OpenThreads::SetProcessorAffinityOfCurrentThread/Thread::SetProcessorAffinity() to utilize the new Affinity class
2016-10-07 12:17:03 +01:00
Robert Osfield
0f8a5a86e2
Introduced OpenThreads::SetProcessorAffinityMaskOfCurrentThread(unsigned long cpumask) and Threads::setProcessorAffinityMask(unsigned long cpumask) to allow finer grained control over the CPU affinity.
2016-10-07 12:17:03 +01:00
Robert Osfield
8de4c76582
Fixed crash and double call bug in handle event callbacks attached to Drawable
2016-10-06 18:27:23 +01:00
Robert Osfield
56a7208891
Removed Qt dependency examples, osgQt NodeKit and qfont plugin as these are now provided by the separate osgQt project
2016-09-26 09:31:22 +01:00
Robert Osfield
b0df75e674
Cleaned up the spacing and const of various method parameters.
...
Added non const versions of StateSet::getAttributePair() and getTextureAttributePair()
2016-09-20 17:01:26 +01:00
OpenSceneGraph git repository
b75546acaf
Merge pull request #131 from filnet/master
...
StandardManipulator: use proper bit mask when clearing a relative flag
2016-09-15 07:50:51 +01:00
Philippe Renon
e367792f6d
StandardManipulator: use proper bit mask when clearing a relative flag
2016-09-14 14:32:35 +02:00
Laurens Voerman
55b8c380d8
wrong Meta_Shape tag in ConvexHull
2016-09-12 16:49:35 +02:00
Robert Osfield
cb6e6ff2be
Fixed warnings, deprecated another out of date method
2016-09-05 15:35:54 +01:00
Robert Osfield
a494cd71e8
Fixed typo
2016-09-05 07:59:15 +01:00
Robert Osfield
79ff8ba273
Merge branch 'Submissions2e' of https://github.com/LaurensVoerman/OpenSceneGraph into LaurensVoerman-Submissions2e
2016-09-02 18:26:11 +01:00
OpenSceneGraph git repository
14bdadaf86
Merge pull request #123 from LaurensVoerman/Submissions2f
...
Submissions2f
2016-09-02 17:44:57 +01:00
OpenSceneGraph git repository
8d827ced1b
Merge pull request #117 from LaurensVoerman/Submissions2a
...
bugfix: wrong class name in META_Object macro for osg::Enablei /disable
2016-09-02 17:35:47 +01:00
OpenSceneGraph git repository
def6508308
Merge pull request #118 from LaurensVoerman/Submissions2b
...
fix colliding include guards and spurious #define OSGUI_EXPORT
2016-09-02 17:34:20 +01:00
Laurens Voerman
1da43a5960
added copyconstructor for osgAnimation::BasicAnimationManager
2016-08-29 13:03:36 +02:00
Laurens Voerman
628f8fd9dc
added call to copy constructor for virtual base classes in copy constructor of derived classes, removed these for abstract classes
2016-08-29 10:41:40 +02:00
Laurens Voerman
ca877a8424
fix colliding include guards and spurious #define OSGUI_EXPORT
2016-08-29 09:40:21 +02:00
Laurens Voerman
dd223002dd
bugfix: wrong class name in META_Object macro for osg::Enablei osg::Disablei
2016-08-29 09:37:14 +02:00
Robert Osfield
0ad09d6dad
Fixed unused variable warnings
2016-08-26 19:18:00 +01:00
Robert Osfield
322adc266c
Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph
2016-08-26 18:00:52 +01:00
Robert Osfield
11ddd53eb4
Removed redundent Referenced::s/getThreadSafeReferenceCounting() and associated static and env vars as there are now inapprorpiate and no longer supported
2016-08-26 17:59:30 +01:00
James Turner
ea9f479674
Attempt to fix broken DLL exports from osgDB
...
Only export the osgDB method implementations, instead of the entire
class, and hence avoid exporting symbols from the base class, which
then conflict with other compilation units when linking.
This avoids the need for /FORCE:MULTIPLE linker option with MSVC.
2016-08-15 22:21:44 +01:00
Robert Osfield
9d9025a6b4
Changed the default paramter for the osgUtil::StateToCompile to retain the OSG-3.4 ABI and fixed indentation.
2016-08-15 12:13:07 +01:00
Robert Osfield
06cb31a3d2
Added automatic assignment of _markerObject to CompileSet.
2016-08-15 11:46:48 +01:00
Robert Osfield
fd0af1d9df
Added Optimizer::BufferObjectVisitor and associated BUFFER_OBJECT_SETTINGS value to enable it via the OSG_OPTIMZIER env var.
...
The BufferObjectVisitor enbales vertex buffer objects usage on Drawable in the scene graph.
2016-07-11 09:52:07 +01:00
Robert Osfield
74f1cc1ec4
Improved casting to address crashes when handling classes that use virtual inheritance.
2016-07-06 11:36:47 +01:00
Robert Osfield
dce1473a53
Seperated out the scene->requiresRedraw() method into a osgViewer::Viewer::requiresRedraw() method to make the functionality clearer and easier to override.
2016-07-05 11:54:31 +01:00
Philippe Renon
22d53357d3
split requiresUpdateSceneGraph() into requires update and requires redraw (wip)
2016-07-04 23:19:20 +02:00
Julien Valentin
36930dcd18
Added serializer support for RigTransforms
2016-07-04 20:19:58 +01:00
Robert Osfield
82ab389fd6
Added Vec2,3,4 for b, ub, s, us, i, ui.
2016-07-04 13:36:28 +01:00
Julien Valentin
50f6cf6a69
Added missing xzyw accessor to Vec4ub
2016-07-04 10:01:17 +01:00
Robert Osfield
b7bf94b4c6
Added const
2016-07-02 14:45:10 +01:00
Robert Osfield
7a63538fb9
Removed inappropriate use of Vec3us in osgAnimation as this relies upon nonexistant functionality in Vec3us and in general just doesn't make sense to attempt to use float point maths with a unsigned short.
2016-07-02 10:44:40 +01:00
OpenSceneGraph git repository
9ae4a4fc27
Merge pull request #95 from marchelbling/tristripvisitor_index_option
...
Adds an indexMesh option to disable mesh reindexation
2016-07-01 18:07:16 +01:00
Marc Helbling
da47f8a156
Adds an indexMesh option to disable mesh reindexation
...
This mainly breaks gles/osgjs when stripifying a MorphGeometry. It also
usually doesn't make sense to reindex an already indexed mesh.
2016-07-01 18:12:36 +02:00
Marc Helbling
43443928d0
Updates osgAnimation
...
This updates is mainly for the gles plugint to work correctly.
* adds Quaternion array
* reintroduces `KeyframeContainer::linearInterpolationDeduplicate`
* fixes MorphGeometry OSG serialization (target names)
2016-07-01 17:04:15 +02:00
Björn Blissing
ed7d49c5d2
CleanUpOperation added to Viewer
...
Sometimes there is need to do cleanup with valid graphic contexts
before closing these contexts. The added operation runs a graphics
operation on each context before closing them.
2016-06-30 22:09:22 +02:00
Robert Osfield
990c04d4b9
Moved the scene related requiresUpdateSceneGraph() implementation details from View into Scene.
...
Added check against the ImagePager.
2016-06-29 15:34:11 +01:00
OpenSceneGraph git repository
48c1d0e8da
Merge pull request #81 from filnet/checkneedtodoframe
...
refactor common code from CompositeViewer::checkNeedToDoFrame() and Viewer::checkNeedToDoFrame() into View
2016-06-29 15:15:31 +01:00
Robert Osfield
00b1173e70
Added osg::ScissorIndexed that wraps up glScissorIndexed function
2016-06-29 15:11:02 +01:00
Robert Osfield
412e9fc3dd
Added osg::DepthRangeIndexed class to wrap up glDepthRangeIndexed functionality.
2016-06-29 12:28:28 +01:00
Robert Osfield
8d7d5d12a1
Added osg::ViewportIndexed that adds support for glViewportIndexed
2016-06-29 11:26:54 +01:00
Laurens Voerman
ec74518868
Added glViewerArray, glSissorArray, glDepthRangeArray etc. GL extension support
2016-06-29 09:53:04 +01:00
Robert Osfield
5c25a3a0ea
Added initializers
2016-06-27 15:06:54 +01:00
Robert Osfield
27595e9f02
Added initializers
2016-06-27 14:53:32 +01:00
Julien Valentin
c8a7ce4e52
Rolbacked RigGeometry with the hackyfix (I just add the compute boundcallback in the copy consturctor)
...
Modified headers of RigTransforms to comply with osg metamodel
2016-06-27 11:51:32 +01:00
Julien Valentin
ce28b2e43e
MorphGeometry fixes
2016-06-25 18:15:57 +01:00
Robert Osfield
40ccf503e4
Fixed warnings
2016-06-25 17:19:00 +01:00
Robert Osfield
ca0fff8313
Added extern and export
2016-06-25 16:32:58 +01:00
Robert Osfield
1204c32430
Changed back to requiring osgDB namespace so it's clearer where function comes from.
2016-06-25 16:13:56 +01:00
Robert Osfield
ed59753741
Added namespace prefix
2016-06-25 16:10:56 +01:00
Robert Osfield
6d7d58fa12
Added osgDB::stringcopy and stringcopyfixedsize
2016-06-25 16:08:15 +01:00
Robert Osfield
39317acd42
Changed return type to unsigned int to make it more compatible with serialization
2016-06-25 12:35:34 +01:00
Robert Osfield
949aca196d
Refactored handling of StateAttiribute's that override the StateAttiribute::getMember() so that when they change their Member value they update the StateSet parents that own them to keep the StateSet's maps coherent.
2016-06-25 12:24:19 +01:00
Cedric Pinson
0ecb52ff82
Submitted with fixes by Julian Valentin
2016-06-25 07:49:56 +01:00
Robert Osfield
6bbd5299b6
Removed unused member variable
2016-06-24 12:12:50 +01:00
Robert Osfield
b9c3377d88
Added initializers
2016-06-24 12:11:09 +01:00
Robert Osfield
601884131e
Added initializers
2016-06-24 11:58:38 +01:00
Robert Osfield
c8d668b298
Added depecated message to redundent shape classes
2016-06-24 09:46:19 +01:00
Robert Osfield
eb4dcba21a
Removed unused variable
2016-06-23 16:32:45 +01:00
Robert Osfield
07137f4111
Fixed unitialized variables
2016-06-23 16:32:02 +01:00
Robert Osfield
1f73376476
Restructed the GLExtensions(..) constructor so that it now intializes all the variables to NULL if there is not a valid graphics context present
2016-06-23 12:19:59 +01:00
Robert Osfield
bc8452512f
Added initializers and handling of null case
2016-06-23 11:03:38 +01:00
Robert Osfield
5955d362a6
Added initializer
2016-06-22 12:10:49 +01:00
Robert Osfield
a5ec8b7eda
Added initializers
2016-06-22 12:08:10 +01:00
Robert Osfield
1d7f75c490
Added initializer
2016-06-22 12:03:10 +01:00
Robert Osfield
f2704e0bf3
Removed dead code
2016-06-22 11:58:45 +01:00
Robert Osfield
f7afd3bab2
Added initializer
2016-06-22 11:51:04 +01:00
Robert Osfield
acaf9fd720
Added initializer
2016-06-22 11:48:30 +01:00
Robert Osfield
97acecdf66
Added initializer
2016-06-22 11:41:58 +01:00
Robert Osfield
8a83bd73bb
Added missing initializers
2016-06-22 11:39:11 +01:00
Robert Osfield
471e556e91
Added initializers
2016-06-22 11:27:15 +01:00
Robert Osfield
67cc776696
Added default_value() template to help with creating templates that need to initialize members that are floats etc.
2016-06-22 11:26:11 +01:00
Robert Osfield
d5f18590fd
Added intializers
2016-06-22 10:35:37 +01:00
Ralf Habacker
7876c7915b
clang 6.0 compile fixes.
2016-06-20 10:32:42 +01:00
Ralf Habacker
69929f596f
Fix finding object cache entries.
2016-06-20 10:26:12 +01:00
Robert Osfield
7d34e8f441
Build fixes to reflect removal of deprecated_osg::Geometry
2016-06-17 12:49:44 +01:00
Julien Valentin
e236acfed5
Added OpenGL extensions related to shader subroutine
2016-06-17 10:35:25 +01:00
Julien Valentin
78b99c7143
Refactored osg::TextureBuffer to support assigning any type of osg::BufferData rather than just osg::Image as was previously required.
...
Refactored osgforest and osggpucull examples to take account of changes to TextureBuffer.
Added osg::DrawIndirectBufferBinding.
2016-06-15 19:05:35 +01:00
Robert Osfield
819ce6c0d1
Removed redundent _boundingBoxComputed
2016-06-14 18:27:27 +01:00
Ralf Habacker
85cd1c456f
Identify files in object cache by filename and optional provided options.
...
Objects with the same filename may be different from others based on the provided
plugin options. Using filename *and* the provided options as object cache key
helps to avoid fetching the wrong object.
2016-06-14 12:27:33 +01:00
Julien Valentin
2ac8379cfc
osgDB Wrapper Associates Revision Tagging
2016-06-14 11:43:45 +01:00
Robert Osfield
4c5ca932c8
Added #include <string> in case other headers don't include it.
2016-06-13 16:24:01 +01:00
Philippe Renon
dfc9eec3c3
make osgViewer::View::requiresUpdateSceneGraph() virtual
2016-06-11 17:05:00 +02:00
Philippe Renon
37ef07ce7e
refactor common code from CompositeViewer::checkNeedToDoFrame() and Viewer::checkNeedToDoFrame() into View
2016-06-11 16:58:51 +02:00
Julien Valentin
ac26ba7e5b
Shader subroutine related funcs added
2016-06-09 10:48:05 +01:00
Robert Osfield
8bfe67b37b
Fixed unused parameter warning.
2016-06-08 10:54:36 +01:00
Robert Osfield
b1539418b3
Fixed unused parameter warning.
2016-06-08 09:46:58 +01:00
Robert Osfield
aef2574b8d
Fixed -Wextra warnings
2016-06-08 09:46:09 +01:00
Robert Osfield
ef73d2449e
Fixed -Wextra warnings
2016-06-08 09:20:16 +01:00
Robert Osfield
10e27681dd
Fixed "unreferenced formal parameter" warnings
2016-06-07 08:53:42 +01:00
Robert Osfield
27caa9c1b1
Removed redundent _EXT
2016-06-06 12:05:28 +01:00
Jethro Leevers
08a823d857
Added support for GL_LINE_STRIP_ADJACENCY_EXT
2016-06-06 11:59:56 +01:00
Björn Blissing
e8f103afc9
VS2015 build fix
2016-06-03 17:22:28 +01:00
Robert Osfield
afe89e8d94
Added float variants of osg::PI etc. in the form osg::PIf
...
Converted osg::PI usage to osg::PIf in ShapeDrawable.cpp to address Windows build errors
2016-06-03 11:28:10 +01:00
Robert Osfield
41ce857c93
Fixed clang warnings
2016-06-03 09:33:47 +01:00
Robert Osfield
d038866649
Fixed method to match parent class.
2016-06-02 14:31:44 +01:00
Robert Osfield
d3c6dc6f34
Fixed doxygen warnings
2016-06-01 14:20:14 +01:00
Julien Valentin
5a4a5c3507
Added glDrawArraysIndirect, glMultiDrawArraysIndirect, glDrawElementsIndirect and glMultiDrawElementsIndirect extensions.
2016-06-01 10:01:44 +01:00
Pjotr Svetachov
1823341cce
small optimization to the osgb/t serializers.
2016-05-31 11:27:30 +01:00
Jannik Heller
55e5d74a1c
Fixed typo of method name
2016-05-30 13:44:54 +01:00
Alberto Luaces
260cbab518
Typo fixes
2016-05-30 12:30:05 +01:00
Robert Osfield
c36c0033fd
Fixed shadows warnings
2016-05-23 20:02:36 +01:00
Robert Osfield
5260e3a35e
Fixed build error introduced by c3f2711b09
2016-05-23 11:31:02 +01:00
rdiankov
da34da18ca
add safety checking when dereferencing ref_ptr
2016-05-21 21:29:14 +02:00
Robert Osfield
ae3ba28fee
Fixes shadows warnings
2016-05-20 13:38:34 +01:00
Adri
89a2ed7da4
Extra header include.
...
Removed an extra header include for <QGLWidget>
2016-05-19 18:53:15 +01:00
Jannik Heller
a5b05f77ea
This submission removes the define / code path OSG_USE_BOUND that was never used. The class osg::Bound used by this code doesn't exist either.
2016-05-19 17:32:24 +01:00
Robert Osfield
fe6238d126
Added osg::GraphicsContext::WindowingSystemInterfaces singleton for managing multiple WIndowinSystemInterface
...
implementations being registered at the same time.
One usage case for this functionality to support usage of Wayland and X11 in the same version of the osgViewer.
As part of the new functionality there is now a osg::GraphicsContext::Traits::windowingSystemPreferrence string
that default to empty, but if defined will ensure that a specific WindowingSystemInterface is utilized when
you do a generic call like osg::createGraphicsContext().
Also implemented is standard proxy object for registering the new contexts and removing them automatically, and
declaration of standard graphicswindow_name() C entry point to help with static build linking.
2016-05-16 13:45:31 +01:00
Robert Osfield
7b34ca0a39
Added using to quieten warning
2016-04-29 10:39:57 +01:00
Robert Osfield
eb50a15b52
Fixed ShaderComposer::releaseGLObjects(State*) const method as it's const was missing.
...
Rewrote the ShaderComposer::releaseGLObjects() const method to pass on the releaseGLObjects() calls to any associated Program or Shader objects.
2016-04-18 20:46:45 +01:00
Robert Osfield
459ae5ce64
Changed the default value paramter to be consistent with the non templated version of StateSet::setTextureAttributeAndModes(..)
2016-03-29 20:24:05 +01:00
Robert Osfield
68430ee8e5
Added a local implementation of SlideEventHandler::checkNeedToDoFrame() so that Present3D can toggle on/off the need for continuous rendering to only slides that require it,
...
enabling slides with no animation to sit iddle rather keeping rendering, reducing CPU/GPU overhead and saving power.
2016-03-10 16:35:08 +00:00
Robert Osfield
f5b5202296
From Joe Thompson, "OpenSceneGraph cannot be built with Visual Studio 2008.
...
The file osg-OpenSceneGraph-3.4.0\include\osg\Types
typedefs int8_t, int16_t, int32_t and int64_t
These are typedefed as signed __intX in several other places.
With VS2008, this causes an error "int8_t redifined, different basic types"
Explicitly declaring them signed fixes the error."
2016-03-02 09:18:26 +00:00
Robert Osfield
bb79e523d4
From Konstantin Matveyev, "Two classes (with wrappers) added to osgAnimation: UpdateVec2fUniform and UpdateVec4fUniform"
2016-03-01 15:09:12 +00:00
Robert Osfield
d055216740
From Wee See and Robert Osfield, Introduced StatsHandler::collectWhichCamerasToRenderStatsFor(osgViewer::ViewerBase* viewer, osgViewer::ViewerBase::Cameras& cameras) method to make it
...
possible to customize which Cameras the handler renders stats for.
2016-03-01 11:06:39 +00:00
Robert Osfield
5d03bb9a2b
From Jannik Heller, "This submission fixes a stuttering issue that may occur when occlusion query nodes are in view. The problem is that OSG retrieves the occlusion query result without first checking if it's available (GL_QUERY_RESULT_AVAILABLE). Thus, the driver has to sync with the GPU i.e. wait for all queued draw calls to complete. This is particularly bad in V-Synced situations where the driver may be using multi frame queueing techniques - coupled with the fact that OSG only runs an occlusion query every 5th frame, results in very unpleasant stuttering in some situations.
...
The change I made is to check GL_QUERY_RESULT_AVAILABLE before retrieving the query, to ensure that there won't be a stall. If the query result is not available yet, we'll leave it alone and try again in the next frame.
Had to make a few more changes than I'd liked, mostly because the TestResult mechanism wasn't designed for holding on to query objects for more than one frame. As well, I'm thinking that RetrieveQueriesCallback and ClearQueriesCallback could be merged together, if we wanted to go for more refactoring. For though now my strategy is to make as little changes as possible. Let me know what you think of the patch."
2016-03-01 10:37:41 +00:00
Robert Osfield
be98c884bd
From Ognjen Kostic, "Some android phones have no support for OES_element_index_uint extension that is required if glDrawElements is to be called with GL_UNSIGNED_INT for element type.
...
In OSG 3.4, osgText::Text( ::_quadIndices) uses DrawElementsUInt that will fail on these devices and no text will appear - tested on Samsung Galaxy Trend 2 SM-G313HN.
When DrawElementsUInt is replaced with DrawElementsUShort it works, although I'm not sure if this can cause other problems with some fonts.
Fix:
- In include\osgText\Text, line 316:
replace: "osg::ref_ptr< osg::DrawElementsUInt > _quadIndices;"
with: "osg::ref_ptr< osg::DrawElementsUShort > _quadIndices;"
- In src\osgText\Text.cpp, line 2094:
replace: "_quadIndices = new DrawElementsUInt(PrimitiveSet::TRIANGLES);"
with: "_quadIndices = new DrawElementsUShort(PrimitiveSet::TRIANGLES);"
"
2016-03-01 10:21:14 +00:00
Robert Osfield
58f940c0f1
Updated the AuthenticationDetails::HttpAuthentication enum to reflect current libcurl values
2016-02-18 19:53:36 +00:00
Robert Osfield
98ca24ff4e
From Laurens Voerman, "a few additions in the repository (asDrawableEventCallback / asDrawableCullCallback) made this version a bit outdated,
...
so I get so new warnings. This update can fix those warnings."
2016-02-17 15:09:14 +00:00
Robert Osfield
67202b2662
From Romain Ouabdelkader, "This is a fix for osgText to calculate kerning and to load glyph3D with the text's font resolution.
...
Font::getKerning(...), Font::getGlyph3D(...) doesn't ask for a font resolution so it uses the last font resolution requested by Font:: getGlyph(...).
This can leads to different results depending of the precedent call to Font::getGlyph(...).
See http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2016-January/271952.html for more infos.
This fix adds a font resolution parameter to Font::getKerning(...), Font::getGlyph3D(...) and to the font implementations.
This was made under the base revision r15182."
2016-02-15 13:30:39 +00:00
Robert Osfield
937ef73521
From Laurens Loerman, Fix for "Visual Studio 2013 gives me a large amount (2778) of warnings about inheritance via dominace (C4250)."
2016-02-15 12:37:05 +00:00
Robert Osfield
8cefa05e3a
From "Jannik Heller", I just updated to the latest commit and noticed that drawable cull callbacks were no longer working. As it turns out there was a missing implementation of the asDrawableCullCallback() and asDrawableEventCallback(), after implementing these methods everything is working as expected.
2016-02-04 20:15:14 +00:00
Robert Osfield
aa17f5441a
From Laurens Voerman,
...
"E:\osg\osgSvnGit\OpenSceneGraph\include\osg/Callback(286): warning C4099: 'osg::DrawableUpdateCallback' : type name first seen using 'class' now seen using 'struct' (E:\osg\osgSvnGit\OpenSceneGraph\src\osgUtil\RenderBin.cpp)
E:\osg\osgSvnGit\OpenSceneGraph\include\osg/Callback(27) : see declaration of 'osg::DrawableUpdateCallback'
attached is a modified version of include/osg/Callback:
changing
- struct OSG_EXPORT DrawableUpdateCallback : public virtual Callback
- {
to
+ class OSG_EXPORT DrawableUpdateCallback : public virtual Callback
+ {
+ public:
and the same changes for DrawableEventCallback and DrawableCullCallback"
2016-02-04 19:53:13 +00:00
Robert Osfield
e00977f3c2
Added OSG_EXPORT
2016-02-04 19:40:14 +00:00
Robert Osfield
dcadd69c5a
Added releaseGLObjects(..) and resizeGLObjectBuffers(..) to osgShadow::ShadowTechnique's
2016-02-04 17:52:44 +00:00
Robert Osfield
f373bcf23d
Added osg::resizeGLObjectBuffers(..) and osg::releaseGLObjects(..) functions to make it easier to call these methods on objects which ref_ptr<> or C pointers are held for.
2016-02-04 17:36:33 +00:00
Robert Osfield
f8306f145a
Added NodeVisitor::g/setValueMap and g/setValueStack, and osg::PushPopObject and osg::PushPopValue helper classes for pushing/popping values to the NodeVisitor's ValueStack.
2016-02-04 13:12:33 +00:00
Robert Osfield
b4eb8d4597
Improved the speed of the ValueObject get/setting by utilizing typeid() and static_cast<> in place of original dynamic_cast<>'s
2016-02-04 13:10:28 +00:00
Robert Osfield
041ab29d1f
Added osg::Identifer, osg::ValueMap and osg::ValueStack classes to provide a general purpose means for storing and retrieving values from map or stack containers.
...
Typical use will be for storing and passing values between nodes during traversals.
2016-02-04 13:04:40 +00:00
Robert Osfield
4deca2d38b
From Jannik Heller and Robert Osfield, introduced ReadResult/WriteResult::statusMessage() method that creates a std::string from the stutus value and message string.
2016-01-25 12:23:04 +00:00
Robert Osfield
5cb486f7c5
Added osg::MultiDrawArrays which wraps up glMultiDrawArrays extension.
2016-01-22 09:47:49 +00:00
Robert Osfield
4de2fc120d
Merge branch 'master' of https://github.com/openscenegraph/osg
2016-01-20 17:51:03 +00:00
Robert Osfield
8fc287c1b7
Added asUpdate/Cull/EventVisitor and asCamera/asDrawable to osg::Object and usage of these within the code base to avoid dynamic_cast<> usage.
2016-01-20 17:49:10 +00:00
Robert Osfield
1219a6d3bf
Added more osg::Object::as*() methods and usage of these through the code base to avoid use of dynamic_cast<> when using UpdateVisitor/CullVisitor/EventVIisitor etc.
2016-01-20 15:13:19 +00:00
Robert Osfield
e5a7c353ae
From Jannik Heller, "This submission fixes a typo in the new GLObjectManager
...
sheduleGLObjectForDeletion(GLuint globj);
should be
scheduleGLObjectForDeletion(GLuint globj)"
2016-01-19 14:49:56 +00:00
Robert Osfield
b3e0f83c07
From Jordi Torres, "Added TriangleLinePointIndexFunctor to osg namespace"
2016-01-19 14:22:12 +00:00
Robert Osfield
55a8f4abbc
Renamed DrawableUpdate/Event/Cull callbacks to use new include/osg/Callback versions
2016-01-19 11:39:28 +00:00
Robert Osfield
baaf5712c4
Added missing OSG_EXPORT
2016-01-19 09:46:20 +00:00
Robert Osfield
3e92c1fc43
Added osg::Object::asStateSet() implementation and usage to avoid use of dynamic_cast<>
2016-01-18 20:05:20 +00:00
Robert Osfield
340615de55
Replaced dynamic_cast<*Callback> with as*Callback() implementation/usage.
2016-01-18 19:04:28 +00:00
Robert Osfield
48225171e0
From Jannik Heller, "This submission fixes a bug introduced in commit 5b17e3bc2a
"Introduced CMake option OSG_PROVIDE_READFILE option...". The added overload for StateSet::setAttributeAndModes was ignoring the mode setting.
...
"
2016-01-18 13:10:14 +00:00
Robert Osfield
7409820a8f
Added Simplifier::requiresDownSampling()/requiresDownSamplingImplementation() to make it possible for the
...
Simplfifer::ContinueSimplificationCallback to be able to decide whether up or downsampling is required,
removing the previous hardwards reliance on getSampleRatio<1.0.
2016-01-18 11:50:07 +00:00
Robert Osfield
ead6924a78
Fixed typo
2015-11-23 08:54:09 +00:00
Robert Osfield
dd996a3289
Introduced CMake option OSG_PROVIDE_READFILE option that defaults to ON, but when switched to OFF disables the building of the osgDB::read*File() methods,
...
forcing users to use osgDB::readRef*File() methods. The later is preferable as it closes a potential threading bug when using paging databases in conjunction
with the osgDB::Registry Object Cache. This threading bug occurs when one thread gets an object from the Cache via an osgDB::read*File() call where only
a pointer to the object is passed back, so taking a reference to the object is delayed till it gets reassigned to a ref_ptr<>, but at the same time another
thread calls a flush of the Object Cache deleting this object as it's referenceCount is now zero. Using osgDB::readREf*File() makes sure the a ref_ptr<> is
passed back and the referenceCount never goes to zero.
To ensure the OSG builds when OSG_PROVIDE_READFILE is to OFF the many cases of osgDB::read*File() usage had to be replaced with a ref_ptr<> osgDB::readRef*File()
usage. The avoid this change causing lots of other client code to be rewritten to handle the use of ref_ptr<> in place of C pointer I introduced a serious of
templte methods in various class to adapt ref_ptr<> to the underly C pointer to be passed to old OSG API's, example of this is found in include/osg/Group:
bool addChild(Node* child); // old method which can only be used with a Node*
tempalte<class T> bool addChild(const osg::ref_ptr<T>& child) { return addChild(child.get()); } // adapter template method
These changes together cover 149 modified files, so it's a large submission. This extent of changes are warrent to make use of the Object Cache
and multi-threaded loaded more robust.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15164 16af8721-9629-0410-8352-f15c8da7e697
2015-10-22 13:42:19 +00:00
Robert Osfield
de4a430931
From Kristofer Tingdahl, "we had a minor shadow problem with the osg-3.4 that pollutes our continuous integration"
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15143 16af8721-9629-0410-8352-f15c8da7e697
2015-09-25 15:20:25 +00:00
Robert Osfield
7aae720636
Refactored the way that FrameStamp is managed in osgViewer::Renderer to avoid thread conflicts
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15138 16af8721-9629-0410-8352-f15c8da7e697
2015-09-25 10:09:27 +00:00
Robert Osfield
62764a56c5
Added support for serializing Camera::ImplicitBufferAttachmentRenderMask and ImplicitBufferAttachmentResolveMask properties.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15135 16af8721-9629-0410-8352-f15c8da7e697
2015-09-24 10:52:35 +00:00
Robert Osfield
2fe4fc38bb
Added missing OSG_EXPORT to fix Windows build
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15131 16af8721-9629-0410-8352-f15c8da7e697
2015-09-23 10:41:54 +00:00
Robert Osfield
161246d864
Refactored the GL object deletion management to use new osg::GraphicsObjectManager/GLObjectManager base classes, and osg::ContextData container.
...
This approach unifies much of the code handling the clean up of OpenGL graphics data, avoids lots of local mutexes and static variables that were previously required,
and enables the clean up scheme to be easily extended by users providing their own GraphicsObjectManager subclasses.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15130 16af8721-9629-0410-8352-f15c8da7e697
2015-09-23 09:47:34 +00:00
Robert Osfield
34794c5c27
From Laurens Voerman, "I found that using an ImageSequence with mode PAGE_AND_DISCARD_USED_IMAGES triggers the (3) imageThreads to run and never stop, even when no more work is to be done. This is due to a bug in the stop condition currently setting the thread to stop and wait for a signal only when no work needs to be done AND the databasepager is paused.
...
It should stop and wait for a signal on either of those two. Due to a few logical inversions it boils down to replacing || with &&
OLD _block->set((!_requestList.empty() || !_pager->_databasePagerThreadPaused));
NEW _block->set((!_requestList.empty() && !_pager->_databasePagerThreadPaused));//release the threads to run IF (work_to_be_done && not_paused)
This bug is present since svn rev 8663 (just before 2.6.0 release)
attached is a zip with the files:
OpenSceneGraph\include\osgDB\ImagePager
This file is valid for svn branch and stable 3.2 and 3.4
branches 2.6 - 3.0 have the same bug, but other differences in the file."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15125 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 15:04:58 +00:00
Robert Osfield
0d72b85881
Fixed warning
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15119 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 14:24:11 +00:00
Robert Osfield
53a850c671
Fixed warning by removing redundent check
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15118 16af8721-9629-0410-8352-f15c8da7e697
2015-09-04 14:23:55 +00:00
Robert Osfield
0532c93c8c
Corrected the Subload::generateTextureObject() return type to make it consistent with Texture::generateTextureObject(..)
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15117 16af8721-9629-0410-8352-f15c8da7e697
2015-08-14 15:25:08 +00:00
Robert Osfield
aff6e112ec
Added support for injecting GL_VENDOR strings into GLSL shaders via the new #pragma(tic) shader composition
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15078 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 17:42:05 +00:00
Robert Osfield
8ab27a20d2
Build fix for VS and installing Types
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15077 16af8721-9629-0410-8352-f15c8da7e697
2015-08-10 05:04:56 +00:00
Robert Osfield
583801179e
Added #ifdef guards around SGIX specific parts to avoid build problems with GLES
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15069 16af8721-9629-0410-8352-f15c8da7e697
2015-08-09 09:07:05 +00:00
Robert Osfield
687e77ddc9
From Andy Skinner, "Someone was using our code on a system that does not seem to have the SGIX symbols used in osgViewer.cpp.
...
I used osgSetGLExtensionsFuncPtr to remove the symbols. I don't know how to test this path, but it did remove the symbols from libosgViewer.so. I have also not been able yet to see if that was sufficient for our customer.
I did this by looking at other cases, and I tried to follow some of the same practices in PixelBufferX11, like using _useSGIX in a similar way to the previous _useGLX1_3."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15041 16af8721-9629-0410-8352-f15c8da7e697
2015-08-03 19:14:09 +00:00
Robert Osfield
55d36b544b
Warning fix
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15032 16af8721-9629-0410-8352-f15c8da7e697
2015-07-31 10:59:11 +00:00
Robert Osfield
0dd625f17e
Added explicit initialization of osg::Referenced(true) to osg::Operation subclasses as it uses virtual inhertiance from osg::Referenced.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15025 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 15:46:47 +00:00
Robert Osfield
435a81a905
From Pjotr Svetachov, buid fixes for VS2015.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15021 16af8721-9629-0410-8352-f15c8da7e697
2015-07-23 14:37:17 +00:00
Robert Osfield
ec8779ca6f
Moved GL_ALPHA_TEST from AlphaFunc header to GLDefines header
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15002 16af8721-9629-0410-8352-f15c8da7e697
2015-07-22 14:03:24 +00:00
Robert Osfield
36352031ef
Fixed typo
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14997 16af8721-9629-0410-8352-f15c8da7e697
2015-07-21 13:42:35 +00:00
Robert Osfield
c4fdc93053
Added Text::GlyphQuads::release/resizeGLObjects() and handling of inconsistent contextID sizes to avoid crashes when viewers and scene graphs aren't initialized correctly to the right number of contexts.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14947 16af8721-9629-0410-8352-f15c8da7e697
2015-07-13 16:09:45 +00:00
Robert Osfield
1859e27501
From Terry Welsh, "fThis fixes problem where new glClipControl feature would not compile for GLES2 profile"
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14943 16af8721-9629-0410-8352-f15c8da7e697
2015-07-13 08:48:46 +00:00
Robert Osfield
08893c7fcc
Moved the defination of GL_MAX_VARYING_COMPONENTS to GL_3_0 block to avoid warnings of redefinition.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14933 16af8721-9629-0410-8352-f15c8da7e697
2015-07-02 08:52:55 +00:00
Robert Osfield
b4cd40cf7c
From Mathias Froehlich, "Attached a new state attribute implementing the glClipControl that appeared with GL4.5."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14928 16af8721-9629-0410-8352-f15c8da7e697
2015-06-30 09:11:00 +00:00
Robert Osfield
fe09ebfbdb
From Christian Kehl, added Vec2::set(const Vec2) method
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14924 16af8721-9629-0410-8352-f15c8da7e697
2015-06-26 09:40:37 +00:00
Robert Osfield
1e0d682979
From Jannik Heller, "I've added the check for Qt version mismatches into osgQt as suggested in http://forum.openscenegraph.org/viewtopic.php?t=14999 .
...
When an application is built with Qt4, but osgQt was built with Qt5 (or vice versa), upon #includeing osgQt users will receive an #error aborting the build.
This at least provides a proper error message rather than a crash, while we are working on better fixes for the problem."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14918 16af8721-9629-0410-8352-f15c8da7e697
2015-06-15 19:59:01 +00:00
Robert Osfield
824cc95518
Experiment with how to define GLsizeiptr.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14917 16af8721-9629-0410-8352-f15c8da7e697
2015-06-15 13:51:29 +00:00
Robert Osfield
75891924bb
Removed old and unused windows code path to avoid confusion
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14915 16af8721-9629-0410-8352-f15c8da7e697
2015-06-12 20:23:15 +00:00
Robert Osfield
fc9848ff19
Reverted the typdef GLfloat GLdouble for Andoid as this was causing conflicts.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14910 16af8721-9629-0410-8352-f15c8da7e697
2015-06-11 08:44:26 +00:00
Robert Osfield
11a55ea6de
Added supoort for osg::CullSettings/Camera::InheritanceMaskActionOnAttributeSetting and InheritanceMask properties.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14904 16af8721-9629-0410-8352-f15c8da7e697
2015-06-09 16:49:20 +00:00
Robert Osfield
bd9bd3f8b2
Added namespace around typedef to avoid conflict issues
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14903 16af8721-9629-0410-8352-f15c8da7e697
2015-06-09 12:51:38 +00:00
Robert Osfield
7e05d2fd54
Introduce osg::Object::asNode(), asNodeVisitor(), asStateAttribute() and asUniform() to replace dynamic_cast<> usage in Callback.cpp.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14902 16af8721-9629-0410-8352-f15c8da7e697
2015-06-09 10:49:34 +00:00
Robert Osfield
4073910ce8
From Mike Connell, "Give ReadFileCallback access to parent location : These small changes to the database pager allow user code in the ReadFileCallback to safely determine where the file being loaded is destined to be inserted into the scenegraph.
...
"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14899 16af8721-9629-0410-8352-f15c8da7e697
2015-06-08 11:18:24 +00:00
Robert Osfield
ff42ff2a11
From Jannik Heller, Removed unused StatsHandler::_keyEventToggleVsync
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14893 16af8721-9629-0410-8352-f15c8da7e697
2015-06-04 09:05:24 +00:00
Robert Osfield
23cd6d2ba3
From Jannik Heller, "In the attachment you will find a build fix for the latest trunk. osgAnimation failed to compile when using OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION=OFF ."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14892 16af8721-9629-0410-8352-f15c8da7e697
2015-06-04 09:00:17 +00:00
Robert Osfield
95f911e98c
Removed export that was breaking windows build
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14891 16af8721-9629-0410-8352-f15c8da7e697
2015-06-03 10:28:34 +00:00
Robert Osfield
fd46645ade
From KOS, "New classes for osgAnimation presented: UpdateFloatUniform, UpdateVec3fUniform and UpdateMatrixfUniform (based on UpdateUniform template)
...
Classes operate like osgAnimation::UpdateMaterial for Material's diffuse component, but change Uniform."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14890 16af8721-9629-0410-8352-f15c8da7e697
2015-06-03 09:14:35 +00:00
Robert Osfield
9222506a2c
Added doxygen comment for typedef
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14888 16af8721-9629-0410-8352-f15c8da7e697
2015-06-03 09:06:44 +00:00
Robert Osfield
e3f0876e87
From Konstantin Matveyev, "I've changed osg::Uniform::Callback to osg::UniformCallback.
...
osg::UniformCallback inherits osg::Callback now.
I don't really now if this class should be inside osgWrappers/serializers
because StateAttributeCallback is not presented there, but i've included it in the patch.
Please see archive in the attachment.
PS
DEEP_COPY_UNIFORMS works for me.
"
Note from Robert Osfield, added typedef UniformCallback Callback for backwards compatibility.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14885 16af8721-9629-0410-8352-f15c8da7e697
2015-06-02 09:33:22 +00:00
Robert Osfield
ba9dfb2ff6
From Albert Luaces, typo fixes.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14883 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 13:40:20 +00:00
Robert Osfield
d14a602a59
From Jannik Heller, typo fixes
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14882 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 13:11:49 +00:00
Robert Osfield
120bf699b2
From Frashud Lashkari, "I was getting "Unsupported wrapper class..." error messages when attempting to load osgb models simultaneously from multiple threads. I believe the problem is caused by un-synchronized access to the global osgDB::ObjectWrapperManager class. I've attached a change that adds a mutex to the class and uses it when accessing the internal wrapper/compress maps. This appears to fix the issues I was having."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14880 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 12:07:04 +00:00
Robert Osfield
78a01ce2a5
From Jannik Heller, "I have added new functions Texture::generateAndAssignTextureObject mirroring the Texture::generateTextureObject functions.
...
I have left the Texture::generateTextureObject functions intact as I'm not sure if/how it's used outside the core OSG. If you feel that compatibility isn't important in that area feel free to drop it.
While testing the build with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION=OFF I found a compile error in GlyphGeometry.cpp that was entirely unrelated to the changes I've made. The fix is included in the patch.
There is one thing left to fix and that is Texture2D::SubloadCallback:
class OSG_EXPORT SubloadCallback : public Referenced
{
public:
....
virtual TextureObject* generateTextureObject(const Texture2D& texture, State& state) const
{
return osg::Texture::generateTextureObject(&texture, state.getContextID(), GL_TEXTURE_2D);
}
...
}"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14879 16af8721-9629-0410-8352-f15c8da7e697
2015-06-01 10:50:44 +00:00
Robert Osfield
f72b62a065
From Jannik Heller, fix for race condition in orphanded BufferObject handling.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14877 16af8721-9629-0410-8352-f15c8da7e697
2015-05-29 07:52:27 +00:00
Robert Osfield
820166b49d
Rewrote the Text3D bevel implementation to automatically adjust bevel thickness to avoid overalapping and erronous tesselation.
...
Added osgText::Bevel::s/getRoundedConcaveJunctions(bool) to control how the bevel should be tessellated around concave junctions on the glyph boundary.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14871 16af8721-9629-0410-8352-f15c8da7e697
2015-05-26 10:05:47 +00:00
Robert Osfield
d5b615a4e1
Added osgGA::GUIEventAdapter* returns from various EventQueue event generation methods.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14868 16af8721-9629-0410-8352-f15c8da7e697
2015-05-25 11:33:04 +00:00
Robert Osfield
5380aebfc1
From Christian Kehl, changes for making osgAndroid working with GLES1 enabled
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14862 16af8721-9629-0410-8352-f15c8da7e697
2015-04-30 14:04:51 +00:00
Robert Osfield
8962838e6a
Replaced attempt at passing NULL Matrix with two specialized methods.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14860 16af8721-9629-0410-8352-f15c8da7e697
2015-04-28 16:12:57 +00:00
Robert Osfield
e52b95e084
Renamed LineSegment::intersect(BoundingSphere/Box, double/float&, double/float&) methods to LineSegment::intersectAndComputeRations(..) to avoid confusion with the change in convention for
...
the old intersect(BoundingBox&, float/double&, float/double&) method as it was inconsitent with the rest of the OSG including the intersect(BoundingSphere) method in how the ratio for the
second intersection was measure from - original from the end point, but now made consistent with other places in the OSG so be based on ration from start to end of segment.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14859 16af8721-9629-0410-8352-f15c8da7e697
2015-04-27 19:31:13 +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
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
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
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
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
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
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
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
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
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
e2f208af54
Refactored how the callbacks for updating geometry are managed in MorphGeometry and RigGeometry to address bugs in serialization.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14784 16af8721-9629-0410-8352-f15c8da7e697
2015-03-12 17:11:11 +00:00
Robert Osfield
75b9cd3627
Completed support for assigning 3D osg::Image to osg::Texture2DArray.
...
Improved the osgtexture2DArray example to add --mipmap and --packed command line options to help with testing.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14775 16af8721-9629-0410-8352-f15c8da7e697
2015-03-11 17:27:08 +00:00
Robert Osfield
c30be2355b
Work in progress to allow osg::Texture2DArray to be set up with a single osg::Image containing 3D image data.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14773 16af8721-9629-0410-8352-f15c8da7e697
2015-03-10 18:15:02 +00:00
Robert Osfield
8c8b8f3305
Restructed the osgPresentation and present3D directories back to the structure that was present in OSG-3.2
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14759 16af8721-9629-0410-8352-f15c8da7e697
2015-03-04 18:36:44 +00:00
Robert Osfield
26d1679248
Removed the experiemental osgPresentation classes. These are only partially functional and not appropriate for the stable OSG-3.4 release
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14758 16af8721-9629-0410-8352-f15c8da7e697
2015-03-04 17:42:30 +00:00
Robert Osfield
ec6edf535d
From Miha Ravselj, "Regarding previous submission it was only partial solution. After further testing I found similar bug also in ClearNode serializer.
...
//GLbitfield mask = GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT;
This line was problematic since it produced incorrect result when let's say COLOR flag is serialized
it should be null as in Camera serializer or in a proposed BitFlagsSerializer
This line of code caused that whenever only GL_COLOR_BUFFER_BIT bit was written and on value read GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT was restored instead of GL_COLOR_BUFFER_BIT only.
//GLbitfield mask = 0; //this resolves the issue same as in camera
Also same bit-wise comparison bug was also present in write method.
-------------------------------------------------------------------------------------
As you can see there are total 3 bit mask serializers in OSG and all 3 had bugs so I decided to add ADD_BITFLAGS_SERIALIZER and replace USER serializers in osg::Camera, osg::ClearNode and osgText::TextBase. I have made sure that bitflags serializer does not break backwards-compatibility since it uses same code as user serializer does in all 3 cases. (see tester.cpp on how compatibility test was performed)"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14752 16af8721-9629-0410-8352-f15c8da7e697
2015-03-03 12:03:23 +00:00
Robert Osfield
58edd10d04
From Johannes Scholz, "Attached you find a patch for osgDB::OutputStream and osgDB::InputStream to include osg::Image::data() using Base64 encoding inside the ASCII OSGT, if WriteImageHint=IncludeData is set, only."
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14748 16af8721-9629-0410-8352-f15c8da7e697
2015-03-02 12:11:43 +00:00
Robert Osfield
1d9e7f144b
From Michael McDonnel, "The tessellation shader example has a small bug.The middle of the
...
geometry is clipped as soon as it is tessellated. The clipping is
probably caused by rounding errors because it is only in one spot. The
clipping disappears when the camera is moved, and reappears when it is
moved back. Expanding the the bounding box fixed the clipping bug."
Tweaked by Robert Osfield to expand it to a -1 to 1 unit box.
Actual clipping bug is not due to rounding errors but the shaders creating vertices outside the bounding box of the original input vertices
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14747 16af8721-9629-0410-8352-f15c8da7e697
2015-03-02 12:09:25 +00:00
Robert Osfield
77f662f9f7
From Julien Valentin and Alberto Luaces, added support for transform feedback extensions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14728 16af8721-9629-0410-8352-f15c8da7e697
2015-02-26 17:49:36 +00:00
Robert Osfield
47db2da8b4
From Andreas Henne, Support for GL3 core profile in osgText
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14717 16af8721-9629-0410-8352-f15c8da7e697
2015-02-25 18:56:29 +00:00
Robert Osfield
e7d41377be
Fixed handling of NULL entries in osg::Geometry TexCoordArrayList and VertexAttribArrayList.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14715 16af8721-9629-0410-8352-f15c8da7e697
2015-02-25 14:55:59 +00:00
Robert Osfield
afbf20eba9
First step of refactoring the osg::Program management in osgTerrain::GeometryPool for better performance by placing default osg::Program and shader defines on a single StateSet below the osgTerrain::Terrain
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14704 16af8721-9629-0410-8352-f15c8da7e697
2015-02-20 15:02:43 +00:00
Robert Osfield
5c023d1f76
Moved osgTerrain::GeometryPool from osgTerrain::DisplacementMappingTechnique to the osgTerrain::Terrain
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14703 16af8721-9629-0410-8352-f15c8da7e697
2015-02-18 10:52:52 +00:00
Robert Osfield
53198f2e9b
Cleaned up warning generated when compiling osgocculusviewer
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14695 16af8721-9629-0410-8352-f15c8da7e697
2015-02-17 10:36:41 +00:00
Robert Osfield
6bddbdf074
Improvements to the #pragma(tic) shader composition support
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14694 16af8721-9629-0410-8352-f15c8da7e697
2015-02-13 12:50:43 +00:00
Robert Osfield
4a9f4aae9d
Added GL #define for Windows build
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14687 16af8721-9629-0410-8352-f15c8da7e697
2015-02-11 09:41:15 +00:00
Robert Osfield
a676d5d37b
Windows build fix
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14686 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 21:13:16 +00:00
Robert Osfield
06f186dc07
Added GL_LINES_ADJACENCY_EXT variants back into ObjectWraper to enable backwards compatibility.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14685 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 18:01:02 +00:00
Robert Osfield
b38c6258bf
Added support for new #pragam(atic) shader composition to new displacement mapping technique
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14683 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 17:20:26 +00:00
Robert Osfield
b90503fdf5
Introduced new shader composition approach that utilizes #pragma requires(), #pragma import_defines() and #ifdef in GLSL to enable multiple different versions of shaders based
...
on defines passed in from osg::StateSet::setDefine(..).
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14681 16af8721-9629-0410-8352-f15c8da7e697
2015-02-10 17:04:02 +00:00
Robert Osfield
bb637e73f3
Fixed typo.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14680 16af8721-9629-0410-8352-f15c8da7e697
2015-02-04 15:11:00 +00:00
Robert Osfield
1debc21bb2
Removed unncessary _EXT
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14679 16af8721-9629-0410-8352-f15c8da7e697
2015-02-03 16:36:19 +00:00
Robert Osfield
a9804d7e19
Replaced _EXT defines with GL-3.2 versions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14677 16af8721-9629-0410-8352-f15c8da7e697
2015-01-27 15:07:53 +00:00
Robert Osfield
4bcf4cf7bb
Changed osgFX::MultiTextureControl so that it uses an osg::FloatArray internally to enable sharing with osg::Uniform.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14675 16af8721-9629-0410-8352-f15c8da7e697
2015-01-23 13:51:09 +00:00
Robert Osfield
f5faf615ef
Added #define GL_SEPARATE_ATTRIBS and correcte GL_INTERLEAVED_ATTRIBS
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14673 16af8721-9629-0410-8352-f15c8da7e697
2015-01-22 16:49:00 +00:00
Robert Osfield
e330e9309c
Added GL_INTERLEAVED_ATTRIBS for windows build
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14671 16af8721-9629-0410-8352-f15c8da7e697
2015-01-22 15:08:26 +00:00
Robert Osfield
d5f2c34f24
From Andreas Henne, OpenGL core profile fixes required for OSX.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14669 16af8721-9629-0410-8352-f15c8da7e697
2015-01-21 15:35:19 +00:00
Robert Osfield
7fbeeefea8
Added TextureWeights uniform support and controls to osgFX::MultiTextureControl to support usage with shaders.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14668 16af8721-9629-0410-8352-f15c8da7e697
2015-01-21 11:09:29 +00:00
Robert Osfield
98f5fca9c2
Added key osgTerrain::GeometryPool methods virtual to make it easier to override the shaders
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14662 16af8721-9629-0410-8352-f15c8da7e697
2015-01-20 15:23:06 +00:00
Robert Osfield
3eca5765c9
Added GeometryPool::s/getUseGeometryShader() hint, and OSG_TERRAIN_USE_GEOMETRY_SHADER env var for setting the default value.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14660 16af8721-9629-0410-8352-f15c8da7e697
2015-01-19 11:29:55 +00:00
Robert Osfield
249c0ff208
Added support for using geometry shaders to align the quad diagonals with the local terrain
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14658 16af8721-9629-0410-8352-f15c8da7e697
2015-01-16 11:03:11 +00:00
Robert Osfield
3e3d7e4dc1
Added a local Vec3Array cache to the HeightFieldDrawable to facilitate efficient intersection testing
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14656 16af8721-9629-0410-8352-f15c8da7e697
2015-01-12 10:31:58 +00:00
Robert Osfield
ed57c8718c
Added ability to populate a local vertex cache for when one computes final vertex position in a vertex shader but still want to the Primitive functors to work with the transformed positions.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14655 16af8721-9629-0410-8352-f15c8da7e697
2015-01-12 10:30:50 +00:00
Robert Osfield
134b2e506f
Cleaned up GL_TEXTURE_BUFFER_*ARB usage as include/osg/GLDefines now provides the non ARB variants
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14652 16af8721-9629-0410-8352-f15c8da7e697
2015-01-06 17:23:26 +00:00
Robert Osfield
8b384baca9
From Julien Valentin, "To sum up changes, I had:
...
-some extensions in GLExtensions
- GL_TEXTURE_BUFFER as target in osg::StateSet
- a VBO based transform feed back example
"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14651 16af8721-9629-0410-8352-f15c8da7e697
2015-01-06 17:12:51 +00:00
Robert Osfield
a331680cec
From Aurélien Chatelain, "the smoothing visitor did not handle shared arrays. It may leads to bad geometry arrays when a shared array is involved in the scene.
...
This submission adds shared array duplication (and moves the SharedArrayOptimizer declaration in MeshOptimizer to make it callable from the SmoothingVisitor)."
Submitted by Marc Helbling.
Edited by Robet Osfield to retain the usual OSG coding style.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14639 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 10:55:49 +00:00
Robert Osfield
c57e62e799
Added osgDB::readShaderFileWithFallback(..) convinience functions to make it easier to set up reading external shader files with a built in fallback.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14636 16af8721-9629-0410-8352-f15c8da7e697
2014-12-24 10:13:42 +00:00
Robert Osfield
73221e8682
Added doxygen comment for ref_ptr<>::release().
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14630 16af8721-9629-0410-8352-f15c8da7e697
2014-12-22 09:50:10 +00:00
Robert Osfield
6f9ac83693
Added DisplaySettings::s/getNvOptimusEnablement() and OSG_NvOptimusEnablement env var control to control the setting of the NvOptimusEnablement variable
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14614 16af8721-9629-0410-8352-f15c8da7e697
2014-12-18 10:59:07 +00:00
Robert Osfield
58c47e9842
From Marc Helbling, "please find enclosed a submission that should improve the VertexAccessOrderVisitor (pre-transform) optimizer:
...
* it sorts primitives to keep "more complex" primitives first; maybe you'll prefer to have this as an option (but usually it should make more sense to pre-transform triangles before e.g. lines)
* currently, the visitor rely on TriangleIndexFunctor and does not take care of points and lines (see https://github.com/openscenegraph/osg/blob/master/include/osg/TriangleIndexFunctor#L124-130 ). This can lead to issues e.g. if you store the wireframe lines along with some triangles: the triangles will be reindexed but not the line. I've therefore added osg/include/TriangleLinePointIndexFunctor to index triangles, lines and points and derived VertexReorder from this class.
* to avoid issues, shared arrays are duplicated. However, in some cases (e.g. an UV channel shared in the geometry only) this is not required. I'm adding a SharedArrayOptimizer to optimize this: it looks for duplicated UVs before the array duplication and deduplicate arrays after.
"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14603 16af8721-9629-0410-8352-f15c8da7e697
2014-12-16 09:34:15 +00:00
Robert Osfield
117869d154
From Marc Helbling, "please find the mergeTriangleStrip code merged in osgUtil::TriStripVisitor.
...
I've removed the references to DrawArrays as we should no longer produce any.
Note that:
* as the name suggest, it only works for triangle strips but could probably be easily extended to quads
* the resulting primitive is not highly optimized; we could probably sort the strips in order to minimize the number of primitive restart
* as we may merge DrawElementsUInt and DrawElementUShort, the code will only generate DrawElementsUInt"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14602 16af8721-9629-0410-8352-f15c8da7e697
2014-12-15 17:15:21 +00:00
Robert Osfield
49c48a5509
Added OpenGL Transform Feedback extensions.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14600 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 13:05:47 +00:00
Robert Osfield
1b6e50a2dd
From Marcus Hein, Added support for OpenGL SSBO and SSBB via osg::ShaderStorageBufferObject and osg::ShaderStorageBufferBinding to core OSG library, and added new osgSSBO example
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14599 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 12:23:04 +00:00
Robert Osfield
92e2d849ed
Added GLDefines header
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14597 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 11:44:16 +00:00
Robert Osfield
3c07921dee
Removed old GL2Extensions class, replacing it with a typedef to GL2Extensions
...
Removed old includes to include/osg/GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14594 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 10:44:58 +00:00
Robert Osfield
485709f708
Moved GL2Extensions functionality into the include/osg/GLExtensions header and new GLExtensions object.
...
Moved the #defines into new include/osg/GLDefines
Converted all GL2Extensions usage to GLExtensions usage
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14593 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 10:38:12 +00:00
Robert Osfield
09205544b7
Streamlined the extension functions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14592 16af8721-9629-0410-8352-f15c8da7e697
2014-12-10 09:11:17 +00:00
Robert Osfield
7629a5126a
Added #ifdef's around GLsync typedef
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14591 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 21:33:12 +00:00
Robert Osfield
22e51c9902
Windows build fixes
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14590 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 20:09:29 +00:00
Robert Osfield
43049ebcf1
Moved FBO Extensions into GL2Extensions.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14586 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 18:30:28 +00:00
Robert Osfield
d5fcdabfa1
Removed no longer used Extension definition
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14585 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 14:58:34 +00:00
Robert Osfield
e31f682451
Moved local Extensions structs into GL2Extensions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14584 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 14:57:25 +00:00
Robert Osfield
3f1e77d479
Moveved Stencil/StencilTwoSided::Extensions into GL2Extensions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14583 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 11:14:33 +00:00
Robert Osfield
ec4f898bce
Moved local Extensions objects to GL2Extensions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14582 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 10:37:09 +00:00
Robert Osfield
cceee38727
Moved Texture*::Extensions functionality into GL2Extensions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14581 16af8721-9629-0410-8352-f15c8da7e697
2014-12-09 10:05:59 +00:00
Robert Osfield
a8804e2366
MOved VertexProgram and FragmentProgram::Extensions into GL2Extensions.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14580 16af8721-9629-0410-8352-f15c8da7e697
2014-12-08 16:08:44 +00:00
Robert Osfield
bc424bc54f
MOved SampleMaski::Extensions into osg::GL2Extensions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14577 16af8721-9629-0410-8352-f15c8da7e697
2014-12-07 17:31:49 +00:00
Robert Osfield
9b03b3f8ce
Moved TextureCubeMap::Extension functionality into GL2Extensions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14576 16af8721-9629-0410-8352-f15c8da7e697
2014-12-05 20:05:18 +00:00
Robert Osfield
f634152de0
Moved osg::Drawable::Extensions into osg::GL2Extensions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14575 16af8721-9629-0410-8352-f15c8da7e697
2014-12-05 17:26:42 +00:00
Robert Osfield
aa090f0f99
From the GLintptr + GLsizeiptr defintions to GL2Extensions header
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14572 16af8721-9629-0410-8352-f15c8da7e697
2014-12-05 08:58:23 +00:00
Robert Osfield
d83e641fad
Moved osg::BlenFunc::Extensions into osg::GL2Extensions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14571 16af8721-9629-0410-8352-f15c8da7e697
2014-12-04 19:03:16 +00:00
Robert Osfield
d02c0bdc49
Moved GLBufferObject::Extensions structure into osg::GL2Extensions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14570 16af8721-9629-0410-8352-f15c8da7e697
2014-12-04 18:13:11 +00:00
Robert Osfield
1791ac08a8
Added glMemoryBarrier, glMapBufferRange and glBindBufferBase to GL2Extensions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14568 16af8721-9629-0410-8352-f15c8da7e697
2014-12-04 17:12:55 +00:00
Robert Osfield
66da1328f8
Ported GL2Extentions across to using the new GL extensions approach - cutting code count by 3000 lines!
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14566 16af8721-9629-0410-8352-f15c8da7e697
2014-12-04 16:22:31 +00:00
Robert Osfield
5efe60dcf5
Added osg::Capability and Cabibilityi base classes to wrap up glEnable/glDisable + glEnablei/glDisablei functionality, with osg::Enablei and osg::Disablei concrete implementations.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14564 16af8721-9629-0410-8352-f15c8da7e697
2014-12-03 17:31:16 +00:00
Robert Osfield
457d41d385
Added osg::BlendFunci, osg::BlendEquationi and osg::ColorMaski StateAttrirbutes that wrap the glBlendFunci, glBlendEquationi and glColorMaski functions
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14563 16af8721-9629-0410-8352-f15c8da7e697
2014-12-02 17:12:56 +00:00
Robert Osfield
a9cab19ddb
Moved BlendEquation across to using the new GL extension setup approach.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14562 16af8721-9629-0410-8352-f15c8da7e697
2014-12-02 15:37:07 +00:00
Robert Osfield
ff73445bf3
Added a template get and get_exisiting method into osg::State that implements a new mechanism for managing OpenGL extensions.
...
Refactored the BendFunc::Extensions usage to simplify it utilizing the new osg::State extension mechanism.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14560 16af8721-9629-0410-8352-f15c8da7e697
2014-12-02 11:10:23 +00:00
Robert Osfield
e5f5c30e4d
Removed include/osg/Version and include/OpenThreads/Version headers as these are autogenerated.
...
Changed the paths for the OpenThreads/osg Version headers to be placed in the PROJECT_BINARY_DIR.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14557 16af8721-9629-0410-8352-f15c8da7e697
2014-11-28 16:10:14 +00:00
Robert Osfield
d7c6bb1c4b
Standardized on defined(__ANDROID__)
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14556 16af8721-9629-0410-8352-f15c8da7e697
2014-11-28 10:54:40 +00:00
Robert Osfield
4184696809
Windows build fix
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14550 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 19:05:09 +00:00
Robert Osfield
dfb0b2ab8e
Renamed ShaderTerrain to DisplacementMappingTechnique and moved it from the osgterrain example testbed into the osgTerrain NodeKit
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14534 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 14:04:20 +00:00
Robert Osfield
d9f93f9d1a
Moved osgTerrain::GeometryPool from osgterrain example into osgTerrain NodeKit
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14533 16af8721-9629-0410-8352-f15c8da7e697
2014-11-26 13:36:28 +00:00
Robert Osfield
4c5a1885d2
From PawelKsiezopolski, "This submission contains a new example for OSG : a geometry instancing rendering
...
algorithm consisting of two consequent phases :
- first phase is a GLSL shader performing object culling and LOD picking ( a culling shader ).
Every culled object is represented as GL_POINT in the input osg::Geometry.
The output of the culling shader is a set of object LODs that need to be rendered.
The output is stored in texture buffer objects. No pixel is drawn to the screen
because GL_RASTERIZER_DISCARD mode is used.
- second phase draws osg::Geometry containing merged LODs using glDrawArraysIndirect()
function. Information about quantity of instances to render, its positions and other
parameters is sourced from texture buffer objects filled in the first phase.
The example uses various OpenGL 4.2 features such as texture buffer objects,
atomic counters, image units and functions defined in GL_ARB_shader_image_load_store
extension to achieve its goal and thus will not work on graphic cards with older OpenGL
versions.
The example was tested on Linux and Windows with NVidia 570 and 580 cards.
The tests on AMD cards were not conducted ( due to lack of it ).
The tests were performed using OSG revision 14088.
The main advantages of this rendering method :
- instanced rendering capable of drawing thousands of different objects with
almost no CPU intervention ( cull and draw times are close to 0 ms ).
- input objects may be sourced from any OSG graph ( for example - information about
object points may be stored in a PagedLOD graph. This way we may cover the whole
countries with trees, buildings and other objects ).
Furthermore if we create osgDB plugins that generate data on the fly, we may
generate information for every grass blade for that country.
- every object may have its own parameters and thus may be distinct from other objects
of the same type.
- relatively low memory footprint ( single object information is stored in a few
vertex attributes ).
- no GPU->CPU roundtrip typical for such methods ( method uses atomic counters
and glDrawArraysIndirect() function instead of OpenGL queries. This way
information about quantity of rendered objects never goes back to CPU.
The typical GPU->CPU roundtrip cost is about 2 ms ).
- this example also shows how to render dynamic objects ( objects that may change
its position ) with moving parts ( like car wheels or airplane propellers ) .
The obvious extension to that dynamic method would be the animated crowd rendering.
- rendered objects may be easily replaced ( there is no need to process the whole
OSG graphs, because these graphs store only positional information ).
The main disadvantages of a method :
- the maximum quantity of objects to render must be known beforehand
( because texture buffer objects holding data between phases have constant size ).
- OSG statistics are flawed ( they don't know anymore how many objects are drawn ).
- osgUtil::Intersection does not work
Example application may be used to make some performance tests, so below you
will find some extended parameter description :
--skip-dynamic - skip rendering of dynamic objects if you only want to
observe static object statistics
--skip-static - the same for static objects
--dynamic-area-size - size of the area for dynamic rendering. Default = 1000 meters
( square 1000m x 1000m ). Along with density defines
how many dynamic objects is there in the example.
--static-area-size - the same for static objects. Default = 2000 meters
( square 2000m x 2000m ).
Example application defines some parameters (density, LOD ranges, object's triangle count).
You may manipulate its values using below described modifiers:
--density-modifier - density modifier in percent. Default = 100%.
Density ( along with LOD ranges ) defines maximum
quantity of rendered objects. registerType() function
accepts maximum density ( in objects per square kilometer )
as its parameter.
--lod-modifier - defines the LOD ranges. Default = 100%.
--triangle-modifier - defines the number of triangles in finally rendered objects.
Default = 100 %.
--instances-per-cell - for static rendering the application builds OSG graph using
InstanceCell class ( this class is a modified version of Cell class
from osgforest example - it builds simple quadtree from a list
of static instances ). This parameter defines maximum number
of instances in a single osg::Group in quadtree.
If, for example, you modify it to value=100, you will see
really big cull time in OSG statistics ( because resulting
tree generated by InstanceCell will be very deep ).
Default value = 4096 .
--export-objects - write object geometries and quadtree of instances to osgt files
for later analysis.
--use-multi-draw - use glMultiDrawArraysIndirect() instead of glDrawArraysIndirect() in a
draw shader. Thanks to this we may render all ( different ) objects
using only one draw call. Requires OpenGL version 4.3 and some more
work from me, because now it does not work ( probably I implemented
it wrong, or Windows NVidia driver has errors, because it hangs
the apllication at the moment ).
This application is inspired by Daniel Rákos work : "GPU based dynamic geometry LOD" that
may be found under this address : http://rastergrid.com/blog/2010/10/gpu-based-dynamic-geometry-lod/
There are however some differences :
- Daniel Rákos uses GL queries to count objects to render, while this example
uses atomic counters ( no GPU->CPU roundtrip )
- this example does not use transform feedback buffers to store intermediate data
( it uses texture buffer objects instead ).
- I use only the vertex shader to cull objects, whereas Daniel Rákos uses vertex shader
and geometry shader ( because only geometry shader can send more than one primitive
to transform feedback buffers ).
- objects in the example are drawn using glDrawArraysIndirect() function,
instead of glDrawElementsInstanced().
Finally there are some things to consider/discuss :
- the whole algorithm exploits nice OpenGL feature that any GL buffer
may be bound as any type of buffer ( in our example a buffer is once bound
as a texture buffer object, and later is bound as GL_DRAW_INDIRECT_BUFFER ).
osg::TextureBuffer class has one handy method to do that trick ( bindBufferAs() ),
and new primitive sets use osg::TextureBuffer as input.
For now I added new primitive sets to example ( DrawArraysIndirect and
MultiDrawArraysIndirect defined in examples/osggpucull/DrawIndirectPrimitiveSet.h ),
but if Robert will accept its current implementations ( I mean - primitive
sets that have osg::TextureBuffer in constructor ), I may add it to
osg/include/PrimitiveSet header.
- I used BufferTemplate class writen and published by Aurelien in submission forum
some time ago. For some reason this class never got into osg/include, but is
really needed during creation of UBOs, TBOs, and possibly SSBOs in the future.
I added std::vector specialization to that template class.
- I needed to create similar osg::Geometries with variable number of vertices
( to create different LODs in my example ). For this reason I've written
some code allowing me to create osg::Geometries from osg::Shape descendants.
This code may be found in ShapeToGeometry.* files. Examples of use are in
osggpucull.cpp . The question is : should this code stay in example, or should
it be moved to osgUtil ?
- this remark is important for NVidia cards on Linux and Windows : if
you have "Sync to VBlank" turned ON in nvidia-settings and you want to see
real GPU times in OSG statistics window, you must set the power management
settings to "Prefer maximum performance", because when "Adaptive mode" is used,
the graphic card's clock may be slowed down by the driver during program execution
( On Linux when OpenGL application starts in adaptive mode, clock should work
as fast as possible, but after one minute of program execution, the clock slows down ).
This happens when GPU time in OSG statistics window is shorter than 3 ms.
"
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14531 16af8721-9629-0410-8352-f15c8da7e697
2014-11-25 10:58:23 +00:00
Robert Osfield
86ddca4edb
Added VertexAttribDivisor class to wrap up glVertexAttribDivisor function
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14526 16af8721-9629-0410-8352-f15c8da7e697
2014-11-24 14:54:39 +00:00
Robert Osfield
fce7137525
Added numTextureUnits parameter to the osg::State::resetVertexAttributeAlias(bool, unit) method, and set the default to 8.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14523 16af8721-9629-0410-8352-f15c8da7e697
2014-11-24 14:01:05 +00:00
Robert Osfield
a97f104ab6
Added comment clarifying how Image::getColor(..) out of 0..1 range texcoords are handled - now clamped to edge.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14520 16af8721-9629-0410-8352-f15c8da7e697
2014-11-21 20:15:30 +00:00
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
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
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
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
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
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
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
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
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
Robert Osfield
e3a3ae6de6
Improved the alignment and sizing of TabWidget tab headers
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14445 16af8721-9629-0410-8352-f15c8da7e697
2014-09-10 17:03:27 +00:00
Robert Osfield
57a42aac39
Moved the diaglog title bar widgets into the Widget::GraphicsSubgraph map to avoid them poluting the Dialog's children list and to prevent them from being serialized.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14441 16af8721-9629-0410-8352-f15c8da7e697
2014-09-09 15:14:35 +00:00
Robert Osfield
e93e7ca1f2
Introduced Widget::WidgetStateSet to help localize the StateSet set up by Widget implementations from being serialized or
...
affecting what end users apply via the standard Node::s/getStateSet().
Further work on TabWidget.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14440 16af8721-9629-0410-8352-f15c8da7e697
2014-09-09 13:37:33 +00:00
Robert Osfield
23b8131ae5
Added shell of new osgUI::TabWidget class
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14438 16af8721-9629-0410-8352-f15c8da7e697
2014-09-05 16:04:11 +00:00
Robert Osfield
9e9fe9b9c9
Introduced support for specifying whether a serializer supports different types of usage - one or more of READ_WRITE_PROPERTY, GET_PROPERTY and SET_PROPERTY.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14437 16af8721-9629-0410-8352-f15c8da7e697
2014-09-05 11:05:43 +00:00
Robert Osfield
21fc2fae8d
Added setting of the IsoSurfaceProperty in VolumeSettings
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14436 16af8721-9629-0410-8352-f15c8da7e697
2014-09-03 15:54:47 +00:00
Robert Osfield
4f6dbf5623
Added close button on Dialog title bar
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14435 16af8721-9629-0410-8352-f15c8da7e697
2014-09-03 12:28:04 +00:00
Robert Osfield
1e9722601c
Refactored the handling of ComboBox item picking to make it faster and more reliable
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14433 16af8721-9629-0410-8352-f15c8da7e697
2014-09-02 17:01:44 +00:00
Robert Osfield
5633fa1247
Added DragCallback class to help dialog dragging support.
...
Introduced a new Widget::computeExtentsPositionInLocalCoordinates() method that intersects with a ray through mouse pointer and the extents of the widget.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14429 16af8721-9629-0410-8352-f15c8da7e697
2014-09-01 19:13:35 +00:00
Robert Osfield
f6cc4440a1
Added support for getting osgVolumre::Property::ModifieCount
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14422 16af8721-9629-0410-8352-f15c8da7e697
2014-08-27 09:25:54 +00:00
Robert Osfield
d1bf811331
Added Property::getModifiedCount() + dirty() to help with tracking changes. Added VolumeSettings serializers for Property objects
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14421 16af8721-9629-0410-8352-f15c8da7e697
2014-08-25 16:56:47 +00:00
Robert Osfield
6126379362
Changed StateSet::ParentList from vector<Object*> to vector<Node*> to reflect that Drawable is now a Node.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14420 16af8721-9629-0410-8352-f15c8da7e697
2014-08-25 13:43:11 +00:00
Robert Osfield
beeda386ef
Improved handling of setting of the depth of the UI.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14418 16af8721-9629-0410-8352-f15c8da7e697
2014-08-22 19:00:53 +00:00
Robert Osfield
f28d460caa
Added support for ComboBox::currentIndexChanged*(uint) callback API.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14409 16af8721-9629-0410-8352-f15c8da7e697
2014-08-14 19:00:37 +00:00
Robert Osfield
973ac76197
From Glen Waldron, "Node: patch for remove*Callback() methods to resolve a crash"
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14401 16af8721-9629-0410-8352-f15c8da7e697
2014-08-08 15:45:54 +00:00
Robert Osfield
99cbab1806
Changes to support building against ANDROID under OSX.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14399 16af8721-9629-0410-8352-f15c8da7e697
2014-08-08 09:28:26 +00:00
Robert Osfield
fdd9efe45a
Implemented osgUI::Validator, IntValidator and DoubleValidator classes that manage validation/specialization of LineEdit widgets to work with just integer or double values.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14398 16af8721-9629-0410-8352-f15c8da7e697
2014-08-05 18:32:45 +00:00
Robert Osfield
0335e9c63a
Implemented callbacks for validate(), textChanged() and returnPressed()
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14397 16af8721-9629-0410-8352-f15c8da7e697
2014-08-01 13:07:38 +00:00
Robert Osfield
e979f76156
Added NodeVisitor::INTERSECTION_VISITOR VisitorType
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14395 16af8721-9629-0410-8352-f15c8da7e697
2014-07-31 18:29:31 +00:00
Robert Osfield
899e359cdb
Fixed rendering of Popups
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14394 16af8721-9629-0410-8352-f15c8da7e697
2014-07-30 12:48:28 +00:00
Robert Osfield
0bdd7351f6
Added StateSet::RenderBinMode::PROTECTED_RENDERBIN_DETAILS and OVERRIDE_PROTECTED_RENDERBIN_DETAILS options.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14392 16af8721-9629-0410-8352-f15c8da7e697
2014-07-30 12:47:16 +00:00
Robert Osfield
46440ad0a8
Added preliminary icon to ComboBox.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14391 16af8721-9629-0410-8352-f15c8da7e697
2014-07-29 15:50:55 +00:00
Robert Osfield
90e58f66c0
Implemented prelimary icon support allowing UI widget to place image and model based icons on widgets
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14389 16af8721-9629-0410-8352-f15c8da7e697
2014-07-29 15:50:07 +00:00
Robert Osfield
e65d03bf27
Added handling of Drawables added directly to scene graph without Geode decorating them.
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14386 16af8721-9629-0410-8352-f15c8da7e697
2014-07-28 16:19:44 +00:00