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

Method StartNonOrtho

Rendering/OpenGL2/vtkOpenGLFramebufferObject.cxx:428–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428bool 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
459void vtkOpenGLFramebufferObject::UpdateSize()
460{

Callers 8

StartMethod · 0.95
RenderDelegateMethod · 0.80
RenderDelegateMethod · 0.80
RenderMethod · 0.80
ExecuteMethod · 0.80
RenderDelegateMethod · 0.80
RenderSSAOMethod · 0.80
RenderMethod · 0.80

Calls 7

BindMethod · 0.95
UpdateSizeMethod · 0.95
ActivateBuffersMethod · 0.95
DisplayDrawBuffersMethod · 0.95
DisplayReadBufferMethod · 0.95

Tested by

no test coverage detected