| 426 | } |
| 427 | |
| 428 | bool vtkOpenGLFramebufferObject::StartNonOrtho(int width, int height) |
| 429 | { |
| 430 | this->Bind(); |
| 431 | |
| 432 | // make sure sizes are consistent for all attachments |
| 433 | // this will adjust the depth buffer size if we |
| 434 | // created it. |
| 435 | this->UpdateSize(); |
| 436 | |
| 437 | // If width/height does not match attachments error |
| 438 | if (this->LastSize[0] != width || this->LastSize[1] != height) |
| 439 | { |
| 440 | vtkErrorMacro("FBO size does not match the size of its attachments!."); |
| 441 | } |
| 442 | |
| 443 | this->ActivateBuffers(); |
| 444 | |
| 445 | GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); |
| 446 | if (status != GL_FRAMEBUFFER_COMPLETE) |
| 447 | { |
| 448 | vtkErrorMacro("Frame buffer object was not initialized correctly."); |
| 449 | this->CheckFrameBufferStatus(GL_FRAMEBUFFER); |
| 450 | this->DisplayFrameBufferAttachments(); |
| 451 | this->DisplayDrawBuffers(); |
| 452 | this->DisplayReadBuffer(); |
| 453 | return false; |
| 454 | } |
| 455 | |
| 456 | return true; |
| 457 | } |
| 458 | |
| 459 | void vtkOpenGLFramebufferObject::UpdateSize() |
| 460 | { |
no test coverage detected