Hi Robert -- I understand your new approach.
The only question I have at this point is: Do you want me to do this
resubmission work (scrap the current submission and make the mods as you
outline below), or will you be doing this work?
If you want me to resubmit, then let me know when svn trunk is at a good
point for me to restart, and I'll do an update and make the changes from
there.
Thanks,
-Paul
Robert Osfield wrote:
Hi Paul,
I've come up with a macro solution to help out with enabling/disable
certain features so lifting from your example (an illustration of one
of the poorer parts of my current approach for GLES support):
gl3corefeature = isGLExtensionSupported("extension that doesn't exist in GL3");
#ifdef GL3
gl3corefeature = true;
#endif
Changes to:
gl3corefeature = OSG_GL3_FEATURES ||
isGLExtensionSupported("extension that doesn't exist in GL3");
Which avoids the need for any #ifdef's for setting the flags. The way
I have achieved this is to add a OSG_GL1_FEATURES, GL2_FEATURES,
GL3_FEATURES etc. to include/osg/GL thus:
#ifdef OSG_GL1_AVAILABLE
#define OSG_GL1_FEATURES 1
#else
#define OSG_GL1_FEATURES 0
#endif
#ifdef OSG_GL2_AVAILABLE
#define OSG_GL2_FEATURES 1
#else
#define OSG_GL2_FEATURES 0
#endif
#ifdef OSG_GL3_AVAILABLE
#define OSG_GL3_FEATURES 1
#else
#define OSG_GL3_FEATURES 0
#endif
#ifdef OSG_GLES1_AVAILABLE
#define OSG_GLES1_FEATURES 1
#else
#define OSG_GLES1_FEATURES 0
#endif
#ifdef OSG_GLES2_AVAILABLE
#define OSG_GLES2_FEATURES 1
#else
#define OSG_GLES2_FEATURES 0
#endif
Which means the you can use the OSG_*_FEATURES macro as a bool.
I'm just doing a series of build and runtime tests against GL2 and
GLES2 targets, once it's working I'll check the changes in and you'll
hopefully get a better feel for how things are evolving and the
direction to take in the remaining GL3 support.
Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org