valid-ptr
aed9fd74f6
Wrong argument name rename: uniformMap -> defineMap
2020-12-29 15:07:15 +03:00
Robert Osfield
84bae01643
Added separate test and rest of _currentVAO to State::resetCurrentVertexArrayStateOnMatch(..) method
2019-01-22 20:21:56 +00:00
Robert Osfield
8a5d1b9f44
Changed resetCurrentVertexArrayStateOnMatch() to reset _vas tp _globalVertexArrayState and currentVAO to 0.
2019-01-21 18:15:02 +00:00
Robert Osfield
488b4854b2
Added reset of the State::CurrentVertexArrayState() to prevent the State::_vas becoming a dangling pointer when VertexArrayState objects are deleted.
2019-01-21 17:36:40 +00:00
Robert Osfield
673292b995
Moved Stae::setUseVertexAttributeAliasing(bool) implementation to .cpp an added call to _globalVertexArrayState->assignAllDispatchers(); to ensure state is consistent
2018-06-13 12:23:29 +01:00
Robert Osfield
c078968f66
Added non const version of State::getActiveDisplaySettings()
2018-05-04 10:54:02 +01:00
Robert Osfield
64341cfb72
Added State::glDrawBuffer/glReadBuffer() method to implement lazy state updating for glDrawBuffer and glReadBuffer
2018-03-06 09:49:02 +00:00
Robert Osfield
1b8567e11e
Added deprecated comments for ShaderComposer
2018-03-05 14:39:07 +00:00
Robert Osfield
dd1f95d24d
Fixed typo
2017-12-31 13:17:23 +00: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
Julien Valentin
107b7be95b
Merge remote-tracking branch 'upstream/master' into MDI7
2017-08-24 11:26:23 +02:00
Robert Osfield
fda30b36d1
Merged #pragmatic shader fix from OpenSceneGraph-3.4 branch.
2017-07-31 13:38:18 +01: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
Robert Osfield
ffbc1167de
Added lazy state updating for vertex array object binding/unbinding
2017-03-13 11:44:34 +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
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
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
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
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
e3c663bb02
Removed deprecated code paths and moved implementations into headers
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
83f73df814
Added State::useVertexArrayObject() member to streamline toggling on/off of VAO usage
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
14d1483b06
Experimental support for OpenGL Vertex Array Object
2016-10-11 11:29:29 +01:00
Robert Osfield
bc8452512f
Added initializers and handling of null case
2016-06-23 11:03:38 +01:00
Robert Osfield
d3c6dc6f34
Fixed doxygen warnings
2016-06-01 14:20:14 +01: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
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
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
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
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
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
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
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
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
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
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
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
7dc3b34bfd
Removed State::AppliedProgramObjectSet container and Obsever usage from osg::State to address threading bug crash.
...
The State::AppliedProgramObjectSet wasn't ever being used actively in the current rev of the OSG so populating and clearing was no longer neccessary, allowing the code to be removed completely.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14377 16af8721-9629-0410-8352-f15c8da7e697
2014-07-22 16:02:33 +00:00
Robert Osfield
5597248895
Introduced new scheme for setting up which version of OpenGL/OpenGL ES the OSG is compiled for.
...
To select standard OpenGL 1/2 build with full backwards and forwards comtability use:
./configure
make
OR
./configure -DOPENGL_PROFILE=GL2
To select OpenGL 3 core profile build using GL3/gl3.h header:
./configure -DOPENGL_PROFILE=GL3
To select OpenGL Arb core profile build using GL/glcorearb.h header:
./configure -DOPENGL_PROFILE=GLCORE
To select OpenGL ES 1.1 profile use:
./configure -DOPENGL_PROFILE=GLES1
To select OpenGL ES 2 profile use:
./configure -DOPENGL_PROFILE=GLES2
Using OPENGL_PROFILE will select all the appropriate features required so no other settings in cmake will need to be adjusted.
The new configuration options are stored in the include/osg/OpenGL header that deprecates the old include/osg/GL header.
2014-04-23 09:08:26 +00:00
Robert Osfield
0f2502c72d
Removed duplicated instances of GLint64EXT declarations
2014-01-07 18:32:45 +00:00