Hi Paul,
I'm following your tracks it seems, I've gone forward with the easy way :
--- a/src/osgPlugins/dds/ReaderWriterDDS.cpp
+++ b/src/osgPlugins/dds/ReaderWriterDDS.cpp
@@ -873,12 +873,15 @@ osg::Image* ReadDDSFile(std::istream& _istream, bool
flipDDSRead)
pixelFormat = GL_RG;
dataType = GL_UNSIGNED_BYTE;
break;
-
+#if defined(__APPLE__) && defined(OSG_GL3_AVAILABLE)
+# pragma message("OSG_DXGI_FORMAT_R8G8_SNORM disabled on MacOsX with GL3")
+#else
case OSG_DXGI_FORMAT_R8G8_SNORM:
internalFormat = GL_RG_SNORM;
pixelFormat = GL_RG;
dataType = GL_BYTE;
break;
+#endif
case OSG_DXGI_FORMAT_R8G8_SINT:
internalFormat = GL_RG8I;
@@ -904,12 +907,15 @@ osg::Image* ReadDDSFile(std::istream& _istream, bool
flipDDSRead)
dataType = GL_UNSIGNED_SHORT;
break;
+#if defined(__APPLE__) && defined(OSG_GL3_AVAILABLE)
+# pragma message("OSG_DXGI_FORMAT_R16_SNORM disabled on MacOsX with GL3")
+#else
case OSG_DXGI_FORMAT_R16_SNORM:
internalFormat = GL_RED_SNORM;
pixelFormat = GL_RED;
dataType = GL_SHORT;
break;
-
+#endif
case OSG_DXGI_FORMAT_R16_SINT:
internalFormat = GL_R16I;
pixelFormat = GL_RED;
--
nǝıɥʇɐƜ
On 26 November 2013 22:10, Paul Martz <[email protected]> wrote:
> I'm trying to get OSG trunk built for GL3. Currently the DDS plugin is
> failing to compile due to the undefined symbols GL_RG_SNORM and
> GL_RED_SNORM. These symbols are used at ReaderWriterDDS.cpp lines 878 and
> 908.
>
> Can I get some guidance from the author of this code as to the best way to
> handle these switch cases when OSG is built for GL3? The easy way would be
> to conditionally compile them, in which case they would default to display
> a warning message.
>
> Please advise, thanks.
>
> --
> Paul Martz
> Skew Matrix Software LLC
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org