------------------------------------------------------------------------------
| 129 | |
| 130 | //------------------------------------------------------------------------------ |
| 131 | vtkOpenGLPolyDataMapper::~vtkOpenGLPolyDataMapper() |
| 132 | { |
| 133 | if (this->ResourceCallback) |
| 134 | { |
| 135 | this->ResourceCallback->Release(); |
| 136 | delete this->ResourceCallback; |
| 137 | this->ResourceCallback = nullptr; |
| 138 | } |
| 139 | if (this->InternalColorTexture) |
| 140 | { // Resources released previously. |
| 141 | this->InternalColorTexture->Delete(); |
| 142 | this->InternalColorTexture = nullptr; |
| 143 | } |
| 144 | this->TempMatrix3->Delete(); |
| 145 | this->TempMatrix4->Delete(); |
| 146 | |
| 147 | if (this->CellScalarTexture) |
| 148 | { // Resources released previously. |
| 149 | this->CellScalarTexture->Delete(); |
| 150 | this->CellScalarTexture = nullptr; |
| 151 | } |
| 152 | if (this->CellScalarBuffer) |
| 153 | { // Resources released previously. |
| 154 | this->CellScalarBuffer->Delete(); |
| 155 | this->CellScalarBuffer = nullptr; |
| 156 | } |
| 157 | |
| 158 | if (this->EdgeTexture) |
| 159 | { // Resources released previously. |
| 160 | this->EdgeTexture->Delete(); |
| 161 | this->EdgeTexture = nullptr; |
| 162 | } |
| 163 | if (this->EdgeBuffer) |
| 164 | { // Resources released previously. |
| 165 | this->EdgeBuffer->Delete(); |
| 166 | this->EdgeBuffer = nullptr; |
| 167 | } |
| 168 | |
| 169 | if (this->CellNormalTexture) |
| 170 | { // Resources released previously. |
| 171 | this->CellNormalTexture->Delete(); |
| 172 | this->CellNormalTexture = nullptr; |
| 173 | } |
| 174 | if (this->CellNormalBuffer) |
| 175 | { // Resources released previously. |
| 176 | this->CellNormalBuffer->Delete(); |
| 177 | this->CellNormalBuffer = nullptr; |
| 178 | } |
| 179 | |
| 180 | this->VBOs->Delete(); |
| 181 | this->VBOs = nullptr; |
| 182 | |
| 183 | delete TimerQuery; |
| 184 | } |
| 185 | |
| 186 | //------------------------------------------------------------------------------ |
| 187 | void vtkOpenGLPolyDataMapper::ReleaseGraphicsResources(vtkWindow* win) |