Commit Graph

10603 Commits

Author SHA1 Message Date
Robert Osfield
c85e56940e From Jordi Torres, removed unused local variables 2017-12-02 17:52:47 +00:00
Robert Osfield
847e472130 Commented out unused local variables 2017-12-02 17:42:53 +00:00
Robert Osfield
e44fb08f6a From Jordi Torres, removed unused local variable 2017-12-02 17:41:27 +00:00
Robert Osfield
490b9b0e0e Fixed string parsing and substituion bugs isn substitudeEnvVars(..) 2017-12-02 17:35:36 +00:00
Robert Osfield
302f625ec7 From Jordi Torres, removed unused local variables 2017-12-02 17:08:14 +00:00
Robert Osfield
da68d32482 Improved readaibility of text by removing redundent indirection. 2017-12-02 16:35:16 +00:00
Robert Osfield
59f841bc20 Fixes for cppcheck reported issues 2017-12-02 16:20:34 +00:00
Marc Helbling
75af025c55 Improve SharedArrayOptimizer
When an array is shared within and outside a geometry, it's still worth it and safe
to recreate the reference within each individual geometry.
2017-12-01 12:26:02 +01:00
OpenSceneGraph git repository
2366305e83
Merge pull request #396 from bjornblissing/feature/DPIAwareScaling
Applications declared as DPI-aware in the Windows environment
2017-11-30 14:13:21 +00:00
Robert Osfield
05b0f142c8 Quieted down dubug output 2017-11-30 12:48:47 +00:00
Björn Blissing
9fac39c5e0 Applications declared DPI-aware in the Windows environment
Applications that run on a Windows computer with desktop scaling enabled
gets scaled incorrectly since windows assumes that applications are
DPI-unaware unless declared otherwise.

This change declares the application DPI-aware, thus not automatically
scaled by the operating system.

The corresponding library call requires Windows 8.1 or later.
2017-11-30 13:00:54 +01:00
Björn Blissing
e8f7eeb5dc Removed unnecessary define in FileUtils
The define of _WIN32_WINNT was added to handle an error case from MinGW
,as described in commit 712ca43219

This was later giving warnings and thus undefined for MinGW by commit
3bf6fb1778

Since the two operations cancel each other out, they should be removed.
2017-11-30 12:50:09 +01:00
Robert Osfield
a16702627a Typo fix 2017-11-29 21:20:10 +00:00
Robert Osfield
d3815759a9 Fixed build with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF 2017-11-29 14:44:00 +00:00
Robert Osfield
a6069c3226 Introduced Drawable::CreateVertexArrayStateCallback to enable customization of how VertexArrayState objects.
Added public accessors to the Drawable::VertexArrayStateList.
2017-11-29 14:22:31 +00:00
Robert Osfield
03434b20cf Added mapping of GLSL file extension to shader Type. 2017-11-29 12:22:03 +00:00
OpenSceneGraph git repository
27e5041d97
Merge pull request #394 from mathieu/master
Make the culling be disabled at the drawable level
2017-11-29 10:38:52 +00:00
Robert Osfield
c0a276e850 Added back in serializer support for comput dispatch groups to retain backwards compatibility. 2017-11-29 10:11:35 +00:00
Mathieu
cf05cd5bf3
Make the culling be disables at the drawable level not at the geode level 2017-11-29 11:05:53 +01:00
Robert Osfield
9f6eb74d28 Merge branch 'ComputeDispatch' of https://github.com/mp3butcher/OpenSceneGraph into mp3butcher-ComputeDispatch 2017-11-29 09:30:56 +00:00
OpenSceneGraph git repository
cd0744ddfa
Cleaned up code layout 2017-11-29 08:16:53 +00:00
Robert Osfield
1152da8bbd Quietened down debug output 2017-11-28 18:08:08 +00:00
Robert Osfield
85917ea4d4 Quietened down debug output 2017-11-28 18:05:59 +00:00
Robert Osfield
5ad22dc4af Quitened down debug output 2017-11-28 18:04:26 +00:00
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
117045170d To the GLSL shader plugin added support forL
#pragma include shaderfile.glsl

To enable easier reuse of shaders
2017-11-28 15:31:39 +00:00
Robert Osfield
284f91b3e0 Replaced deprecated osg::Shader::reaDShaderFile()/loadShaderFromSource() usage 2017-11-27 18:38:37 +00:00
Robert Osfield
5f13a3aa11 Merge branch 'master' of https://github.com/openscenegraph/OpenSceneGraph 2017-11-27 18:36:41 +00: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
f81a46da5b Added support for .cs, .compute, .tctrlm .teval extensions in the GLSL plugin 2017-11-27 18:27:13 +00:00
OpenSceneGraph git repository
6abb9b27f9
Merge pull request #387 from jtorresfabra/remove_custom_code
Removes custom code added for sketchfab channel compression that shou…
2017-11-27 15:54:39 +00:00
Robert Osfield
bc4a9d9dd0 Refactored the MergeGeometry::mergeGroup(..) method to avoid O(N^2) issue with using removeChildren() on groups with very large numbers of children. 2017-11-27 15:44:11 +00:00
Jordi
66eeabd7d0 Removes custom code added for sketchfab channel compression that should not be there 2017-11-27 15:48:50 +01:00
Robert Osfield
80d1de7832 Removed use of local static to avoid threading issue. 2017-11-22 11:05:17 +00:00
OpenSceneGraph git repository
a5eb5c7bb0
Merge pull request #383 from anormann1974/patch-1
Fixed missing initialization of B_ and N_ in constructor
2017-11-21 14:01:14 +00:00
Robert Osfield
7f97b9f999 Added Text::getCharacterCorners(...) method to help applications that want to find out the positions of characters being rendered. 2017-11-21 13:41:57 +00:00
Andre Normann
e0eb4fbda8
Fixed missing initialization of B_ and N_ in constructor 2017-11-21 13:54:45 +01:00
Raymond de Vries
41dda781ee attached fixes for configuring and building the osgPlugin exr with Visual Studio and using out-of-the-box builds of ilmbase and openexr, i.e. without manual/extra config for using these 2 libs with the OSG.
Previously, the assumption was made that ilmbase and openexr were installed in a common directory and hence the header files and libs were both found in that common directory. That is not consistent with other libs and this submission makes it consistent and therefore the OSG configures out of the box. I made this work for ilmbase-2.1.0.tar.gz / openexr-2.1.0.tar.gz and ilmbase-2.2.0.tar.gz / openexr-2.2.0.tar.gz
2017-11-14 10:59:08 +00:00
Robert Osfield
49a5fdbd1f Fixed typo 2017-11-13 13:08:39 +00:00
Robert Osfield
9c605ba9be Fixed CoverityScan reported errors 2017-11-13 13:06:12 +00:00
Robert Osfield
d98d9c9e72 FIxed two CoverityScan detected memory leaks 2017-11-13 12:49:33 +00:00
Andre Normann
a811de2ba7 Attached is a fix in GLExtension, which is based on latest git version, that fixes the usage of uniform buffer objects on macOS. Under macOS core OpenGL features aren't exported as extension. OpenGL 3.1 includes the GL_ARB_uniform_buffer_object as core feature for example. On macOS a simple osg::isGLExtensionSupported() call would fail. It is required to use the isGLExtensionOrVersionSupported() method. This is what my fix does. 2017-11-13 10:24:31 +00:00
OpenSceneGraph git repository
8d36049dcd
Merge pull request #382 from openscenegraph/osganimation
Osganimation improvements
2017-11-11 14:43:10 +00:00
OpenSceneGraph git repository
8d5a9e84fc
Build fix 2017-11-11 13:27:43 +00:00
OpenSceneGraph git repository
729680714c
Readbility improvements and updating version to 152 2017-11-11 13:08:42 +00:00
OpenSceneGraph git repository
3567e31009
Added versioning to the new serialization additions 2017-11-11 13:04:34 +00:00
OpenSceneGraph git repository
8694fd61ba
Code readability improvements 2017-11-11 13:00:56 +00:00
OpenSceneGraph git repository
4977939c05
Code readability improvements 2017-11-11 12:58:52 +00:00
OpenSceneGraph git repository
8e55ed5923
Code readability improvements 2017-11-11 12:54:28 +00:00
OpenSceneGraph git repository
f59efe0bfe
Code readability improvement 2017-11-11 12:46:48 +00:00
OpenSceneGraph git repository
8ee8550aac
Fix of incorrect Program assignment bug and coding style 2017-11-11 12:42:34 +00:00
OpenSceneGraph git repository
b23cc72037
coding style/readability fixes 2017-11-11 12:33:44 +00:00
OpenSceneGraph git repository
4753b8b2b9
coding style fix 2017-11-11 12:24:27 +00:00
Robert Osfield
ee118c872f Restructed the ref counting of the rawImageRec structure so that it's done with a separate refImageRec struct so it doesn't interfer with the writing of the rawImageRec as a header when writing to .rgb 2017-11-11 11:17:34 +00:00
Andreas Ekstrand
eb061d9acc I have implemented readObject to make loading objects from SceneLoader in the LWS plugin work. I'm not sure about other implications from changes leading up to this problem (readRefFile instead of readNodeFile in SceneLoader) but this fix works for me. 2017-11-11 10:19:09 +00:00
Robert Osfield
dfec052eb9 Fixed handling of GL_TEXTURE_CUBE_MAP when using glTextureStorage. 2017-11-10 17:12:20 +00:00
OpenSceneGraph git repository
821ca4e5cd
Revert " following guidance from OpenGL Common Mistakes:" 2017-11-10 16:58:29 +00:00
OpenSceneGraph git repository
9b6fa79e32
Merge pull request #379 from mp3butcher/osganimbugfix
Fixed handling of mipmaps
2017-11-10 14:49:54 +00:00
Robert Osfield
826c139ef3 Fixed crash in copy constructor due to copy and paste/typo. 2017-11-10 12:41:21 +00:00
Julien Valentin
79afe82774 replace string with stringstream (avoid a string copy at read) 2017-11-08 16:44:09 +01:00
Julien Valentin
baf6945a7a add funcs to read Object from a GZ stream 2017-11-08 15:40:11 +01:00
Robert Osfield
01c68ba5e5 Temporary workaround for the regression of intersection tests with osgText::Text. Added a local vertex array that is transformed by the last applied text matrix. 2017-11-06 19:53:38 +00:00
Julien Valentin
f7f76a1029 following guidance from OpenGL Common Mistakes:
mipmaps should be upload with glTexImage2D and not glTexSubImage2D
2017-11-06 16:22:03 +01:00
Robert Osfield
24f8a01f17 Added check for malloc returning a valid pointer 2017-11-03 09:55:42 +00:00
Robert Osfield
6d65768dab Added an explict null termination of buffer to address Coverity Scan reported issue 2017-11-03 09:49:50 +00:00
Robert Osfield
7dd0320236 Added check for a valud positions pointer 2017-11-02 18:43:05 +00:00
Robert Osfield
6f924f84ba Fuxed missing initializers 2017-11-02 18:39:11 +00:00
Robert Osfield
a07105d6c5 Changed the key binding for opening and editor to edit presentation to 'E' and to trigger update the presentation by pressing 'e' 2017-11-02 16:39:32 +00:00
Robert Osfield
281aae8eea Fixed copy and paste error 2017-11-02 11:51:03 +00:00
Robert Osfield
1bf2db24f2 Moved memset to after check for null memory pointer 2017-11-02 11:48:39 +00:00
Robert Osfield
9dc6c454f4 Cleaned up getEnvVar usage 2017-11-02 11:42:25 +00:00
Robert Osfield
ce69f18ec7 Replaced getenv usage with safer osg::getEnvVar 2017-11-02 10:43:41 +00:00
Robert Osfield
aa744edacc Fixed warning 2017-11-02 10:02:34 +00:00
Robert Osfield
239b0faa4c Replaced getenv calls with safer osg::getEnvVar usage 2017-11-02 10:00:28 +00:00
Robert Osfield
338b0e2b7b Moved getenv usage across to safer osg::getEnvVar() usage 2017-11-01 17:38:33 +00:00
Robert Osfield
3b85aa35df Moved from getenv to osg::getEnvVar usage 2017-11-01 14:45:27 +00:00
Robert Osfield
fbb7270e55 Replaced getenv(..) usage with osg::getEnvVar(..) 2017-11-01 13:54:15 +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
fb175eed14 Fixed Coverity Scane reported issue. 2017-11-01 11:35:05 +00:00
Robert Osfield
6a2bd1f898 Added missing initializers 2017-10-31 17:43:39 +00:00
Robert Osfield
14f50ab31c Fixed CovertiScan reported uninitialized member variable 2017-10-31 17:39:34 +00:00
Robert Osfield
061e52b89f Fixed Coverity Scan reported issue 2017-10-31 17:02:31 +00:00
Robert Osfield
95eb5e2ad6 Replace c char array with std::string to address Coverity scan reported issue 2017-10-31 16:46:42 +00:00
Robert Osfield
3459e8f4fd Fixed Coverity Scan reported memory leaks 2017-10-31 15:55:24 +00:00
Robert Osfield
42c7d7ece1 Fixed Coverity reported memory leak 2017-10-31 15:47:49 +00:00
Robert Osfield
7e86438871 Merge branch 'master' into osganimation 2017-10-30 15:53:56 +00:00
Robert Osfield
bd3262e07f From Raymond de Vires, Windows build fix 2017-10-30 14:22:10 +00:00
Robert Osfield
45e520663d Quitened down the DisplaySettings::setShaderHint() output for NONE. 2017-10-30 13:40:50 +00:00
Robert Osfield
053ba83be6 Merged support for StateSet::DefineList from shader_pipeline branch 2017-10-30 09:32:04 +00:00
Robert Osfield
6530b16fc7 Fixed build error when building wiht OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION=OFF 2017-10-27 18:14:04 +01:00
OpenSceneGraph git repository
faa254dd61
Merge branch 'osganimation' into osganimation 2017-10-27 17:14:43 +01:00
Robert Osfield
671847387f Fixed build errors when compiling with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF 2017-10-27 14:19:13 +01:00
Julien Valentin
c61e4fb15c fix InfluenceMap "remove useless bones" method 2017-10-27 15:10:54 +02:00
Robert Osfield
2b6ffad99a Build fix for when compiling with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF 2017-10-27 13:51:08 +01:00
Robert Osfield
b3515d0e09 Build fix for when compiling with OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION set to OFF 2017-10-27 13:48:52 +01:00
Robert Osfield
1f913ec130 Fixed warning 2017-10-27 13:19:52 +01:00
Robert Osfield
5d9dcfccbf From Farshid Lashkari, "fix for the Collada loader to check for some NULL attributes." 2017-10-27 13:17:47 +01:00
Robert Osfield
11f9bbf6ea Merge branch 'master' into osganimation 2017-10-27 12:54:10 +01:00
Laurens Voerman
93ef9d1dc9 use osg::maximum, not std::max 2017-10-27 09:41:28 +02:00
OpenSceneGraph git repository
1126812f8f Merge pull request #372 from openscenegraph/text_improvements
Text improvements, introducing implementation of Signed Distance Function texture generation and new shaders for outlines and shadows replacing old multi-pass approach
2017-10-26 14:26:01 +01:00
Robert Osfield
1e896777d1 Updated from OpenSceneGraph-Data/shader/text.frag to add fixes to handling of vertexColor's alpha values 2017-10-26 12:08:00 +01:00
Robert Osfield
5918735ebc Added update of glyph representation to ensure all the glyphs are assigned to the required GlyphTextures 2017-10-26 12:03:56 +01:00
Robert Osfield
fa58d01644 Added optimization for text where the colour alpha value is 0.0, returning early to aovid any GL calls. 2017-10-25 16:29:25 +01:00
Robert Osfield
248805fedd Fixed pre compilation osg::Program state leaking into the main scene graph rendering 2017-10-25 16:13:26 +01:00
Robert Osfield
8f658fbc32 Updated from OpenSceneGraph-Data/shaders/text.frag to address GLSL int to float conversion warning 2017-10-24 15:14:23 +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
1ecae6d33a Improved the Text::_shaderTechnique default setting using OSG_TEXT_SHADER_TECHNIQUE env var, options are ALL_FEATURES, GREYSCALE, SIGNED_DISTANCE_FIELD, SDF, NO_TEXT_SHADER, NONE. 2017-10-24 12:34:48 +01:00
Robert Osfield
c162a091fe Quitened down debug info 2017-10-24 12:07:13 +01:00
Robert Osfield
1cd0a5fe03 Fixed Glyph::TextureInfo assignment bug 2017-10-24 11:36:00 +01:00
Robert Osfield
55a1764712 Renamed text_sdf.frag to text.frag and removed text_greyscale_frag.
Cleaned up setup of osgText::ShaderTechnique adding a NO_SHADER_TECHNIQUE option.
2017-10-23 16:07:24 +01:00
Robert Osfield
4b295c46d1 Restructed the way that GlyphTexture is set up to better support control of osgText::ShaderTechnique from osgText::Text 2017-10-23 14:50:35 +01:00
Hartwig
2fc3387429 BUG FIX - Addition of missing #endif directive 2017-10-22 22:13:46 +02:00
Hartwig
abb7f46371 Removal of compiler warning for Cocoa builds 2017-10-22 13:47:51 +02:00
Robert Osfield
817b6601d2 Added Text::s/getShaderTechnique() 2017-10-21 10:08:41 +01:00
Robert Osfield
97aeb16551 Moved osgText::GlyphTechnique::Features enum to osgText::ShaderTechinque enum to make it's roll clearer 2017-10-20 17:03:25 +01:00
Robert Osfield
6b75439ae4 Merge branch 'master' into text_improvements 2017-10-20 14:14:14 +01:00
Robert Osfield
38e5fdadf0 From Ralf Habacker, patch refactoring struct ObjOptionsStruct
in obj plugin into a real class, which is a preparation for further obj
related patches.
2017-10-20 11:52:48 +01:00
Robert Osfield
a2ad1c9606 Added built-in support for lighting.vert 2017-10-20 11:37:41 +01:00
Robert Osfield
4645cc789e Updated shaders from OpenSceneGraph-Data/shaders 2017-10-20 10:18:21 +01:00
Robert Osfield
24c2a0ca60 Moved the assignment of the ModifiedCount to before GL texture calls. 2017-10-19 20:57:25 +01:00
Robert Osfield
068f47d91f Build fixes with ref_ptr<> autoconversion disabled 2017-10-19 11:57:53 +01:00
Robert Osfield
6496c304f9 Implemented inplace replacement 2017-10-18 10:32:18 +01:00
David Siñuela Pastor
cc8a34cd14 Do not break systems with cr as line endings 2017-10-18 10:30:57 +01:00
Robert Osfield
ad45bf1d61 Fixed warning 2017-10-16 11:52:54 +01:00
OpenSceneGraph git repository
7b9f44cb17 Merge pull request #364 from mp3butcher/osganimbugfix
add osg::Program::BindUniformBlockList serialization
2017-10-16 10:16:49 +01:00
Robert Osfield
ea379e64e7 Fixed build error 2017-10-16 10:12:19 +01:00
Robert Osfield
5067db39f8 Moved bracket to be consistent with the rest of the OSG 2017-10-16 10:08:18 +01:00
OpenSceneGraph git repository
bfca9998ea Merge pull request #366 from LaurensVoerman/rotateDXT
add support for dxt compressed images to createImageWithOrientationConversion
2017-10-16 10:00:49 +01:00
Robert Osfield
0e39c129b7 Changed the precision setting of #pargma(tic) shader composition define setup to address GLES compatibility issues 2017-10-14 09:06:37 +01:00
Robert Osfield
0a5c6d3fd6 Improved the formating of GLSL source that is passed to OpenGL to make debugging shaders easier. 2017-10-14 09:03:08 +01:00
Robert Osfield
2303d6afc4 Cleaned up support for GL3 build 2017-10-13 17:03:31 +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
24bec09b9e Removed the glyph image outline support as it's no longer required. 2017-10-13 13:01:57 +01:00
Robert Osfield
8b12d2d71a Deprecated Text:BackdropImplementation, removing the backend as it no longer required when using shaders for backdrop effects 2017-10-13 11:42:25 +01:00
Robert Osfield
28561b2b77 Removed old multipass implemenmtations of backdrops as effect is now fully implememted in shaders 2017-10-13 08:40:58 +01:00
Julien Valentin
b540ed70ba add osg::Program::BindUniformBlock serialization 2017-10-12 20:09:55 +02:00
Robert Osfield
846204ed9e Updated from OpenSceneGraph-Data/shaders/text_sdf.frag to add support for SHADOW 2017-10-12 18:45:38 +01:00
Robert Osfield
f07bf5be2a Merge branch 'master' into text_improvements 2017-10-12 16:44:40 +01:00
Laurens Voerman
0fedfd2ff9 add support for dxt compressed images to createImageWithOrientationConversion 2017-10-12 17:38:16 +02:00
Laurens Voerman
63f12986b4 added dxtc support in Image::getColor, enhanced Image::isImageTranslucent to test opacity of dxt3 and dxt5 images 2017-10-12 13:49:57 +02:00
Robert Osfield
eebb679754 Updated text_sdf_frag.cpp from OpenSceneGraph-Data changes that add outline generation for non SIGNED_DISTANCE_FIELD text. 2017-10-12 11:12:47 +01:00
Robert Osfield
d6af00d9bd Merge branch 'master' into text_improvements 2017-10-10 09:21:34 +01:00
Robert Osfield
4906844ea7 Added explictly unbinding of VBO for setInterleavedArrays(). 2017-10-06 18:03:36 +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
Robert Osfield
7868b42ef2 Improved the readability of recent changes by adding spaces, {} and moving { onto separate lines to keep things consistent with the rest of the OSG. 2017-10-05 16:56:30 +01:00
OpenSceneGraph git repository
11352bbdbb Merge pull request #354 from eligovision/OpenSceneGraph_intersection
LineSegmentIntersector fixed: intersection ratio remaped to the range…
2017-10-05 16:31:45 +01:00
OpenSceneGraph git repository
1a1fe43347 Merge pull request #353 from eligovision/OpenSceneGraph_io
tellg call removed from StreamOperator's checkStream function, becaus…
2017-10-05 16:30:21 +01:00
OpenSceneGraph git repository
bc9f481c2b Merge pull request #355 from denyskoch/patch-1
Fix loading of 16bit PNG images
2017-10-05 16:29:37 +01:00
Robert Osfield
042a357278 Fixed spacing to make it consistent with the rest of the OSG and make it easier to read. 2017-10-05 15:59:26 +01:00