------------------------------------------------------------------------------
| 592 | |
| 593 | //------------------------------------------------------------------------------ |
| 594 | void vtkOpenGLFramebufferObject::ActivateDrawBuffers(unsigned int num) |
| 595 | { |
| 596 | GLint maxbuffers; |
| 597 | glGetIntegerv(GL_MAX_DRAW_BUFFERS, &maxbuffers); |
| 598 | |
| 599 | GLenum* buffers = new GLenum[maxbuffers]; |
| 600 | GLint count = 0; |
| 601 | for (unsigned int cc = 0; cc < num && count < maxbuffers; cc++) |
| 602 | { |
| 603 | buffers[cc] = GL_COLOR_ATTACHMENT0 + cc; |
| 604 | count++; |
| 605 | } |
| 606 | |
| 607 | this->Context->GetState()->vtkDrawBuffers(count, buffers, this); |
| 608 | delete[] buffers; |
| 609 | |
| 610 | this->ActiveBuffers.clear(); |
| 611 | for (unsigned int cc = 0; cc < num; cc++) |
| 612 | { |
| 613 | this->ActiveBuffers.push_back(cc); |
| 614 | } |
| 615 | this->Modified(); |
| 616 | } |
| 617 | |
| 618 | unsigned int vtkOpenGLFramebufferObject::GetActiveDrawBuffer(unsigned int id) |
| 619 | { |
no test coverage detected