Skip to content
Snippets Groups Projects
Commit a5020002 authored by Janis Born's avatar Janis Born
Browse files

add hotfix addressing OSX bug in glDrawBuffers

parent 2b58beab
Branches
No related tags found
No related merge requests found
......@@ -154,6 +154,19 @@ void FrameBufferObject::remapAttachments()
// end debug
bind(); // glDrawBuffers will get part of the FBO state!
#ifdef __APPLE__
// Somehow, Apple's current (OSX 10.7) OpenGL implementation skips over all
// GL_NONE entries in the bufferMappings array if the only color attachment
// specified is GL_COLOR_ATTACHMENT0.
// This however causes that no change from the initial FBO state is
// detected when the only color attachment should be assigned to a FragData
// location other than 0.
// Hotfix: Temporarily set all draw buffers to GL_NONE before setting the
// actual configuration:
glDrawBuffers(0, (GLenum*)NULL);
#endif // __APPLE__
glDrawBuffers( maxColorBuffers, bufferMappings );
delete[] bufferMappings;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment