----------------------------------------------------------------------------
| 216 | |
| 217 | //---------------------------------------------------------------------------- |
| 218 | bool vtkTextureObject::LoadRequiredExtensions(vtkOpenGLRenderWindow* renWin) |
| 219 | { |
| 220 | #ifdef GL_ES_VERSION_3_0 |
| 221 | this->SupportsTextureInteger = true; |
| 222 | this->SupportsTextureFloat = true; |
| 223 | this->SupportsDepthBufferFloat = true; |
| 224 | #elif defined(__APPLE__) |
| 225 | // Cannot trust glad on apple systems. OpenGL 3.2 on apple supports these features. |
| 226 | this->SupportsTextureInteger = true; |
| 227 | this->SupportsTextureFloat = true; |
| 228 | this->SupportsDepthBufferFloat = true; |
| 229 | #else |
| 230 | this->SupportsTextureInteger = (GLAD_GL_EXT_texture_integer != 0); |
| 231 | |
| 232 | this->SupportsTextureFloat = (GLAD_GL_ARB_texture_float != 0 && GLAD_GL_ARB_texture_rg != 0); |
| 233 | |
| 234 | this->SupportsDepthBufferFloat = (GLAD_GL_ARB_depth_buffer_float != 0); |
| 235 | #endif |
| 236 | |
| 237 | return this->IsSupported( |
| 238 | renWin, this->RequireTextureFloat, this->RequireDepthBufferFloat, this->RequireTextureInteger); |
| 239 | } |
| 240 | |
| 241 | //------------------------------------------------------------------------------ |
| 242 | void vtkTextureObject::SetContext(vtkOpenGLRenderWindow* renWin) |