| 83 | } |
| 84 | |
| 85 | void Attach(int mode) |
| 86 | { |
| 87 | if (this->Attached) |
| 88 | { |
| 89 | return; |
| 90 | } |
| 91 | if (this->Texture) |
| 92 | { |
| 93 | if (this->Texture->GetNumberOfDimensions() == 3) |
| 94 | { |
| 95 | #ifndef GL_ES_VERSION_3_0 |
| 96 | glFramebufferTexture3D((GLenum)mode, this->Attachment, this->Target, |
| 97 | this->Texture->GetHandle(), this->MipmapLevel, this->ZSlice); |
| 98 | this->Attached = true; |
| 99 | #else |
| 100 | vtkGenericWarningMacro("Attempt to use 3D frame buffer texture in OpenGL ES 2 or 3"); |
| 101 | #endif |
| 102 | } |
| 103 | else |
| 104 | { |
| 105 | glFramebufferTexture2D((GLenum)mode, this->Attachment, this->Target, |
| 106 | this->Texture->GetHandle(), this->MipmapLevel); |
| 107 | this->Attached = true; |
| 108 | } |
| 109 | } |
| 110 | else if (this->Renderbuffer) |
| 111 | { |
| 112 | glFramebufferRenderbuffer( |
| 113 | (GLenum)mode, this->Attachment, GL_RENDERBUFFER, this->Renderbuffer->GetHandle()); |
| 114 | this->Attached = true; |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | void Detach(int mode) |
| 119 | { |
nothing calls this directly
no test coverage detected