From 2e456eeddce8355b1fab16c8d94a2f726d720dd3 Mon Sep 17 00:00:00 2001 From: Daniel Emminizer Date: Fri, 25 Aug 2017 08:55:25 -0400 Subject: [PATCH 1/6] No longer using OSG_EXPORT on DefaultIndirectCommandDrawArrays and DefaultIndirectCommandDrawElements, fixing compile errors in MSVC 2015. --- include/osg/PrimitiveSetIndirect | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/osg/PrimitiveSetIndirect b/include/osg/PrimitiveSetIndirect index 2ce5c1d8d..bf7b1a5ce 100644 --- a/include/osg/PrimitiveSetIndirect +++ b/include/osg/PrimitiveSetIndirect @@ -82,7 +82,7 @@ struct DrawArraysIndirectCommand /// default implementation of IndirectCommandDrawArrays /// DefaultIndirectCommandDrawArrays to be hosted on GPU -class OSG_EXPORT DefaultIndirectCommandDrawArrays: public IndirectCommandDrawArrays, public MixinVector +class DefaultIndirectCommandDrawArrays: public IndirectCommandDrawArrays, public MixinVector { public: META_Object(osg,DefaultIndirectCommandDrawArrays) @@ -120,7 +120,7 @@ struct DrawElementsIndirectCommand }; /// vector of DrawElementsCommand to be hosted on GPU -class OSG_EXPORT DefaultIndirectCommandDrawElements: public IndirectCommandDrawElements, public MixinVector +class DefaultIndirectCommandDrawElements: public IndirectCommandDrawElements, public MixinVector { public: META_Object(osg,DefaultIndirectCommandDrawElements) From a9f0793e6939f92494845a853dc384e22068859d Mon Sep 17 00:00:00 2001 From: Daniel Emminizer Date: Fri, 25 Aug 2017 09:04:05 -0400 Subject: [PATCH 2/6] SETUP_EXE in CMake now uses same define for including the GLCORE headers as SETUP_LIBRARY and SETUP_PLUGIN. Fixes Windows build errors for applications. --- CMakeModules/OsgMacroUtils.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake index 12dd9a882..4ef1ce135 100644 --- a/CMakeModules/OsgMacroUtils.cmake +++ b/CMakeModules/OsgMacroUtils.cmake @@ -361,7 +361,7 @@ ENDMACRO(SETUP_PLUGIN) MACRO(SETUP_EXE IS_COMMANDLINE_APP) #MESSAGE("in -->SETUP_EXE<-- ${TARGET_NAME}-->${TARGET_SRC} <--> ${TARGET_H}<--") - IF(GL3_FOUND) + IF(GLCORE_FOUND) INCLUDE_DIRECTORIES( ${GLCORE_INCLUDE_DIR} ) ENDIF() From 1cd1ab1c60bf1af639c62cd4df51d3090d418ad4 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Sat, 26 Aug 2017 11:30:55 +0000 Subject: [PATCH 3/6] 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. --- include/osg/Group | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/osg/Group b/include/osg/Group index 460c0690e..217a6d072 100644 --- a/include/osg/Group +++ b/include/osg/Group @@ -43,7 +43,7 @@ class OSG_EXPORT Group : public Node virtual void traverse(NodeVisitor& nv); /** Add Node to Group. - * If node is not NULL and is not contained in Group then increment its + * If node is not NULL then increment its * reference count, add it to the child list and dirty the bounding * sphere to force it to recompute on next getBound() and return true for success. * Otherwise return false. Scene nodes can't be added as child nodes. From 871d8c54ec8054962ee903bcd2d2a9d9b0d5f7f1 Mon Sep 17 00:00:00 2001 From: Michael Kapelko Date: Sat, 26 Aug 2017 19:25:00 +0300 Subject: [PATCH 4/6] Fix Emscripten build errors --- examples/osgemscripten/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/osgemscripten/CMakeLists.txt b/examples/osgemscripten/CMakeLists.txt index 6ba3e4449..65c9bc694 100644 --- a/examples/osgemscripten/CMakeLists.txt +++ b/examples/osgemscripten/CMakeLists.txt @@ -9,8 +9,11 @@ SET(EGL_LIBRARY "GL" CACHE STRING "Suppress linkage error") SET(OSG_GL1_AVAILABLE OFF CACHE BOOL "Unavailable under Emscripten") SET(OSG_GL2_AVAILABLE OFF CACHE BOOL "Unavailable under Emscripten") SET(OSG_GLES2_AVAILABLE ON CACHE BOOL "GLES2 is what Emscripten uses") +SET(OSG_WINDOWING_SYSTEM "None" CACHE STRING "Unavailable under Emscripten") SET(DYNAMIC_OPENTHREADS OFF CACHE BOOL "Link OpenThreads statically") SET(DYNAMIC_OPENSCENEGRAPH OFF CACHE BOOL "Link OpenSceneGraph statically") +# Prevent CMake configuration error. +SET(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE "0" CACHE STRING "Prevent cfg error") # Reference SDL2 during build process. # We use SDL2 to do the following: # * OpenGL functions' address retrieval From 6dc6bd5b922079c385d2333c6e186c095d72aeb4 Mon Sep 17 00:00:00 2001 From: Julien Valentin Date: Mon, 28 Aug 2017 05:22:14 +0200 Subject: [PATCH 5/6] fix a bug introduced when readding transformsoftwareMethod --- include/osgAnimation/MorphGeometry | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/osgAnimation/MorphGeometry b/include/osgAnimation/MorphGeometry index 57d54ebfb..f74fdff85 100644 --- a/include/osgAnimation/MorphGeometry +++ b/include/osgAnimation/MorphGeometry @@ -144,7 +144,7 @@ namespace osgAnimation inline bool isDirty()const { return _dirty; } /** for retrocompatibility */ - virtual void transformSoftwareMethod(){ if (!_rigTransformImplementation.valid()_rigTransformImplementation = new MorphTransformSoftware();_rigTransformImplementation(*this);} + virtual void transformSoftwareMethod(){ if (!_rigTransformImplementation.valid())_rigTransformImplementation = new MorphTransformSoftware();_rigTransformImplementation(*this);} protected: osg::ref_ptr _rigTransformImplementation; From 1408c2664e60b1ff531e2eeef89fa4e661fbdc1e Mon Sep 17 00:00:00 2001 From: Mathieu MARACHE Date: Mon, 28 Aug 2017 09:44:10 +0200 Subject: [PATCH 6/6] osg::Program::isFixedFunction() should'nt return true fixed function is unavailable, even if _shaderList.empty() is true --- src/osg/Program.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osg/Program.cpp b/src/osg/Program.cpp index 22e3ca052..7092a565a 100644 --- a/src/osg/Program.cpp +++ b/src/osg/Program.cpp @@ -633,10 +633,14 @@ Program::PerContextProgram* Program::getPCP(State& state) const bool Program::isFixedFunction() const { +#ifdef OSG_GL_FIXED_FUNCTION_AVAILABLE // A Program object having no attached Shaders is a special case: // it indicates that programmable shading is to be disabled, // and thus use GL 1.x "fixed functionality" rendering. return _shaderList.empty(); +#else + return false; +#endif }