[osg-users] Please test OpenSceneGraph master in prep for 3.5.6 dev release

Robert Osfield robert.osfield at gmail.com
Sat Mar 25 09:07:55 PDT 2017


Hi Li,

Thanks for the suggestions. I've restructured #defines a bit,
hopefully this will work, I've just checked the following changes into
git master.  Could you test this out?

Cheers,
Robert.

$ git diff
diff --git a/src/osg/StateSet.cpp b/src/osg/StateSet.cpp
index 1c939e0..c6285ba 100644
--- a/src/osg/StateSet.cpp
+++ b/src/osg/StateSet.cpp
@@ -40,9 +40,8 @@
 using namespace osg;


-#define FIXED_FUNCTION defined(OSG_GL_FIXED_FUNCTION_AVAILABLE)
 #define SHADERS_GL3 (defined(OSG_GL3_AVAILABLE) ||
defined(OSG_GLES3_AVAILABLE))
-#define SHADERS_GL2 !FIXED_FUNCTION && !SHADERS_GL3
+#define SHADERS_GL2 (!defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) &&
!defined(OSG_GL3_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE))
 #define IS_ES (defined(OSG_GLES2_AVAILABLE) || defined(OSG_GLES3_AVAILABLE))

 #if SHADERS_GL3
diff --git a/src/osgText/Font.cpp b/src/osgText/Font.cpp
index 90a8db7..d5dc0f8 100644
--- a/src/osgText/Font.cpp
+++ b/src/osgText/Font.cpp
@@ -32,9 +32,8 @@
 using namespace osgText;
 using namespace std;

-#define FIXED_FUNCTION defined(OSG_GL_FIXED_FUNCTION_AVAILABLE)
 #define SHADERS_GL3 (defined(OSG_GL3_AVAILABLE) ||
defined(OSG_GLES3_AVAILABLE))
-#define SHADERS_GL2 !FIXED_FUNCTION && !SHADERS_GL3
+#define SHADERS_GL2 (!defined(OSG_GL_FIXED_FUNCTION_AVAILABLE) &&
!defined(OSG_GL3_AVAILABLE) && !defined(OSG_GLES3_AVAILABLE))
 #define IS_ES (defined(OSG_GLES2_AVAILABLE) || defined(OSG_GLES3_AVAILABLE))

 #if SHADERS_GL3
@@ -329,7 +328,7 @@ Font::Font(FontImplementation* implementation):
     _stateset->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
     _stateset->setMode(GL_BLEND, osg::StateAttribute::ON);

-#if FIXED_FUNCTION
+#if defined(OSG_GL_FIXED_FUNCTION_AVAILABLE)

     OSG_INFO<<"Font::Font() Fixed function pipeline"<<std::endl;



More information about the osg-users mailing list