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

Method LoadRequiredExtensions

Rendering/OpenGL2/vtkTextureObject.cxx:218–239  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

216
217//----------------------------------------------------------------------------
218bool 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//------------------------------------------------------------------------------
242void vtkTextureObject::SetContext(vtkOpenGLRenderWindow* renWin)

Callers 1

SetContextMethod · 0.95

Calls 1

IsSupportedMethod · 0.95

Tested by

no test coverage detected