| 116 | } |
| 117 | |
| 118 | void Detach(int mode) |
| 119 | { |
| 120 | if (!this->Attached) |
| 121 | { |
| 122 | return; |
| 123 | } |
| 124 | if (this->Texture) |
| 125 | { |
| 126 | if (this->Texture->GetNumberOfDimensions() == 3) |
| 127 | { |
| 128 | #ifndef GL_ES_VERSION_3_0 |
| 129 | glFramebufferTexture3D( |
| 130 | (GLenum)mode, this->Attachment, this->Target, 0, this->MipmapLevel, this->ZSlice); |
| 131 | this->Attached = false; |
| 132 | #else |
| 133 | vtkGenericWarningMacro("Attempt to use 3D frame buffer texture in OpenGL ES 2 or 3"); |
| 134 | #endif |
| 135 | } |
| 136 | else |
| 137 | { |
| 138 | glFramebufferTexture2D((GLenum)mode, this->Attachment, this->Target, 0, this->MipmapLevel); |
| 139 | this->Attached = false; |
| 140 | } |
| 141 | } |
| 142 | else if (this->Renderbuffer) |
| 143 | { |
| 144 | glFramebufferRenderbuffer((GLenum)mode, this->Attachment, GL_RENDERBUFFER, 0); |
| 145 | this->Attached = false; |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | void SetTexture(vtkTextureObject* val, unsigned int attachment, unsigned int target = 0, |
| 150 | unsigned int mipmapLevel = 0) |
nothing calls this directly
no test coverage detected