Robert Osfield
9ce657f413
Created TemplatePrimitiveIndexFunctor to enable easier handling of point, lines, triangles and quad index meshes
2017-05-11 15:25:10 +01:00
Robert Osfield
c9545970ac
Removed redudent bool parameter from TriangleFunctor::operator(Vec3, Vec3, Vec3, bool) so it's now simply TriangleFunctor::operator(Vec3, Vec3, Vec3) as the bool was always false in recently OSG versions.
2017-05-11 15:25:10 +01:00
Robert Osfield
48a3fc30f3
Removed old style OpenGL methods from PrimitiveFunctor classes/templates as these are no longer used or required.
2017-05-11 15:25:10 +01:00
Robert Osfield
8f5493e573
Implemented Polytope::contains(..) for triangle vertices and added support for using the results mask.
2017-05-11 15:25:10 +01:00
Robert Osfield
265efb85a1
Initial work on adding KdTree support for PolytopeIntersector.
2017-05-11 15:25:10 +01:00
Robert Osfield
a95d66a587
Replaced dynamoc_cast<osg::CullStack*> with asCullStack() to improve performance of AutoTransform, screen size based LOD and PagedLOD.
2017-04-26 17:10:58 +01:00
Robert Osfield
92092a56ae
Refactored AutoTransform so that it dynamically computes the rotation, scale and matrices during the cull traversal to enable usage in multi-view, multi-threaded applications
2017-04-26 11:50:35 +01:00
Robert Osfield
a4b0dc7426
Added missing Node::asAutoTransform() + NodeVisitor::apply(AutoTransform&).
2017-04-25 18:04:04 +01:00
mp3butcher
8d40323761
add Extensions
2017-04-05 18:11:50 +02:00
mp3butcher
9d490bbf1c
add ScriptNodeCallback serializer
2017-03-28 22:37:34 +02:00
Robert Osfield
6308b497f2
Replaced macro based selection of which shaders to use by default with DisplaySettings::setShaderHint() and OSG_SHADER=HINT=GL2|GL3|GLES2|GLES3|NONE controls
2017-03-27 11:44:41 +01:00
Robert Osfield
c6228fabbd
Added built-in shaders for shader_pipeline functionality
...
Added support for enabling shader_pipeline shaders using OSG_SHADER_PIPELINE=ON/OFF env var
Added support for setting the shader_pipeline shaders using OSG_SHADER_PIPELINE_FILES=shader.vert:shader.shaderpipeline_frag env var
Added support for setting the maximum number of texture units used by shader_pipeline shaders via OSG_SHADER_PIPELINE_MAX_TEXTURE_UNITS=<num> env var
2017-03-24 18:53:22 +00:00
Robert Osfield
7346831082
Added parameter to invocation of all GLSL TexEnv combinations and cleaned up debug output from new osg::UniformTemplate implementations
2017-03-24 10:08:51 +00:00
Robert Osfield
986674e547
Added CopyOp handling of Uniform.
2017-03-23 18:12:52 +00:00
Robert Osfield
d5e9a2c447
Added shader pipeline support to various Texture subclasses
2017-03-23 18:12:52 +00:00
Robert Osfield
3821f77c35
Added name of uniform to debug output
2017-03-23 17:59:39 +00:00
Robert Osfield
83372ff864
Added shader pipeline support to osg::TexEnv
2017-03-23 17:59:39 +00:00
Robert Osfield
59a28859ec
Added shader pipeline support to osg::TexGen.
2017-03-23 17:59:39 +00:00
Robert Osfield
2fc28a7f64
Added mapping of GL modes to 0 (disabled) or 1 (enabled) for the fixed function -> shaders mapping.
...
Added flags for hinting to StateAttribute::apply() implementations whether to toggling on/off the fixed function or shader equivilants.
2017-03-23 17:59:39 +00:00
Robert Osfield
2574894e17
Added TextureAttribute base class from Texture related StateAttribute that need texture unit information from StateSet::setTextureAttribute assigned to
...
help set configure the appropriate uniforms.
2017-03-23 17:58:34 +00:00
Robert Osfield
7d076d0407
Added UniformBase::setName(const std::string& baseName, unsigned int unit); declaration
2017-03-23 17:58:34 +00:00
Robert Osfield
7e43538c63
Added accessors for osg::State's ModeDefineMaps
2017-03-23 17:58:34 +00:00
Robert Osfield
7744c44c8a
Added convinience mathod for passing osg::Plane to glUniform
2017-03-23 17:58:34 +00:00
Robert Osfield
bbbfa19ce2
Added osg::PlaneUniform.
...
Added osg::UniformBase::setName(const std::string&) ability to be reset.
Added osg::UniformBase::setName(const std::string& baseName, unsigned int unit) so set the uniform name in the form "baseName[unit]".
2017-03-23 17:58:34 +00:00
Robert Osfield
5a996dd2d1
Added osg::MakeString class to make it easier to create std::string's using std::ostream style << usage.
2017-03-23 17:58:34 +00:00
Robert Osfield
c0b04cc37b
Introduced new osg::UniformBase class to enable an extensible uniform class hierachy
...
Added osg::UniformTemplate, osg::UniformArrayTemplate and a set of IntUniform, IntArrayUniform etc. to make it easier to interact with basic types more efficiently.
2017-03-23 17:58:34 +00:00
Robert Osfield
5bfefdae6a
Added mapping of texture modes to #define's to inject into shaders where required
2017-03-23 17:42:33 +00:00
Robert Osfield
6d531fd643
Moved the implementation of the State::setUseModelViewAndProjectionUniforms(bool) and State::setUseVertexAttributeAliasing(bool) into State.cpp and added initialization of the VertexArrayState array bindings to ensure that bindings get updated correctly.
...
Refined the State::popStateSet() method to make it more efficient
2017-03-23 17:42:33 +00:00
Robert Osfield
a99b05ff87
Added State::s/getRootStateSet() that enables applications to insert a StateSet above all rendering for a graphics context. Utilized in the new shadper pipeline functionality
2017-03-23 17:42:33 +00:00
Robert Osfield
172ca9bae5
Removed debug version of applyUniformList
2017-03-23 17:42:33 +00:00
Robert Osfield
d1222fc2ef
Added fallback textures to handle cases where no texture is provided
2017-03-23 17:42:33 +00:00
Robert Osfield
7e0551e7e8
Added #pragma import_texture_modes() -> #define into #pragma data structure a GLSL parsing
2017-03-23 17:42:33 +00:00
Robert Osfield
71da950cee
Standardized GLenum's on non EXT versions
2017-03-23 17:42:33 +00:00
Robert Osfield
5c2ea3ad1f
Intial work on providing mapping from OpenGL modes to #pragma(tic) shader composition defines.
...
Shader usage:
#pragma import_modes ( GL_LIGHTING, GL_TEXGTURE_2D )
Will provide #define in shaders for GL_LIGHTING and GL_TEXTURE_2D if these Modes are enabled via StateSet::setMode(..);
2017-03-23 17:42:33 +00:00
OpenSceneGraph git repository
602a6beda8
Merge pull request #225 from MPursche/add_texture2dmultisample_serializer
...
Added serializer for Texture2DMultisample
2017-03-22 10:31:45 +00:00
Marcel Pursche
422587a285
Added serializer for Texture2DMultisample
2017-03-22 10:47:58 +01:00
Thomas Hogarth
76fe572934
Added conditionals for GLES3, added correct gl headers for GLES3 on iOS and Android to GL.in
2017-03-20 18:33:08 +00:00
Robert Osfield
ffbc1167de
Added lazy state updating for vertex array object binding/unbinding
2017-03-13 11:44:34 +00:00
Robert Osfield
61782d8f29
Build fixes
2017-03-11 12:31:19 +00:00
OpenSceneGraph git repository
75e4d85681
Merge pull request #211 from D-A-Heitbrink/master
...
Added support for unsigned 64 bit ints + some code for bindless textures
2017-03-11 11:58:20 +00:00
Robert Osfield
96760970ed
Added setDataVariance(DYNAMIC) to stats text labels that are dyanmically updated.
2017-03-09 17:01:33 +00:00
d-a-heitbrink
7b3fc0925c
Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph
2017-03-01 16:12:49 -06: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
Robert Osfield
1abd99f084
Added support for glObjectLabel debugging
2016-11-15 14:35:47 +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
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
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
aa0c8fdefd
Added ApplyTextureModeProxy for temporarily applying a texture mode
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
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
611b7afb07
Added OSG_EXPORT
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
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
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
8de4c76582
Fixed crash and double call bug in handle event callbacks attached to Drawable
2016-10-06 18:27:23 +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
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
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
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
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
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
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
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
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
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
Robert Osfield
c8d668b298
Added depecated message to redundent shape classes
2016-06-24 09:46:19 +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
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
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
Robert Osfield
4c5ca932c8
Added #include <string> in case other headers don't include it.
2016-06-13 16:24:01 +01:00
Julien Valentin
ac26ba7e5b
Shader subroutine related funcs added
2016-06-09 10:48:05 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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