MCPcopy Create free account
hub / github.com/Kitware/VTK / ActivateBuffers

Method ActivateBuffers

Rendering/OpenGL2/vtkOpenGLFramebufferObject.cxx:561–578  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

559
560//------------------------------------------------------------------------------
561void vtkOpenGLFramebufferObject::ActivateBuffers()
562{
563 GLint maxbuffers;
564 // todo move to cache
565 glGetIntegerv(GL_MAX_DRAW_BUFFERS, &maxbuffers);
566
567 GLenum* buffers = new GLenum[maxbuffers];
568 GLint count = 0;
569 for (unsigned int cc = 0; cc < this->ActiveBuffers.size() && count < maxbuffers; cc++)
570 {
571 buffers[cc] = GL_COLOR_ATTACHMENT0 + this->ActiveBuffers[cc];
572 count++;
573 }
574
575 this->Context->GetState()->vtkDrawBuffers(count, buffers, this);
576
577 delete[] buffers;
578}
579
580void vtkOpenGLFramebufferObject::ActivateDrawBuffer(unsigned int num)
581{

Callers 1

StartNonOrthoMethod · 0.95

Calls 3

vtkDrawBuffersMethod · 0.80
sizeMethod · 0.45
GetStateMethod · 0.45

Tested by

no test coverage detected