Commit 7e49ccd4 authored by Burlen Loring's avatar Burlen Loring Committed by Code Review
Browse files

Merge topic 'opengl-error-hunt' into master

0994d6ca OpenGL error hunt -- dashboard cleanup
parents e07e9824 0994d6ca
...@@ -529,17 +529,27 @@ void vtkFrameBufferObject::CreateColorBuffers( ...@@ -529,17 +529,27 @@ void vtkFrameBufferObject::CreateColorBuffers(
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
unsigned int vtkFrameBufferObject::GetMaximumNumberOfActiveTargets() unsigned int vtkFrameBufferObject::GetMaximumNumberOfActiveTargets()
{ {
GLint maxbuffers; unsigned int result = 0;
glGetIntegerv(vtkgl::MAX_DRAW_BUFFERS, &maxbuffers); if (this->Context)
return static_cast<unsigned int>(maxbuffers); {
GLint maxbuffers;
glGetIntegerv(vtkgl::MAX_DRAW_BUFFERS, &maxbuffers);
result = static_cast<unsigned int>(maxbuffers);
}
return result;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
unsigned int vtkFrameBufferObject::GetMaximumNumberOfRenderTargets() unsigned int vtkFrameBufferObject::GetMaximumNumberOfRenderTargets()
{ {
GLint maxColorAttachments; unsigned int result = 0;
glGetIntegerv(vtkgl::MAX_COLOR_ATTACHMENTS_EXT,&maxColorAttachments); if (this->Context)
return static_cast<unsigned int>(maxColorAttachments); {
GLint maxColorAttachments;
glGetIntegerv(vtkgl::MAX_COLOR_ATTACHMENTS_EXT,&maxColorAttachments);
result = static_cast<unsigned int>(maxColorAttachments);
}
return result;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
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