Commit 2e530ae4 authored by Mario Hlawitschka's avatar Mario Hlawitschka
Browse files

[CHANGE] add runtime warning when non-implemented functionality is reached on...

[CHANGE] add runtime warning when non-implemented functionality is reached on some platforms and commented in documentation.
parent 0582278b
......@@ -73,7 +73,12 @@ WGraphicsEngine::~WGraphicsEngine()
void WGraphicsEngine::setMultiThreadedViews( bool enable )
{
#ifndef __APPLE__
#ifdef __APPLE__
if ( enable )
{
WLogger::getLogger()->addLogMessage( "WGraphicsEngine::setMultiThreadedViews not implemented for OSX, yet", "GE", LL_INFO );
}
#else
// ThreadingModel: enum with the following possibilities
//
// SingleThreaded
......
......@@ -92,6 +92,11 @@ osg::ref_ptr< osg::Texture2D > WGEOffscreenRenderPass::attach( BufferComponent b
else
{
#if defined(__APPLE__)
if ( internalFormat != GL_RGBA )
{
wlog::warn( "WGEOffscreenRenderPass::attach:" ) <<
"Changing internal format to GL_RGBA because the original format is not supported on Mac OSX.";
}
tex = createTexture( GL_RGBA ); // on MacOS X, only RGBA textures work as attachment for FBO's
#else
tex = createTexture( internalFormat );
......
......@@ -96,6 +96,8 @@ public:
/**
* This method attaches a texture to the given buffer. The texture gets created with the resolution of the FBO.
*
* On Mac OSX, only GL_RGBA works as internal format, so all intput to internalFormat is ignored and overwritten by GL_RGBA internally.
*
* \param buffer the buffer to attach the new texture to
* \param internalFormat the format to use. By default, RGBA
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment