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

Method AddColorAttachment

Rendering/OpenGL2/vtkOpenGLFramebufferObject.cxx:882–901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

880}
881
882void vtkOpenGLFramebufferObject::AddColorAttachment(unsigned int index, vtkTextureObject* tex,
883 unsigned int zslice, unsigned int format, unsigned int mipmapLevel)
884{
885 // is the fbo size is not set do it here
886 if (this->LastSize[0] == -1)
887 {
888 this->LastSize[0] = tex->GetWidth();
889 this->LastSize[1] = tex->GetHeight();
890 }
891
892 foIter i = this->ColorBuffers.find(index);
893 if (i == this->ColorBuffers.end())
894 {
895 vtkFOInfo* foinfo = new vtkFOInfo;
896 i = this->ColorBuffers.insert(std::make_pair(index, foinfo)).first;
897 }
898 i->second->SetTexture(tex, GL_COLOR_ATTACHMENT0 + index, format, mipmapLevel);
899 i->second->ZSlice = zslice;
900 this->AttachColorBuffer(index);
901}
902
903void vtkOpenGLFramebufferObject::AddColorAttachment(unsigned int index, vtkRenderbuffer* rb)
904{

Callers 15

PopulateFramebufferMethod · 0.95
RenderDelegateMethod · 0.80
ActivateDrawBuffersMethod · 0.80
RenderMethod · 0.80
RenderMethod · 0.80
RenderOnFaceMethod · 0.80
RenderDelegateMethod · 0.80
RenderMethod · 0.80
LoadMethod · 0.80
InitializeFBOMethod · 0.80
LoadMethod · 0.80

Calls 7

AttachColorBufferMethod · 0.95
GetWidthMethod · 0.45
GetHeightMethod · 0.45
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
SetTextureMethod · 0.45

Tested by

no test coverage detected