Commit Graph

2443 Commits

Author SHA1 Message Date
Robert Osfield
7505cb4603 Fixed orientation of quad strips. 2021-12-09 12:36:40 +00:00
Robert Osfield
51924943e2 Removed unnedded include 2021-05-06 10:21:16 +01:00
elsid
969c1821be Add move constructor and move assignment operator to ref_ptr
Use conditional compilation to make it work only with C++11 support.
2021-05-06 10:21:04 +01:00
valid-ptr
e260dfb582 merged with upstream/OpenSceneGraph-3.6 2021-03-24 17:45:19 +03:00
Robert Osfield
94d5211f43 Ran dos2unix to fix line endings 2021-02-17 18:23:32 +00:00
Robert Osfield
23b4345517
Merge pull request #1032 from glebm/3.6-backport-deprecations-fix
Back-port (cherry-pick) warnings fixes into 3.6
2021-01-23 16:15:35 +00:00
Robert Osfield
b7c186f6d3 Fixed warnings reported by gcc-9.3.0
Note from glebm@:

Back-ported from e0d5e4b0ff

Identical except for the changes to `MatrixTemplate`, which does not
exist in 3.6
2021-01-19 20:37:40 +00:00
Gleb Mazovetskiy
0161b8ab46 include/osg/Callback: nullptr -> NULL
Fixes travis, which explictly requires c++98
2021-01-18 14:45:06 +00:00
valid-ptr
aed9fd74f6 Wrong argument name rename: uniformMap -> defineMap 2020-12-29 15:07:15 +03:00
valid-ptr
6cd699e55f GLExtensions: isTextureCompressionASTCSupported (ASTC compression texture), isTextureLODBiasSupported (is needed for GL_TEXTURE_LOD_BIAS) flags added 2020-12-04 18:32:35 +03:00
Matthew Reid
073cfab166 Added support for sRGB texture formats 2020-11-10 16:05:56 +00:00
MeyerFabian
ba70c7d543 build/windows_clang 2020-07-21 17:37:24 +02:00
Daniel Trstenjak
ddb72691bc OcclusionQueryNode: fix resetting to default query geometry
When the query geometry gets reset to its default then its
vertices have to be updated by the bounding box dimensions of
the current children of the OcclusionQueryNode.
2020-01-20 16:44:48 +01:00
Daniel Trstenjak
817d92b703 OcclusionQueryNode: fix use case of user defined query geometry
The user defined query geometry handling has been broken in several ways.

The previous way of defining a query geometry was using the non const
`getQueryGeometry` method and overriding its members. But then
`OcclusionQueryNode` wasn't aware of the geometry change and couldn't
internally handle it correctly.

The `computeBound` method never considered a user defined query geometry and
always just overrode the vertices of the geometry.

The member `_validQueryGeometry` wasn't correctly set.

This change should fix all this issues by introducing a small backward
compatibility break. The non const `getQueryGeometry` method is removed
forcing the user to use the `setQueryGeometry` method. But then `OcclusionQueryNode`
is aware of the user defined query geometry and can handle it correctly.
2020-01-20 16:42:38 +01:00
Robert Osfield
d1ff16614c Added Thread::CurrentThreadId() method to wrap up thread id functionality in a more platform appropriate way. 2020-01-06 18:39:51 +00:00
valid-ptr
51fee80224 glInvalidateFramebuffer added to GLExtensions 2019-12-13 12:09:06 +03:00
konstantin.matveyev
fefabb6c2b glFramebufferTexture2DMultisample added to GLExtensions 2019-12-13 12:08:37 +03:00
Julien Valentin
0c142215b9 remove return of local pointer 2019-08-16 10:15:46 +01:00
Robert Osfield
079cf6c090 Added FrameBufferAttachment::resizeGLObjectBuffers(..) and releaseGLObjects(..) methods 2019-07-12 16:09:12 +01:00
Capostrophic
12b298130a Add OSG_USE_FLOAT_QUAT build option to use single precision quaternions 2019-03-14 10:46:42 +00:00
Daniel Trstenjak
5624a22fe4 OcclusionQueryNode: ensure a valid query geometry
If the query geometry is invalid then don't do any occlusion queries and
never traverse the subgraphs.
2019-02-21 17:34:26 +00:00
Julien Valentin
43574b52c1
uncomment INLINE_DRAWABLE_DRAW 2019-01-28 01:40:35 +01:00
Robert Osfield
02d7d980a7 Introduced a QueryGeometry::getQueryResult(const osg::Camera*) method as a more informative replacedment for QueryGeometry::getNumPixels(). 2019-01-26 16:33:23 +00:00
Daniel Trstenjak
c8521068a5 OcclusionQueryNode: add resetting of queries
If there's a big view change then it might not be appropriate to wait
for '_queryFrameCount' till the next query is issued, because then
geometry might pop into the view after '_queryFrameCount'.

This is especially important for applications not having a constant
frame rate, but just issue a new frame on demand.
2019-01-26 15:22:08 +00: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
6455159757 Added calling of releaseGLObjects() and resizeGLObjects() to the Camera DrawCallback's to enable the draw callbacks to clean up their own GL objects. 2019-01-19 16:16:53 +00:00
Robert Osfield
fe98c3d7f5 Moved resizeGLObjects/releaseGLObjects out of Referenced to avoid multiple inheritance warnings 2019-01-12 11:27:18 +00:00
Robert Osfield
f6b64afdfc Fixed for crashes on exit associaciated with VAO usage and vairous niche usage cases 2019-01-08 19:32:50 +00:00
Robert Osfield
1ee6d476f8 From Andy Skinner, Added ~GLExtensions to clear cached values for context ID 2018-10-02 11:28:34 +01:00
Robert Osfield
7fae3b67cd Fixed build 2018-09-11 09:31:35 +01:00
Jason Beverage
6ae1139630 Protect the _programSet in Shader with a mutex.
This prevents thread safety issues when Shader objects are used in
multiple programs.
2018-09-05 09:34:54 +01:00
mp3butcher
587e65e674 add more extensions 2018-08-20 05:11:29 +02:00
Robert Osfield
58a51cbc41 Created a GLenum Texture::selectSizedInternalFormat(const osg::Image* image=0) const method to help clean up set up of glTexStorage.
Fixed typo.
2018-08-17 12:20:59 +01:00
Vic-Min
15f2ae8d15 Renamed USE_DEPRECATED_API to OSG_USE_DEPRECATED_API 2018-08-08 14:37:28 +01:00
Robert Osfield
d01edcb540 Added GLExtensions::isPointSpriteModeSupported to allow it to be enable for GL versions that support GL_POINT_SPRITE_ARB/GL_POINT_SPRITE_OES 2018-06-26 20:10:51 +01:00
Robert Osfield
44b3bcc3fc Moved osg::clampProjectionMatrix() template from CullVisitor.cpp into include/osg/CullSettings to make it easier to implement custom clampProjectionMatrix callbacks 2018-06-25 20:02:30 +01: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
e2aeab2b60 Fixed type of Timer_t under Windows 2018-05-23 06:32:42 +01:00
Robert Osfield
dce6684c59 Restored the REGISTER_WINDOWINGSYSTEMINTERFACE macro to the include/osg/GraphicsContext header and removed the OSGVIEWER_EXPORT as this was causing compatibility issues with osgQt.
In GraphicsWindowWin32 replaced REGISTER_WINDOWINGSYSTEMINTERFACE usage with locally implemented equivilant with the required OSGVIEWER_EXPORT.
2018-05-21 13:10:40 +01:00
Robert Osfield
e3c47b60e0 Moved REGISTER_WINDOWINGSYSTEMINTERFACE from include/osg/GraphicsContext to include/osgViewer/GraphicsWindow and added OSGVIEWER_EXPORT 2018-05-18 14:58:53 +01:00
Robert Osfield
640b03b671 Fixed crash when using ShapeDrawable with a TriangleMesh or ConvexHull shape due to missing texture coords 2018-05-13 11:52:06 +01:00
Robert Osfield
be363ef8d4 Fixed build when OSG_ENVVAR_SUPPORTED is disabled and quietened down warnings using OSG_UNUSED* macros 2018-05-10 18:58:29 +01:00
Robert Osfield
c078968f66 Added non const version of State::getActiveDisplaySettings() 2018-05-04 10:54:02 +01:00
Robert Osfield
62a9f87f45 Added osg::MakeString class to make it easier to create std::string's using std::ostream style << usage. 2018-05-04 09:31:57 +01:00
Alberto Luaces
02c310982e Fix typos and spelling. 2018-04-23 11:03:37 +01:00
Robert Osfield
f95fdd4d4e Fixed the GLBufferObject size computation so that it takes into account padding. 2018-04-19 19:41:51 +01:00
Robert Osfield
38ad6ed3b3 Fixed inline Drawable::draw(..) method 2018-04-16 17:18:49 +01:00
Robert Osfield
7ab1208c65 Renamed osg::ComputeDispatch to osg::DispatchCompute to make sure the nameing between GL and OSG is consistent i.e glDispatchCompute -> osg::DispatchCompute
Updated AUTHORS.txt, NEWS.txt and README.txt for CMakeLists.txt for 3.6.0 release
2018-04-07 17:59:55 +01:00