Commit Graph

2418 Commits

Author SHA1 Message Date
Julien Valentin
195df4f811 numgroup removed but introduce a reto compatibility bug in Program serializer
hope nobody use it
2017-11-28 17:39:32 +01:00
Julien Valentin
bf1b4ec2bb add ComputeDispatch class
revoke glDispatch in PCProgram::useProgram
update example
2017-11-28 17:30:04 +01:00
Robert Osfield
34336931fa Deprecated the osg::Shader::reaDShaderFile() and osg::Shader::loadShaderSourceFromFile() methods.
Programmers should use osgDB::readRefShaderFile()/readShaderFile() instead.
2017-11-27 18:28:15 +00:00
Robert Osfield
338b0e2b7b Moved getenv usage across to safer osg::getEnvVar() usage 2017-11-01 17:38:33 +00:00
Robert Osfield
0e7e06349e Added safety check for getenv parsing to prevent overflow attacks via getenv. 2017-11-01 16:43:32 +00:00
Robert Osfield
e59ad87044 Made template function inline to avoid multiple declaration issues 2017-11-01 14:16:54 +00:00
Robert Osfield
51a9c66856 Added OSG_ENVVAR_SUPPORTED cmake control and bool osg::getEnvVar(const char* name, T& value, ...) conviniece funcions to make it easier to implement optinal getenv reading code. 2017-11-01 13:32:47 +00:00
Robert Osfield
c242ad4497 Fixed unititialized memory variables and improved readability by adding spacing where appropriate 2017-10-31 17:55:59 +00:00
Robert Osfield
bf517febfc Merge branch 'master' into shader_pipeline 2017-10-28 12:58:47 +01:00
Robert Osfield
9c9439ef73 Added DisplaySettings:s/getgTextShaderTechnique() and OSG_TEXT_SHADER_TECHNIQUE env var support to DisplaySettings.
Added using of DisplaySettings:getgTextShaderTechnique() to Text default constructor.
Added better debug output control in Text.cpp
2017-10-24 14:46:13 +01:00
Robert Osfield
6b75439ae4 Merge branch 'master' into text_improvements 2017-10-20 14:14:14 +01:00
Robert Osfield
068f47d91f Build fixes with ref_ptr<> autoconversion disabled 2017-10-19 11:57:53 +01:00
Laurens Voerman
274cea19bf copySubImage support for block compressed images, added support for astc compressed type. 2017-10-13 16:54:04 +02:00
Robert Osfield
d6af00d9bd Merge branch 'master' into text_improvements 2017-10-10 09:21:34 +01:00
OpenSceneGraph git repository
d74e340f32 Merge pull request #359 from eligovision/OpenSceneGraph_gles
Added defines: GL_ALPHA4/8/12/16 in osg/Image, this will fix compilat…
2017-10-09 10:03:21 +01:00
OpenSceneGraph git repository
5f985a36a2 Merge pull request #358 from eligovision/OpenSceneGraph_optimizer
VertexAttribDivisor compare function fix: index must be compared
2017-10-09 10:02:51 +01:00
Robert Osfield
9ac2b2eb7b Added VertexArrayState::ArrayDispatch::className() method and implementation for each ArrayDispatch subclass to help with debugging 2017-10-06 17:47:19 +01:00
Konstantin S. Matveyev
1e1f69febc Added defines: GL_ALPHA4/8/12/16 in osg/Image, this will fix compilation error while building for GLES2 2017-10-06 18:16:48 +03:00
Konstantin S. Matveyev
a87e57e946 VertexAttribDivisor compare function fix: index must be compared 2017-10-06 18:14:47 +03:00
Robert Osfield
cc7cf54353 Added support for subsititing $VAR_NAME entries in shaders to enable writing shaders that work across GLSL versions. 2017-09-18 18:09:15 +01:00
Denys Koch
1d1bfa1b39 Fix flawed BoundingSphere inequality operator 2017-08-28 14:34:39 +02:00
OpenSceneGraph git repository
5efdcd5655 Merge pull request #328 from scrawl/group-docs
Fix docs for Group::addChild to match implementation
2017-08-27 18:07:21 +01:00
scrawl
1cd1ab1c60 Fix docs for Group::addChild to match implementation
Checking for duplicates is only done if ENSURE_CHILD_IS_UNIQUE is defined, but this is never defined anywhere.
2017-08-26 11:30:55 +00:00
Daniel Emminizer
2e456eeddc No longer using OSG_EXPORT on DefaultIndirectCommandDrawArrays and DefaultIndirectCommandDrawElements, fixing compile errors in MSVC 2015. 2017-08-25 08:55:25 -04:00
Julien Valentin
c89b08ea1f Add extensions 2017-08-25 00:19:22 +02:00
Julien Valentin
107b7be95b Merge remote-tracking branch 'upstream/master' into MDI7 2017-08-24 11:26:23 +02:00
OpenSceneGraph git repository
b89384d810 Merge pull request #318 from mp3butcher/osganimation
change the design of BufferIndexBinding to work with BufferData instead of BufferObject +matrix transpose
2017-08-24 09:53:32 +01:00
Julien Valentin
d49f0d67af change the design of BufferIndexBinding to work with BufferData instead of BufferObject
allow convenient BufferData abstraction +  serialization of BufferIndexBinding
2017-08-24 03:28:55 +02:00
Julien Valentin
3b03699fbc add a transpose method for 4x4
and a transpose3x3 to transpose only orthogonal part of a mat4x4
2017-08-23 23:49:36 +02:00
Robert Osfield
eefeb3bb93 Fixed underflow issue 2017-08-23 15:26:07 +01:00
Robert Osfield
f3adcda6b7 Removed the GLclampd declaration and replaced its usage with GLdouble to standardize the OSG extension setup with current GL/GLES headers.
Added a float fallback from osg::DepthDangeIndex to suppprt GLES.
2017-08-16 14:20:00 +01:00
luzpaz
2cd31f65e4 misc. typo fixes
mostly non-user-facing but some doxy.
2017-08-15 12:23:49 -04:00
Julien Valentin
899a704eb7 update IndirectCommandArrays interfaces and default impl to use DrawElements like semantic 2017-08-05 18:03:27 +02:00
Julien Valentin
7f292c3fb5 add resize methods method in CommandArrays (it allows user to work without casting to the concrete class result of MDI.getCommandArray())
move getTotalDataSize in CommandArrays interfaces
comply with other DrawElementsXXX removing parameters in mdi constructors and add several method ( allow use of osgUtil::DrawElementTypeSimplifer on these)
2017-08-02 21:50:25 +02:00
Robert Osfield
fda30b36d1 Merged #pragmatic shader fix from OpenSceneGraph-3.4 branch. 2017-07-31 13:38:18 +01:00
Robert Osfield
5a946e218f Improved the readability and consistency with the rest of the OSG by inserting/removing spaces and line spacing. 2017-07-28 13:30:36 +01:00
mp3butcher
a45c4c8f39 set DIBO of the drawcommandarray directly in their interface constructor
it makes osggpu use case lighter + drawcommandarray can't exist without a BO
2017-07-27 12:27:55 +02:00
mp3butcher
104b2dfc72 Promote PrimitiveSetIndirect's VBO to a target explicited DIBO (in order to benefit from BOSet queue management) 2017-07-27 12:13:05 +02:00
mp3butcher
7606159a78 add DrawIndirectBufferObject as State variable in order to minimize call to glBindBuffer(GL_DRAW_INDIRECT_BUFFER,X)
TODO: Promote PrimitiveSetIndirect's VBO to target explicited DIBO (in order to benefit from BOSet queue management)
2017-07-27 01:54:25 +02:00
mp3butcher
9b53775840 remove deprecated DrawIndirectBufferBinding 2017-07-27 01:40:04 +02:00
mp3butcher
8742ad8da6 fix some errors during renaming and cleanup code 2017-07-27 01:08:37 +02:00
mp3butcher
f27c379b1e some renaming and harmonisations with osg metamodel convention 2017-07-26 23:36:55 +02:00
mp3butcher
5be14bc2ba first commit for Indirect Draw integration in osg
users will have to implement interfaces for their custom drawcommandarrays
add a lot of new primitive set + few defines
integration is made in osggpucull
2017-07-26 21:20:28 +02:00
OpenSceneGraph git repository
da7a0968be Merge pull request #265 from cxw42/array-classname
Make Array::className() support all Array::Type values
2017-06-19 08:50:00 +01:00
Chris White
eb99df894a Make Array::className() support all Array::Type's
Array::className() had fallen out of date with respect to Array::Type.
This commit updates it, and adds documentation and a debug message to
serve as a reminder for future additions of values to Array::Type.
2017-06-16 11:02:14 -04:00
blobfish
f5bd280b51 osg: KdTree: count degenerates to keep original primitive index in sync 2017-06-04 17:29:57 -04:00
blobfish
bb804c2045 osg: KdTree: encode original primitive index into _vertexIndices 2017-06-04 17:29:57 -04:00
Robert Osfield
502acc19c9 Build fix 2017-05-25 09:54:11 +01:00
Robert Osfield
20ac472d1f Moved OSG_USE_DEPRECATED_API from include/osg/Export to Cmake controlled include/osg/Config 2017-05-24 19:40:08 +01:00
Robert Osfield
a74b4b94a9 Fixes/clean up of KdTree/LineSegmentIntersector/PolytopeIntersector 2017-05-11 15:29:31 +01:00
Robert Osfield
6e1866ac18 Added --points and --lines command line options that do a very simplistic conversion of geometry primitives to points or lines respectively, used to aid testing of intersectors 2017-05-11 15:29:31 +01:00
Robert Osfield
bc0a402dac Improved indentation, making it consistent with the rest of the OSG headers 2017-05-11 15:25:10 +01:00
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