------------------------------------------------------------------------------
| 559 | |
| 560 | //------------------------------------------------------------------------------ |
| 561 | void 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 | |
| 580 | void vtkOpenGLFramebufferObject::ActivateDrawBuffer(unsigned int num) |
| 581 | { |
no test coverage detected