Browse Source

Split the OpenGL layer out, pt 16: {Extensions::GL => GL::Extensions}.

Was Magnum::GL::Extensions::GL before and the redundancy was completely
unnecessary. Potential future extensions coming from GLX, EGL or whatnot
will most probably be in the Platform namespace in a completely separate
file, so this is not a problem.

All code internal to the GL library is affected, not much the outside,
as that is handled by the compatibility alias.
pull/233/head
Vladimír Vondruš 8 years ago
parent
commit
fbe52532f6
  1. 2
      doc/changelog.dox
  2. 8
      src/Magnum/GL/AbstractFramebuffer.cpp
  3. 2
      src/Magnum/GL/AbstractObject.cpp
  4. 26
      src/Magnum/GL/AbstractShaderProgram.cpp
  5. 6
      src/Magnum/GL/AbstractTexture.cpp
  6. 12
      src/Magnum/GL/Buffer.cpp
  7. 8
      src/Magnum/GL/BufferTexture.cpp
  8. 576
      src/Magnum/GL/Context.cpp
  9. 4
      src/Magnum/GL/CubeMapTextureArray.cpp
  10. 6
      src/Magnum/GL/DebugOutput.cpp
  11. 2
      src/Magnum/GL/DefaultFramebuffer.cpp
  12. 580
      src/Magnum/GL/Extensions.h
  13. 6
      src/Magnum/GL/Framebuffer.cpp
  14. 22
      src/Magnum/GL/Implementation/BufferState.cpp
  15. 20
      src/Magnum/GL/Implementation/DebugState.cpp
  16. 80
      src/Magnum/GL/Implementation/FramebufferState.cpp
  17. 46
      src/Magnum/GL/Implementation/MeshState.cpp
  18. 4
      src/Magnum/GL/Implementation/QueryState.cpp
  19. 16
      src/Magnum/GL/Implementation/RendererState.cpp
  20. 12
      src/Magnum/GL/Implementation/ShaderProgramState.cpp
  21. 90
      src/Magnum/GL/Implementation/TextureState.cpp
  22. 4
      src/Magnum/GL/Implementation/TransformFeedbackState.cpp
  23. 14
      src/Magnum/GL/Implementation/driverSpecific.cpp
  24. 2
      src/Magnum/GL/Mesh.cpp
  25. 6
      src/Magnum/GL/MultisampleTexture.cpp
  26. 2
      src/Magnum/GL/OpenGLTester.cpp
  27. 2
      src/Magnum/GL/RectangleTexture.cpp
  28. 2
      src/Magnum/GL/Renderbuffer.cpp
  29. 4
      src/Magnum/GL/Renderer.cpp
  30. 4
      src/Magnum/GL/Sampler.cpp
  31. 64
      src/Magnum/GL/Shader.cpp
  32. 252
      src/Magnum/GL/Test/MeshGLTest.cpp
  33. 2
      src/Magnum/GL/Texture.cpp
  34. 2
      src/Magnum/GL/TextureArray.cpp
  35. 10
      src/Magnum/GL/TransformFeedback.cpp

2
doc/changelog.dox

@ -178,6 +178,8 @@ See also:
@ref MAGNUM_VERIFY_NO_GL_ERROR() instead @ref MAGNUM_VERIFY_NO_GL_ERROR() instead
- The `Platform::Context` class is deprecated, use @ref Platform::GLContext - The `Platform::Context` class is deprecated, use @ref Platform::GLContext
instead instead
- The `Extensions::GL` namespace is deprecated, use @ref GL::Extensions
instead
- The @ref PixelFormat and @ref CompressedPixelFormat enum now contains - The @ref PixelFormat and @ref CompressedPixelFormat enum now contains
generic API-independent values. The GL-specific formats are present there, generic API-independent values. The GL-specific formats are present there,
but marked as deprecated. Use either the generic values or but marked as deprecated. Use either the generic values or

8
src/Magnum/GL/AbstractFramebuffer.cpp

@ -62,11 +62,11 @@ Vector2i AbstractFramebuffer::maxViewportSize() {
Int AbstractFramebuffer::maxDrawBuffers() { Int AbstractFramebuffer::maxDrawBuffers() {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::draw_buffers>() && if(!Context::current().isExtensionSupported<Extensions::EXT::draw_buffers>() &&
!Context::current().isExtensionSupported<Extensions::GL::NV::draw_buffers>()) !Context::current().isExtensionSupported<Extensions::NV::draw_buffers>())
return 0; return 0;
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::WEBGL::draw_buffers>()) if(!Context::current().isExtensionSupported<Extensions::WEBGL::draw_buffers>())
return 0; return 0;
#endif #endif
#endif #endif
@ -87,7 +87,7 @@ Int AbstractFramebuffer::maxDrawBuffers() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
Int AbstractFramebuffer::maxDualSourceDrawBuffers() { Int AbstractFramebuffer::maxDualSourceDrawBuffers() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::blend_func_extended>()) if(!Context::current().isExtensionSupported<Extensions::ARB::blend_func_extended>())
return 0; return 0;
GLint& value = Context::current().state().framebuffer->maxDualSourceDrawBuffers; GLint& value = Context::current().state().framebuffer->maxDualSourceDrawBuffers;

2
src/Magnum/GL/AbstractObject.cpp

@ -107,7 +107,7 @@ namespace {
} }
Int AbstractObject::maxLabelLength() { Int AbstractObject::maxLabelLength() {
if(!Context::current().isExtensionSupported<Extensions::GL::KHR::debug>()) if(!Context::current().isExtensionSupported<Extensions::KHR::debug>())
return 0; return 0;
GLint& value = Context::current().state().debug->maxLabelLength; GLint& value = Context::current().state().debug->maxLabelLength;

26
src/Magnum/GL/AbstractShaderProgram.cpp

@ -57,7 +57,7 @@ Int AbstractShaderProgram::maxVertexAttributes() {
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
Int AbstractShaderProgram::maxAtomicCounterBufferSize() { Int AbstractShaderProgram::maxAtomicCounterBufferSize() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_atomic_counters>()) if(!Context::current().isExtensionSupported<Extensions::ARB::shader_atomic_counters>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -73,7 +73,7 @@ Int AbstractShaderProgram::maxAtomicCounterBufferSize() {
Int AbstractShaderProgram::maxComputeSharedMemorySize() { Int AbstractShaderProgram::maxComputeSharedMemorySize() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::compute_shader>()) if(!Context::current().isExtensionSupported<Extensions::ARB::compute_shader>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -89,7 +89,7 @@ Int AbstractShaderProgram::maxComputeSharedMemorySize() {
Int AbstractShaderProgram::maxComputeWorkGroupInvocations() { Int AbstractShaderProgram::maxComputeWorkGroupInvocations() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::compute_shader>()) if(!Context::current().isExtensionSupported<Extensions::ARB::compute_shader>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -105,7 +105,7 @@ Int AbstractShaderProgram::maxComputeWorkGroupInvocations() {
Vector3i AbstractShaderProgram::maxComputeWorkGroupCount() { Vector3i AbstractShaderProgram::maxComputeWorkGroupCount() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::compute_shader>()) if(!Context::current().isExtensionSupported<Extensions::ARB::compute_shader>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -124,7 +124,7 @@ Vector3i AbstractShaderProgram::maxComputeWorkGroupCount() {
Vector3i AbstractShaderProgram::maxComputeWorkGroupSize() { Vector3i AbstractShaderProgram::maxComputeWorkGroupSize() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::compute_shader>()) if(!Context::current().isExtensionSupported<Extensions::ARB::compute_shader>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -143,7 +143,7 @@ Vector3i AbstractShaderProgram::maxComputeWorkGroupSize() {
Int AbstractShaderProgram::maxImageUnits() { Int AbstractShaderProgram::maxImageUnits() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_image_load_store>()) if(!Context::current().isExtensionSupported<Extensions::ARB::shader_image_load_store>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -160,7 +160,7 @@ Int AbstractShaderProgram::maxImageUnits() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
Int AbstractShaderProgram::maxImageSamples() { Int AbstractShaderProgram::maxImageSamples() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_image_load_store>()) if(!Context::current().isExtensionSupported<Extensions::ARB::shader_image_load_store>())
return 0; return 0;
GLint& value = Context::current().state().shaderProgram->maxImageSamples; GLint& value = Context::current().state().shaderProgram->maxImageSamples;
@ -176,7 +176,7 @@ Int AbstractShaderProgram::maxImageSamples() {
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
Int AbstractShaderProgram::maxCombinedShaderOutputResources() { Int AbstractShaderProgram::maxCombinedShaderOutputResources() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_storage_buffer_object>() || !Context::current().isExtensionSupported<Extensions::GL::ARB::shader_image_load_store>()) if(!Context::current().isExtensionSupported<Extensions::ARB::shader_storage_buffer_object>() || !Context::current().isExtensionSupported<Extensions::ARB::shader_image_load_store>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -192,7 +192,7 @@ Int AbstractShaderProgram::maxCombinedShaderOutputResources() {
Long AbstractShaderProgram::maxShaderStorageBlockSize() { Long AbstractShaderProgram::maxShaderStorageBlockSize() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_storage_buffer_object>()) if(!Context::current().isExtensionSupported<Extensions::ARB::shader_storage_buffer_object>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -209,7 +209,7 @@ Long AbstractShaderProgram::maxShaderStorageBlockSize() {
Int AbstractShaderProgram::maxUniformBlockSize() { Int AbstractShaderProgram::maxUniformBlockSize() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::uniform_buffer_object>()) if(!Context::current().isExtensionSupported<Extensions::ARB::uniform_buffer_object>())
return 0; return 0;
#endif #endif
@ -224,7 +224,7 @@ Int AbstractShaderProgram::maxUniformBlockSize() {
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
Int AbstractShaderProgram::maxUniformLocations() { Int AbstractShaderProgram::maxUniformLocations() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::explicit_uniform_location>()) if(!Context::current().isExtensionSupported<Extensions::ARB::explicit_uniform_location>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -241,7 +241,7 @@ Int AbstractShaderProgram::maxUniformLocations() {
Int AbstractShaderProgram::minTexelOffset() { Int AbstractShaderProgram::minTexelOffset() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::gpu_shader4>()) if(!Context::current().isExtensionSupported<Extensions::EXT::gpu_shader4>())
return 0; return 0;
#endif #endif
@ -255,7 +255,7 @@ Int AbstractShaderProgram::minTexelOffset() {
Int AbstractShaderProgram::maxTexelOffset() { Int AbstractShaderProgram::maxTexelOffset() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::gpu_shader4>()) if(!Context::current().isExtensionSupported<Extensions::EXT::gpu_shader4>())
return 0; return 0;
#endif #endif

6
src/Magnum/GL/AbstractTexture.cpp

@ -62,7 +62,7 @@ Float AbstractTexture::maxLodBias() {
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
Int AbstractTexture::maxColorSamples() { Int AbstractTexture::maxColorSamples() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::texture_multisample>()) if(!Context::current().isExtensionSupported<Extensions::ARB::texture_multisample>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -79,7 +79,7 @@ Int AbstractTexture::maxColorSamples() {
Int AbstractTexture::maxDepthSamples() { Int AbstractTexture::maxDepthSamples() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::texture_multisample>()) if(!Context::current().isExtensionSupported<Extensions::ARB::texture_multisample>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -96,7 +96,7 @@ Int AbstractTexture::maxDepthSamples() {
Int AbstractTexture::maxIntegerSamples() { Int AbstractTexture::maxIntegerSamples() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::texture_multisample>()) if(!Context::current().isExtensionSupported<Extensions::ARB::texture_multisample>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif

12
src/Magnum/GL/Buffer.cpp

@ -41,7 +41,7 @@ namespace Magnum { namespace GL {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
Int Buffer::minMapAlignment() { Int Buffer::minMapAlignment() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::map_buffer_alignment>()) if(!Context::current().isExtensionSupported<Extensions::ARB::map_buffer_alignment>())
return 1; return 1;
GLint& value = Context::current().state().buffer->minMapAlignment; GLint& value = Context::current().state().buffer->minMapAlignment;
@ -57,7 +57,7 @@ Int Buffer::minMapAlignment() {
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
Int Buffer::maxAtomicCounterBindings() { Int Buffer::maxAtomicCounterBindings() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_atomic_counters>()) if(!Context::current().isExtensionSupported<Extensions::ARB::shader_atomic_counters>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -73,7 +73,7 @@ Int Buffer::maxAtomicCounterBindings() {
Int Buffer::maxShaderStorageBindings() { Int Buffer::maxShaderStorageBindings() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_storage_buffer_object>()) if(!Context::current().isExtensionSupported<Extensions::ARB::shader_storage_buffer_object>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -90,7 +90,7 @@ Int Buffer::maxShaderStorageBindings() {
Int Buffer::uniformOffsetAlignment() { Int Buffer::uniformOffsetAlignment() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::uniform_buffer_object>()) if(!Context::current().isExtensionSupported<Extensions::ARB::uniform_buffer_object>())
return 1; return 1;
#endif #endif
@ -105,7 +105,7 @@ Int Buffer::uniformOffsetAlignment() {
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
Int Buffer::shaderStorageOffsetAlignment() { Int Buffer::shaderStorageOffsetAlignment() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_storage_buffer_object>()) if(!Context::current().isExtensionSupported<Extensions::ARB::shader_storage_buffer_object>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -122,7 +122,7 @@ Int Buffer::shaderStorageOffsetAlignment() {
Int Buffer::maxUniformBindings() { Int Buffer::maxUniformBindings() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::uniform_buffer_object>()) if(!Context::current().isExtensionSupported<Extensions::ARB::uniform_buffer_object>())
return 0; return 0;
#endif #endif

8
src/Magnum/GL/BufferTexture.cpp

@ -36,10 +36,10 @@ namespace Magnum { namespace GL {
Int BufferTexture::maxSize() { Int BufferTexture::maxSize() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::texture_buffer_object>()) if(!Context::current().isExtensionSupported<Extensions::ARB::texture_buffer_object>())
return 0; return 0;
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::texture_buffer>()) if(!Context::current().isExtensionSupported<Extensions::EXT::texture_buffer>())
return 0; return 0;
#endif #endif
@ -54,10 +54,10 @@ Int BufferTexture::maxSize() {
Int BufferTexture::offsetAlignment() { Int BufferTexture::offsetAlignment() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::texture_buffer_range>()) if(!Context::current().isExtensionSupported<Extensions::ARB::texture_buffer_range>())
return 1; return 1;
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::texture_buffer>()) if(!Context::current().isExtensionSupported<Extensions::EXT::texture_buffer>())
return 0; return 0;
#endif #endif

576
src/Magnum/GL/Context.cpp

@ -64,331 +64,331 @@
namespace Magnum { namespace GL { namespace Magnum { namespace GL {
const std::vector<Extension>& Extension::extensions(Version version) { const std::vector<Extension>& Extension::extensions(Version version) {
#define _extension(prefix, vendor, extension) \ #define _extension(vendor, extension) \
{Extensions::prefix::vendor::extension::Index, Extensions::prefix::vendor::extension::requiredVersion(), Extensions::prefix::vendor::extension::coreVersion(), Extensions::prefix::vendor::extension::string()} {Extensions::vendor::extension::Index, Extensions::vendor::extension::requiredVersion(), Extensions::vendor::extension::coreVersion(), Extensions::vendor::extension::string()}
static const std::vector<Extension> empty; static const std::vector<Extension> empty;
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
static const std::vector<Extension> extensions{ static const std::vector<Extension> extensions{
_extension(GL,AMD,transform_feedback3_lines_triangles), _extension(AMD,transform_feedback3_lines_triangles),
_extension(GL,AMD,vertex_shader_layer), _extension(AMD,vertex_shader_layer),
_extension(GL,AMD,shader_trinary_minmax), _extension(AMD,shader_trinary_minmax),
_extension(GL,ARB,robustness), _extension(ARB,robustness),
_extension(GL,ARB,robustness_isolation), _extension(ARB,robustness_isolation),
_extension(GL,ARB,robustness_application_isolation), _extension(ARB,robustness_application_isolation),
_extension(GL,ARB,robustness_share_group_isolation), _extension(ARB,robustness_share_group_isolation),
_extension(GL,ARB,bindless_texture), _extension(ARB,bindless_texture),
_extension(GL,ARB,compute_variable_group_size), _extension(ARB,compute_variable_group_size),
_extension(GL,ARB,seamless_cubemap_per_texture), _extension(ARB,seamless_cubemap_per_texture),
_extension(GL,ARB,sparse_texture), _extension(ARB,sparse_texture),
_extension(GL,ARB,sparse_buffer), _extension(ARB,sparse_buffer),
_extension(GL,ARB,ES3_2_compatibility), _extension(ARB,ES3_2_compatibility),
_extension(GL,ATI,texture_mirror_once), _extension(ATI,texture_mirror_once),
_extension(GL,EXT,texture_filter_anisotropic), _extension(EXT,texture_filter_anisotropic),
_extension(GL,EXT,texture_compression_s3tc), _extension(EXT,texture_compression_s3tc),
_extension(GL,EXT,texture_mirror_clamp), _extension(EXT,texture_mirror_clamp),
_extension(GL,EXT,direct_state_access), _extension(EXT,direct_state_access),
_extension(GL,EXT,texture_sRGB_decode), _extension(EXT,texture_sRGB_decode),
_extension(GL,EXT,shader_integer_mix), _extension(EXT,shader_integer_mix),
_extension(GL,EXT,debug_label), _extension(EXT,debug_label),
_extension(GL,EXT,debug_marker), _extension(EXT,debug_marker),
_extension(GL,GREMEDY,string_marker), _extension(GREMEDY,string_marker),
_extension(GL,KHR,texture_compression_astc_ldr), _extension(KHR,texture_compression_astc_ldr),
_extension(GL,KHR,texture_compression_astc_hdr), _extension(KHR,texture_compression_astc_hdr),
_extension(GL,KHR,blend_equation_advanced), _extension(KHR,blend_equation_advanced),
_extension(GL,KHR,blend_equation_advanced_coherent)}; _extension(KHR,blend_equation_advanced_coherent)};
static const std::vector<Extension> extensions300{ static const std::vector<Extension> extensions300{
_extension(GL,ARB,map_buffer_range), _extension(ARB,map_buffer_range),
_extension(GL,ARB,color_buffer_float), _extension(ARB,color_buffer_float),
_extension(GL,ARB,half_float_pixel), _extension(ARB,half_float_pixel),
_extension(GL,ARB,texture_float), _extension(ARB,texture_float),
_extension(GL,ARB,depth_buffer_float), _extension(ARB,depth_buffer_float),
_extension(GL,ARB,texture_rg), _extension(ARB,texture_rg),
_extension(GL,ARB,vertex_array_object), _extension(ARB,vertex_array_object),
_extension(GL,ARB,framebuffer_object), _extension(ARB,framebuffer_object),
_extension(GL,ARB,framebuffer_sRGB), _extension(ARB,framebuffer_sRGB),
_extension(GL,ARB,half_float_vertex), _extension(ARB,half_float_vertex),
_extension(GL,EXT,gpu_shader4), _extension(EXT,gpu_shader4),
_extension(GL,EXT,packed_float), _extension(EXT,packed_float),
_extension(GL,EXT,texture_array), _extension(EXT,texture_array),
_extension(GL,EXT,texture_compression_rgtc), _extension(EXT,texture_compression_rgtc),
_extension(GL,EXT,texture_shared_exponent), _extension(EXT,texture_shared_exponent),
_extension(GL,EXT,draw_buffers2), _extension(EXT,draw_buffers2),
_extension(GL,EXT,texture_integer), _extension(EXT,texture_integer),
_extension(GL,EXT,transform_feedback), _extension(EXT,transform_feedback),
_extension(GL,NV,depth_buffer_float), _extension(NV,depth_buffer_float),
_extension(GL,NV,conditional_render)}; _extension(NV,conditional_render)};
static const std::vector<Extension> extensions310{ static const std::vector<Extension> extensions310{
_extension(GL,ARB,texture_rectangle), _extension(ARB,texture_rectangle),
_extension(GL,ARB,draw_instanced), _extension(ARB,draw_instanced),
_extension(GL,ARB,texture_buffer_object), _extension(ARB,texture_buffer_object),
_extension(GL,ARB,uniform_buffer_object), _extension(ARB,uniform_buffer_object),
_extension(GL,ARB,copy_buffer), _extension(ARB,copy_buffer),
_extension(GL,EXT,texture_snorm), _extension(EXT,texture_snorm),
_extension(GL,NV,primitive_restart)}; _extension(NV,primitive_restart)};
static const std::vector<Extension> extensions320{ static const std::vector<Extension> extensions320{
_extension(GL,ARB,geometry_shader4), _extension(ARB,geometry_shader4),
_extension(GL,ARB,depth_clamp), _extension(ARB,depth_clamp),
_extension(GL,ARB,draw_elements_base_vertex), _extension(ARB,draw_elements_base_vertex),
_extension(GL,ARB,fragment_coord_conventions), _extension(ARB,fragment_coord_conventions),
_extension(GL,ARB,provoking_vertex), _extension(ARB,provoking_vertex),
_extension(GL,ARB,seamless_cube_map), _extension(ARB,seamless_cube_map),
_extension(GL,ARB,sync), _extension(ARB,sync),
_extension(GL,ARB,texture_multisample), _extension(ARB,texture_multisample),
_extension(GL,ARB,vertex_array_bgra)}; _extension(ARB,vertex_array_bgra)};
static const std::vector<Extension> extensions330{ static const std::vector<Extension> extensions330{
_extension(GL,ARB,instanced_arrays), _extension(ARB,instanced_arrays),
_extension(GL,ARB,blend_func_extended), _extension(ARB,blend_func_extended),
_extension(GL,ARB,explicit_attrib_location), _extension(ARB,explicit_attrib_location),
_extension(GL,ARB,occlusion_query2), _extension(ARB,occlusion_query2),
_extension(GL,ARB,sampler_objects), _extension(ARB,sampler_objects),
_extension(GL,ARB,shader_bit_encoding), _extension(ARB,shader_bit_encoding),
_extension(GL,ARB,texture_rgb10_a2ui), _extension(ARB,texture_rgb10_a2ui),
_extension(GL,ARB,texture_swizzle), _extension(ARB,texture_swizzle),
_extension(GL,ARB,timer_query), _extension(ARB,timer_query),
_extension(GL,ARB,vertex_type_2_10_10_10_rev)}; _extension(ARB,vertex_type_2_10_10_10_rev)};
static const std::vector<Extension> extensions400{ static const std::vector<Extension> extensions400{
_extension(GL,ARB,draw_buffers_blend), _extension(ARB,draw_buffers_blend),
_extension(GL,ARB,sample_shading), _extension(ARB,sample_shading),
_extension(GL,ARB,texture_cube_map_array), _extension(ARB,texture_cube_map_array),
_extension(GL,ARB,texture_gather), _extension(ARB,texture_gather),
_extension(GL,ARB,texture_query_lod), _extension(ARB,texture_query_lod),
_extension(GL,ARB,draw_indirect), _extension(ARB,draw_indirect),
_extension(GL,ARB,gpu_shader5), _extension(ARB,gpu_shader5),
_extension(GL,ARB,gpu_shader_fp64), _extension(ARB,gpu_shader_fp64),
_extension(GL,ARB,shader_subroutine), _extension(ARB,shader_subroutine),
_extension(GL,ARB,tessellation_shader), _extension(ARB,tessellation_shader),
_extension(GL,ARB,texture_buffer_object_rgb32), _extension(ARB,texture_buffer_object_rgb32),
_extension(GL,ARB,transform_feedback2), _extension(ARB,transform_feedback2),
_extension(GL,ARB,transform_feedback3)}; _extension(ARB,transform_feedback3)};
static const std::vector<Extension> extensions410{ static const std::vector<Extension> extensions410{
_extension(GL,ARB,ES2_compatibility), _extension(ARB,ES2_compatibility),
_extension(GL,ARB,get_program_binary), _extension(ARB,get_program_binary),
_extension(GL,ARB,separate_shader_objects), _extension(ARB,separate_shader_objects),
_extension(GL,ARB,shader_precision), _extension(ARB,shader_precision),
_extension(GL,ARB,vertex_attrib_64bit), _extension(ARB,vertex_attrib_64bit),
_extension(GL,ARB,viewport_array)}; _extension(ARB,viewport_array)};
static const std::vector<Extension> extensions420{ static const std::vector<Extension> extensions420{
_extension(GL,ARB,texture_compression_bptc), _extension(ARB,texture_compression_bptc),
_extension(GL,ARB,base_instance), _extension(ARB,base_instance),
_extension(GL,ARB,shading_language_420pack), _extension(ARB,shading_language_420pack),
_extension(GL,ARB,transform_feedback_instanced), _extension(ARB,transform_feedback_instanced),
_extension(GL,ARB,compressed_texture_pixel_storage), _extension(ARB,compressed_texture_pixel_storage),
_extension(GL,ARB,conservative_depth), _extension(ARB,conservative_depth),
_extension(GL,ARB,internalformat_query), _extension(ARB,internalformat_query),
_extension(GL,ARB,map_buffer_alignment), _extension(ARB,map_buffer_alignment),
_extension(GL,ARB,shader_atomic_counters), _extension(ARB,shader_atomic_counters),
_extension(GL,ARB,shader_image_load_store), _extension(ARB,shader_image_load_store),
/* Mentioned in GLSL 4.20 specs as newly added */ /* Mentioned in GLSL 4.20 specs as newly added */
_extension(GL,ARB,shading_language_packing), _extension(ARB,shading_language_packing),
_extension(GL,ARB,texture_storage)}; _extension(ARB,texture_storage)};
static const std::vector<Extension> extensions430{ static const std::vector<Extension> extensions430{
_extension(GL,ARB,arrays_of_arrays), _extension(ARB,arrays_of_arrays),
_extension(GL,ARB,ES3_compatibility), _extension(ARB,ES3_compatibility),
_extension(GL,ARB,clear_buffer_object), _extension(ARB,clear_buffer_object),
_extension(GL,ARB,compute_shader), _extension(ARB,compute_shader),
_extension(GL,ARB,copy_image), _extension(ARB,copy_image),
_extension(GL,ARB,explicit_uniform_location), _extension(ARB,explicit_uniform_location),
_extension(GL,ARB,fragment_layer_viewport), _extension(ARB,fragment_layer_viewport),
_extension(GL,ARB,framebuffer_no_attachments), _extension(ARB,framebuffer_no_attachments),
_extension(GL,ARB,internalformat_query2), _extension(ARB,internalformat_query2),
_extension(GL,ARB,invalidate_subdata), _extension(ARB,invalidate_subdata),
_extension(GL,ARB,multi_draw_indirect), _extension(ARB,multi_draw_indirect),
_extension(GL,ARB,program_interface_query), _extension(ARB,program_interface_query),
_extension(GL,ARB,robust_buffer_access_behavior), _extension(ARB,robust_buffer_access_behavior),
_extension(GL,ARB,shader_image_size), _extension(ARB,shader_image_size),
_extension(GL,ARB,shader_storage_buffer_object), _extension(ARB,shader_storage_buffer_object),
_extension(GL,ARB,stencil_texturing), _extension(ARB,stencil_texturing),
_extension(GL,ARB,texture_buffer_range), _extension(ARB,texture_buffer_range),
_extension(GL,ARB,texture_query_levels), _extension(ARB,texture_query_levels),
_extension(GL,ARB,texture_storage_multisample), _extension(ARB,texture_storage_multisample),
_extension(GL,ARB,texture_view), _extension(ARB,texture_view),
_extension(GL,ARB,vertex_attrib_binding), _extension(ARB,vertex_attrib_binding),
_extension(GL,KHR,debug)}; _extension(KHR,debug)};
static const std::vector<Extension> extensions440{ static const std::vector<Extension> extensions440{
_extension(GL,ARB,buffer_storage), _extension(ARB,buffer_storage),
_extension(GL,ARB,clear_texture), _extension(ARB,clear_texture),
_extension(GL,ARB,enhanced_layouts), _extension(ARB,enhanced_layouts),
_extension(GL,ARB,multi_bind), _extension(ARB,multi_bind),
_extension(GL,ARB,query_buffer_object), _extension(ARB,query_buffer_object),
_extension(GL,ARB,texture_mirror_clamp_to_edge), _extension(ARB,texture_mirror_clamp_to_edge),
_extension(GL,ARB,texture_stencil8), _extension(ARB,texture_stencil8),
_extension(GL,ARB,vertex_type_10f_11f_11f_rev)}; _extension(ARB,vertex_type_10f_11f_11f_rev)};
static const std::vector<Extension> extensions450{ static const std::vector<Extension> extensions450{
_extension(GL,ARB,ES3_1_compatibility), _extension(ARB,ES3_1_compatibility),
_extension(GL,ARB,clip_control), _extension(ARB,clip_control),
_extension(GL,ARB,conditional_render_inverted), _extension(ARB,conditional_render_inverted),
_extension(GL,ARB,cull_distance), _extension(ARB,cull_distance),
_extension(GL,ARB,derivative_control), _extension(ARB,derivative_control),
_extension(GL,ARB,direct_state_access), _extension(ARB,direct_state_access),
_extension(GL,ARB,get_texture_sub_image), _extension(ARB,get_texture_sub_image),
_extension(GL,ARB,shader_texture_image_samples), _extension(ARB,shader_texture_image_samples),
_extension(GL,ARB,texture_barrier), _extension(ARB,texture_barrier),
_extension(GL,KHR,context_flush_control), _extension(KHR,context_flush_control),
_extension(GL,KHR,robustness)}; _extension(KHR,robustness)};
static const std::vector<Extension> extensions460{ static const std::vector<Extension> extensions460{
_extension(GL,ARB,indirect_parameters), _extension(ARB,indirect_parameters),
_extension(GL,ARB,shader_draw_parameters), _extension(ARB,shader_draw_parameters),
_extension(GL,ARB,shader_group_vote), _extension(ARB,shader_group_vote),
_extension(GL,ARB,pipeline_statistics_query), _extension(ARB,pipeline_statistics_query),
_extension(GL,ARB,transform_feedback_overflow_query), _extension(ARB,transform_feedback_overflow_query),
_extension(GL,ARB,shader_atomic_counter_ops), _extension(ARB,shader_atomic_counter_ops),
_extension(GL,ARB,gl_spirv), _extension(ARB,gl_spirv),
_extension(GL,ARB,polygon_offset_clamp), _extension(ARB,polygon_offset_clamp),
_extension(GL,ARB,spirv_extensions), _extension(ARB,spirv_extensions),
_extension(GL,ARB,texture_filter_anisotropic), _extension(ARB,texture_filter_anisotropic),
_extension(GL,KHR,no_error)}; _extension(KHR,no_error)};
#elif defined(MAGNUM_TARGET_WEBGL) #elif defined(MAGNUM_TARGET_WEBGL)
static const std::vector<Extension> extensions{ static const std::vector<Extension> extensions{
_extension(GL,EXT,texture_filter_anisotropic), _extension(EXT,texture_filter_anisotropic),
_extension(GL,EXT,disjoint_timer_query), _extension(EXT,disjoint_timer_query),
_extension(GL,EXT,color_buffer_float), _extension(EXT,color_buffer_float),
_extension(GL,OES,texture_float_linear), _extension(OES,texture_float_linear),
_extension(GL,WEBGL,compressed_texture_s3tc)}; _extension(WEBGL,compressed_texture_s3tc)};
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
static const std::vector<Extension> extensionsES300{ static const std::vector<Extension> extensionsES300{
_extension(GL,ANGLE,instanced_arrays), _extension(ANGLE,instanced_arrays),
_extension(GL,EXT,color_buffer_half_float), _extension(EXT,color_buffer_half_float),
_extension(GL,EXT,sRGB), _extension(EXT,sRGB),
_extension(GL,EXT,blend_minmax), _extension(EXT,blend_minmax),
_extension(GL,EXT,shader_texture_lod), _extension(EXT,shader_texture_lod),
_extension(GL,OES,texture_float), _extension(OES,texture_float),
_extension(GL,OES,texture_half_float), _extension(OES,texture_half_float),
_extension(GL,OES,standard_derivatives), _extension(OES,standard_derivatives),
_extension(GL,OES,vertex_array_object), _extension(OES,vertex_array_object),
_extension(GL,OES,element_index_uint), _extension(OES,element_index_uint),
_extension(GL,OES,texture_half_float_linear), _extension(OES,texture_half_float_linear),
_extension(GL,OES,fbo_render_mipmap), _extension(OES,fbo_render_mipmap),
_extension(GL,WEBGL,depth_texture), _extension(WEBGL,depth_texture),
_extension(GL,WEBGL,color_buffer_float), _extension(WEBGL,color_buffer_float),
_extension(GL,WEBGL,draw_buffers)}; _extension(WEBGL,draw_buffers)};
#endif #endif
#else #else
static const std::vector<Extension> extensions{ static const std::vector<Extension> extensions{
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension(GL,ANDROID,extension_pack_es31a), _extension(ANDROID,extension_pack_es31a),
#endif #endif
_extension(GL,APPLE,texture_format_BGRA8888), _extension(APPLE,texture_format_BGRA8888),
_extension(GL,ARM,shader_framebuffer_fetch), _extension(ARM,shader_framebuffer_fetch),
_extension(GL,ARM,shader_framebuffer_fetch_depth_stencil), _extension(ARM,shader_framebuffer_fetch_depth_stencil),
_extension(GL,EXT,texture_filter_anisotropic), _extension(EXT,texture_filter_anisotropic),
_extension(GL,EXT,texture_format_BGRA8888), _extension(EXT,texture_format_BGRA8888),
_extension(GL,EXT,read_format_bgra), _extension(EXT,read_format_bgra),
_extension(GL,EXT,multi_draw_arrays), _extension(EXT,multi_draw_arrays),
_extension(GL,EXT,debug_label), _extension(EXT,debug_label),
_extension(GL,EXT,debug_marker), _extension(EXT,debug_marker),
_extension(GL,EXT,separate_shader_objects), _extension(EXT,separate_shader_objects),
_extension(GL,EXT,multisampled_render_to_texture), _extension(EXT,multisampled_render_to_texture),
_extension(GL,EXT,robustness), _extension(EXT,robustness),
_extension(GL,EXT,shader_framebuffer_fetch), _extension(EXT,shader_framebuffer_fetch),
_extension(GL,EXT,disjoint_timer_query), _extension(EXT,disjoint_timer_query),
_extension(GL,EXT,texture_sRGB_decode), _extension(EXT,texture_sRGB_decode),
_extension(GL,EXT,sRGB_write_control), _extension(EXT,sRGB_write_control),
_extension(GL,EXT,texture_compression_s3tc), _extension(EXT,texture_compression_s3tc),
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension(GL,EXT,shader_integer_mix), _extension(EXT,shader_integer_mix),
#endif #endif
_extension(GL,EXT,polygon_offset_clamp), _extension(EXT,polygon_offset_clamp),
_extension(GL,KHR,texture_compression_astc_hdr), _extension(KHR,texture_compression_astc_hdr),
_extension(GL,KHR,blend_equation_advanced_coherent), _extension(KHR,blend_equation_advanced_coherent),
_extension(GL,KHR,context_flush_control), _extension(KHR,context_flush_control),
_extension(GL,KHR,no_error), _extension(KHR,no_error),
_extension(GL,NV,read_buffer_front), _extension(NV,read_buffer_front),
_extension(GL,NV,read_depth), _extension(NV,read_depth),
_extension(GL,NV,read_stencil), _extension(NV,read_stencil),
_extension(GL,NV,read_depth_stencil), _extension(NV,read_depth_stencil),
_extension(GL,NV,texture_border_clamp), _extension(NV,texture_border_clamp),
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension(GL,NV,shader_noperspective_interpolation), _extension(NV,shader_noperspective_interpolation),
#endif #endif
_extension(GL,NV,polygon_mode), _extension(NV,polygon_mode),
_extension(GL,OES,depth32), _extension(OES,depth32),
_extension(GL,OES,mapbuffer), _extension(OES,mapbuffer),
_extension(GL,OES,stencil1), _extension(OES,stencil1),
_extension(GL,OES,stencil4), _extension(OES,stencil4),
_extension(GL,OES,texture_float_linear)}; _extension(OES,texture_float_linear)};
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
static const std::vector<Extension> extensionsES300{ static const std::vector<Extension> extensionsES300{
_extension(GL,ANGLE,framebuffer_blit), _extension(ANGLE,framebuffer_blit),
_extension(GL,ANGLE,framebuffer_multisample), _extension(ANGLE,framebuffer_multisample),
_extension(GL,ANGLE,instanced_arrays), _extension(ANGLE,instanced_arrays),
_extension(GL,ANGLE,depth_texture), _extension(ANGLE,depth_texture),
_extension(GL,APPLE,framebuffer_multisample), _extension(APPLE,framebuffer_multisample),
_extension(GL,APPLE,texture_max_level), _extension(APPLE,texture_max_level),
_extension(GL,ARM,rgba8), _extension(ARM,rgba8),
_extension(GL,EXT,texture_type_2_10_10_10_REV), _extension(EXT,texture_type_2_10_10_10_REV),
_extension(GL,EXT,discard_framebuffer), _extension(EXT,discard_framebuffer),
_extension(GL,EXT,blend_minmax), _extension(EXT,blend_minmax),
_extension(GL,EXT,shader_texture_lod), _extension(EXT,shader_texture_lod),
_extension(GL,EXT,unpack_subimage), _extension(EXT,unpack_subimage),
_extension(GL,EXT,occlusion_query_boolean), _extension(EXT,occlusion_query_boolean),
_extension(GL,EXT,shadow_samplers), _extension(EXT,shadow_samplers),
_extension(GL,EXT,texture_rg), _extension(EXT,texture_rg),
_extension(GL,EXT,sRGB), _extension(EXT,sRGB),
_extension(GL,EXT,texture_storage), _extension(EXT,texture_storage),
_extension(GL,EXT,map_buffer_range), _extension(EXT,map_buffer_range),
_extension(GL,EXT,draw_buffers), _extension(EXT,draw_buffers),
_extension(GL,EXT,instanced_arrays), _extension(EXT,instanced_arrays),
_extension(GL,EXT,draw_instanced), _extension(EXT,draw_instanced),
_extension(GL,NV,draw_buffers), _extension(NV,draw_buffers),
_extension(GL,NV,fbo_color_attachments), _extension(NV,fbo_color_attachments),
_extension(GL,NV,read_buffer), _extension(NV,read_buffer),
_extension(GL,NV,pack_subimage), _extension(NV,pack_subimage),
_extension(GL,NV,draw_instanced), _extension(NV,draw_instanced),
_extension(GL,NV,framebuffer_blit), _extension(NV,framebuffer_blit),
_extension(GL,NV,framebuffer_multisample), _extension(NV,framebuffer_multisample),
_extension(GL,NV,instanced_arrays), _extension(NV,instanced_arrays),
_extension(GL,NV,shadow_samplers_array), _extension(NV,shadow_samplers_array),
_extension(GL,NV,shadow_samplers_cube), _extension(NV,shadow_samplers_cube),
_extension(GL,OES,depth24), _extension(OES,depth24),
_extension(GL,OES,element_index_uint), _extension(OES,element_index_uint),
_extension(GL,OES,fbo_render_mipmap), _extension(OES,fbo_render_mipmap),
_extension(GL,OES,rgb8_rgba8), _extension(OES,rgb8_rgba8),
_extension(GL,OES,texture_3D), _extension(OES,texture_3D),
_extension(GL,OES,texture_half_float_linear), _extension(OES,texture_half_float_linear),
_extension(GL,OES,texture_half_float), _extension(OES,texture_half_float),
_extension(GL,OES,texture_float), _extension(OES,texture_float),
_extension(GL,OES,texture_npot), _extension(OES,texture_npot),
_extension(GL,OES,vertex_half_float), _extension(OES,vertex_half_float),
_extension(GL,OES,packed_depth_stencil), _extension(OES,packed_depth_stencil),
_extension(GL,OES,depth_texture), _extension(OES,depth_texture),
_extension(GL,OES,standard_derivatives), _extension(OES,standard_derivatives),
_extension(GL,OES,vertex_array_object), _extension(OES,vertex_array_object),
_extension(GL,OES,required_internalformat), _extension(OES,required_internalformat),
_extension(GL,OES,surfaceless_context)}; _extension(OES,surfaceless_context)};
#endif #endif
static const std::vector<Extension> extensionsES320{ static const std::vector<Extension> extensionsES320{
_extension(GL,EXT,color_buffer_half_float), _extension(EXT,color_buffer_half_float),
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension(GL,EXT,color_buffer_float), _extension(EXT,color_buffer_float),
_extension(GL,EXT,copy_image), _extension(EXT,copy_image),
#endif #endif
_extension(GL,EXT,draw_buffers_indexed), _extension(EXT,draw_buffers_indexed),
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension(GL,EXT,geometry_shader), _extension(EXT,geometry_shader),
_extension(GL,EXT,gpu_shader5), _extension(EXT,gpu_shader5),
_extension(GL,EXT,shader_io_blocks), _extension(EXT,shader_io_blocks),
_extension(GL,EXT,tessellation_shader), _extension(EXT,tessellation_shader),
#endif #endif
_extension(GL,EXT,texture_border_clamp), _extension(EXT,texture_border_clamp),
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension(GL,EXT,texture_buffer), _extension(EXT,texture_buffer),
_extension(GL,EXT,texture_cube_map_array), _extension(EXT,texture_cube_map_array),
_extension(GL,EXT,primitive_bounding_box), _extension(EXT,primitive_bounding_box),
#endif #endif
_extension(GL,KHR,texture_compression_astc_ldr), _extension(KHR,texture_compression_astc_ldr),
_extension(GL,KHR,debug), _extension(KHR,debug),
_extension(GL,KHR,blend_equation_advanced), _extension(KHR,blend_equation_advanced),
_extension(GL,KHR,robustness), _extension(KHR,robustness),
_extension(GL,KHR,robust_buffer_access_behavior), _extension(KHR,robust_buffer_access_behavior),
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension(GL,OES,sample_shading), _extension(OES,sample_shading),
_extension(GL,OES,sample_variables), _extension(OES,sample_variables),
_extension(GL,OES,shader_image_atomic), _extension(OES,shader_image_atomic),
_extension(GL,OES,shader_multisample_interpolation), _extension(OES,shader_multisample_interpolation),
#endif #endif
_extension(GL,OES,texture_stencil8), _extension(OES,texture_stencil8),
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension(GL,OES,texture_storage_multisample_2d_array) _extension(OES,texture_storage_multisample_2d_array)
#endif #endif
}; };
#endif #endif
@ -828,13 +828,13 @@ bool Context::isCoreProfileImplementationNV() {
bool Context::isVersionSupported(Version version) const { bool Context::isVersionSupported(Version version) const {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(version == Version::GLES200) if(version == Version::GLES200)
return isExtensionSupported<Extensions::GL::ARB::ES2_compatibility>(); return isExtensionSupported<Extensions::ARB::ES2_compatibility>();
if(version == Version::GLES300) if(version == Version::GLES300)
return isExtensionSupported<Extensions::GL::ARB::ES3_compatibility>(); return isExtensionSupported<Extensions::ARB::ES3_compatibility>();
if(version == Version::GLES310) if(version == Version::GLES310)
return isExtensionSupported<Extensions::GL::ARB::ES3_1_compatibility>(); return isExtensionSupported<Extensions::ARB::ES3_1_compatibility>();
if(version == Version::GLES320) if(version == Version::GLES320)
return isExtensionSupported<Extensions::GL::ARB::ES3_2_compatibility>(); return isExtensionSupported<Extensions::ARB::ES3_2_compatibility>();
#endif #endif
return _version >= version; return _version >= version;

4
src/Magnum/GL/CubeMapTextureArray.cpp

@ -36,10 +36,10 @@ namespace Magnum { namespace GL {
Vector3i CubeMapTextureArray::maxSize() { Vector3i CubeMapTextureArray::maxSize() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::texture_cube_map_array>()) if(!Context::current().isExtensionSupported<Extensions::ARB::texture_cube_map_array>())
return {}; return {};
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::texture_cube_map_array>()) if(!Context::current().isExtensionSupported<Extensions::EXT::texture_cube_map_array>())
return {}; return {};
#endif #endif

6
src/Magnum/GL/DebugOutput.cpp

@ -105,7 +105,7 @@ void defaultCallback(const DebugOutput::Source source, const DebugOutput::Type t
} }
Int DebugOutput::maxLoggedMessages() { Int DebugOutput::maxLoggedMessages() {
if(!Context::current().isExtensionSupported<Extensions::GL::KHR::debug>()) if(!Context::current().isExtensionSupported<Extensions::KHR::debug>())
return 0; return 0;
GLint& value = Context::current().state().debug->maxLoggedMessages; GLint& value = Context::current().state().debug->maxLoggedMessages;
@ -122,7 +122,7 @@ Int DebugOutput::maxLoggedMessages() {
} }
Int DebugOutput::maxMessageLength() { Int DebugOutput::maxMessageLength() {
if(!Context::current().isExtensionSupported<Extensions::GL::KHR::debug>()) if(!Context::current().isExtensionSupported<Extensions::KHR::debug>())
return 0; return 0;
GLint& value = Context::current().state().debug->maxMessageLength; GLint& value = Context::current().state().debug->maxMessageLength;
@ -310,7 +310,7 @@ Debug& operator<<(Debug& debug, const DebugMessage::Type value) {
#endif #endif
Int DebugGroup::maxStackDepth() { Int DebugGroup::maxStackDepth() {
if(!Context::current().isExtensionSupported<Extensions::GL::KHR::debug>()) if(!Context::current().isExtensionSupported<Extensions::KHR::debug>())
return 0; return 0;
GLint& value = Context::current().state().debug->maxStackDepth; GLint& value = Context::current().state().debug->maxStackDepth;

2
src/Magnum/GL/DefaultFramebuffer.cpp

@ -136,7 +136,7 @@ void DefaultFramebuffer::initializeContextBasedFunctionality(Context& context) {
/* Fake initial glViewport() call for ApiTrace */ /* Fake initial glViewport() call for ApiTrace */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::GREMEDY::string_marker>()) if(context.isExtensionSupported<Extensions::GREMEDY::string_marker>())
glViewport(viewport[0], viewport[1], viewport[2], viewport[3]); glViewport(viewport[0], viewport[1], viewport[2], viewport[3]);
#endif #endif
} }

580
src/Magnum/GL/Extensions.h

@ -77,399 +77,395 @@ See @ref building, @ref cmake and @ref opengl for more information.
namespace Extensions { namespace Extensions {
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
#define _extension(index, prefix, vendor, extension, _requiredVersion, _coreVersion) \ #define _extension(index, vendor, extension, _requiredVersion, _coreVersion) \
struct extension { \ struct extension { \
enum: std::size_t { Index = index }; \ enum: std::size_t { Index = index }; \
constexpr static Version requiredVersion() { return Version::_requiredVersion; } \ constexpr static Version requiredVersion() { return Version::_requiredVersion; } \
constexpr static Version coreVersion() { return Version::_coreVersion; } \ constexpr static Version coreVersion() { return Version::_coreVersion; } \
constexpr static const char* string() { return #prefix "_" #vendor "_" #extension; } \ constexpr static const char* string() { return "GL_" #vendor "_" #extension; } \
}; };
namespace GL {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
namespace AMD { namespace AMD {
_extension( 0,GL,AMD,transform_feedback3_lines_triangles, GL210, None) // #397 _extension( 0,AMD,transform_feedback3_lines_triangles, GL210, None) // #397
_extension( 1,GL,AMD,vertex_shader_layer, GL210, None) // #417 _extension( 1,AMD,vertex_shader_layer, GL210, None) // #417
_extension( 2,GL,AMD,shader_trinary_minmax, GL210, None) // #428 _extension( 2,AMD,shader_trinary_minmax, GL210, None) // #428
} namespace ARB { } namespace ARB {
_extension( 10,GL,ARB,texture_rectangle, GL210, GL310) // #38 _extension( 10,ARB,texture_rectangle, GL210, GL310) // #38
_extension( 11,GL,ARB,color_buffer_float, GL210, GL300) // #39 _extension( 11,ARB,color_buffer_float, GL210, GL300) // #39
_extension( 12,GL,ARB,half_float_pixel, GL210, GL300) // #40 _extension( 12,ARB,half_float_pixel, GL210, GL300) // #40
_extension( 13,GL,ARB,texture_float, GL210, GL300) // #41 _extension( 13,ARB,texture_float, GL210, GL300) // #41
_extension( 14,GL,ARB,depth_buffer_float, GL210, GL300) // #43 _extension( 14,ARB,depth_buffer_float, GL210, GL300) // #43
_extension( 15,GL,ARB,draw_instanced, GL210, GL310) // #44 _extension( 15,ARB,draw_instanced, GL210, GL310) // #44
_extension( 16,GL,ARB,framebuffer_object, GL210, GL300) // #45 _extension( 16,ARB,framebuffer_object, GL210, GL300) // #45
_extension( 17,GL,ARB,framebuffer_sRGB, GL210, GL300) // #46 _extension( 17,ARB,framebuffer_sRGB, GL210, GL300) // #46
_extension( 18,GL,ARB,geometry_shader4, GL210, GL320) // #47 _extension( 18,ARB,geometry_shader4, GL210, GL320) // #47
_extension( 19,GL,ARB,half_float_vertex, GL210, GL300) // #48 _extension( 19,ARB,half_float_vertex, GL210, GL300) // #48
_extension( 20,GL,ARB,instanced_arrays, GL210, GL330) // #49 _extension( 20,ARB,instanced_arrays, GL210, GL330) // #49
_extension( 21,GL,ARB,map_buffer_range, GL210, GL300) // #50 _extension( 21,ARB,map_buffer_range, GL210, GL300) // #50
_extension( 22,GL,ARB,texture_buffer_object, GL210, GL310) // #51 _extension( 22,ARB,texture_buffer_object, GL210, GL310) // #51
_extension( 23,GL,ARB,texture_rg, GL210, GL300) // #53 _extension( 23,ARB,texture_rg, GL210, GL300) // #53
_extension( 24,GL,ARB,vertex_array_object, GL210, GL300) // #54 _extension( 24,ARB,vertex_array_object, GL210, GL300) // #54
_extension( 25,GL,ARB,uniform_buffer_object, GL210, GL310) // #57 _extension( 25,ARB,uniform_buffer_object, GL210, GL310) // #57
_extension( 26,GL,ARB,copy_buffer, /*?*/ GL210, GL310) // #59 _extension( 26,ARB,copy_buffer, /*?*/ GL210, GL310) // #59
_extension( 27,GL,ARB,depth_clamp, /*?*/ GL210, GL320) // #61 _extension( 27,ARB,depth_clamp, /*?*/ GL210, GL320) // #61
_extension( 28,GL,ARB,draw_elements_base_vertex, /*?*/ GL210, GL320) // #62 _extension( 28,ARB,draw_elements_base_vertex, /*?*/ GL210, GL320) // #62
_extension( 29,GL,ARB,fragment_coord_conventions, /*?*/ GL210, GL320) // #63 _extension( 29,ARB,fragment_coord_conventions, /*?*/ GL210, GL320) // #63
_extension( 30,GL,ARB,provoking_vertex, /*?*/ GL210, GL320) // #64 _extension( 30,ARB,provoking_vertex, /*?*/ GL210, GL320) // #64
_extension( 31,GL,ARB,seamless_cube_map, GL210, GL320) // #65 _extension( 31,ARB,seamless_cube_map, GL210, GL320) // #65
_extension( 32,GL,ARB,sync, GL310, GL320) // #66 _extension( 32,ARB,sync, GL310, GL320) // #66
_extension( 33,GL,ARB,texture_multisample, /*?*/ GL210, GL320) // #67 _extension( 33,ARB,texture_multisample, /*?*/ GL210, GL320) // #67
_extension( 34,GL,ARB,vertex_array_bgra, GL210, GL320) // #68 _extension( 34,ARB,vertex_array_bgra, GL210, GL320) // #68
_extension( 35,GL,ARB,draw_buffers_blend, GL210, GL400) // #69 _extension( 35,ARB,draw_buffers_blend, GL210, GL400) // #69
_extension( 36,GL,ARB,sample_shading, GL210, GL400) // #70 _extension( 36,ARB,sample_shading, GL210, GL400) // #70
_extension( 37,GL,ARB,texture_cube_map_array, /*?*/ GL210, GL400) // #71 _extension( 37,ARB,texture_cube_map_array, /*?*/ GL210, GL400) // #71
_extension( 38,GL,ARB,texture_gather, GL210, GL400) // #72 _extension( 38,ARB,texture_gather, GL210, GL400) // #72
_extension( 39,GL,ARB,texture_query_lod, GL210, GL400) // #73 _extension( 39,ARB,texture_query_lod, GL210, GL400) // #73
_extension( 40,GL,ARB,texture_compression_bptc, GL310, GL420) // #77 _extension( 40,ARB,texture_compression_bptc, GL310, GL420) // #77
_extension( 41,GL,ARB,blend_func_extended, GL210, GL330) // #78 _extension( 41,ARB,blend_func_extended, GL210, GL330) // #78
_extension( 42,GL,ARB,explicit_attrib_location, GL210, GL330) // #79 _extension( 42,ARB,explicit_attrib_location, GL210, GL330) // #79
_extension( 43,GL,ARB,occlusion_query2, GL210, GL330) // #80 _extension( 43,ARB,occlusion_query2, GL210, GL330) // #80
_extension( 44,GL,ARB,sampler_objects, GL210, GL330) // #81 _extension( 44,ARB,sampler_objects, GL210, GL330) // #81
_extension( 45,GL,ARB,shader_bit_encoding, /*?*/ GL210, GL330) // #82 _extension( 45,ARB,shader_bit_encoding, /*?*/ GL210, GL330) // #82
_extension( 46,GL,ARB,texture_rgb10_a2ui, GL210, GL330) // #83 _extension( 46,ARB,texture_rgb10_a2ui, GL210, GL330) // #83
_extension( 47,GL,ARB,texture_swizzle, /*?*/ GL210, GL330) // #84 _extension( 47,ARB,texture_swizzle, /*?*/ GL210, GL330) // #84
_extension( 48,GL,ARB,timer_query, /*?*/ GL210, GL330) // #85 _extension( 48,ARB,timer_query, /*?*/ GL210, GL330) // #85
_extension( 49,GL,ARB,vertex_type_2_10_10_10_rev, GL210, GL330) // #86 _extension( 49,ARB,vertex_type_2_10_10_10_rev, GL210, GL330) // #86
_extension( 50,GL,ARB,draw_indirect, GL310, GL400) // #87 _extension( 50,ARB,draw_indirect, GL310, GL400) // #87
_extension( 51,GL,ARB,gpu_shader5, GL320, GL400) // #88 _extension( 51,ARB,gpu_shader5, GL320, GL400) // #88
_extension( 52,GL,ARB,gpu_shader_fp64, GL320, GL400) // #89 _extension( 52,ARB,gpu_shader_fp64, GL320, GL400) // #89
_extension( 53,GL,ARB,shader_subroutine, GL320, GL400) // #90 _extension( 53,ARB,shader_subroutine, GL320, GL400) // #90
_extension( 54,GL,ARB,tessellation_shader, GL320, GL400) // #91 _extension( 54,ARB,tessellation_shader, GL320, GL400) // #91
_extension( 55,GL,ARB,texture_buffer_object_rgb32, /*?*/ GL210, GL400) // #92 _extension( 55,ARB,texture_buffer_object_rgb32, /*?*/ GL210, GL400) // #92
_extension( 56,GL,ARB,transform_feedback2, GL210, GL400) // #93 _extension( 56,ARB,transform_feedback2, GL210, GL400) // #93
_extension( 57,GL,ARB,transform_feedback3, GL210, GL400) // #94 _extension( 57,ARB,transform_feedback3, GL210, GL400) // #94
_extension( 58,GL,ARB,ES2_compatibility, /*?*/ GL210, GL410) // #95 _extension( 58,ARB,ES2_compatibility, /*?*/ GL210, GL410) // #95
_extension( 59,GL,ARB,get_program_binary, GL300, GL410) // #96 _extension( 59,ARB,get_program_binary, GL300, GL410) // #96
_extension( 60,GL,ARB,separate_shader_objects, GL210, GL410) // #97 _extension( 60,ARB,separate_shader_objects, GL210, GL410) // #97
_extension( 61,GL,ARB,shader_precision, GL400, GL410) // #98 _extension( 61,ARB,shader_precision, GL400, GL410) // #98
_extension( 62,GL,ARB,vertex_attrib_64bit, GL300, GL410) // #99 _extension( 62,ARB,vertex_attrib_64bit, GL300, GL410) // #99
_extension( 63,GL,ARB,viewport_array, GL210, GL410) // #100 _extension( 63,ARB,viewport_array, GL210, GL410) // #100
_extension( 64,GL,ARB,robustness, GL210, None) // #105 _extension( 64,ARB,robustness, GL210, None) // #105
_extension( 65,GL,ARB,base_instance, GL210, GL420) // #107 _extension( 65,ARB,base_instance, GL210, GL420) // #107
_extension( 66,GL,ARB,shading_language_420pack, GL300, GL420) // #108 _extension( 66,ARB,shading_language_420pack, GL300, GL420) // #108
_extension( 67,GL,ARB,transform_feedback_instanced, GL210, GL420) // #109 _extension( 67,ARB,transform_feedback_instanced, GL210, GL420) // #109
_extension( 68,GL,ARB,compressed_texture_pixel_storage, GL210, GL420) // #110 _extension( 68,ARB,compressed_texture_pixel_storage,GL210, GL420) // #110
_extension( 69,GL,ARB,conservative_depth, GL300, GL420) // #111 _extension( 69,ARB,conservative_depth, GL300, GL420) // #111
_extension( 70,GL,ARB,internalformat_query, GL210, GL420) // #112 _extension( 70,ARB,internalformat_query, GL210, GL420) // #112
_extension( 71,GL,ARB,map_buffer_alignment, GL210, GL420) // #113 _extension( 71,ARB,map_buffer_alignment, GL210, GL420) // #113
_extension( 72,GL,ARB,shader_atomic_counters, GL300, GL420) // #114 _extension( 72,ARB,shader_atomic_counters, GL300, GL420) // #114
_extension( 73,GL,ARB,shader_image_load_store, GL300, GL420) // #115 _extension( 73,ARB,shader_image_load_store, GL300, GL420) // #115
_extension( 74,GL,ARB,shading_language_packing, /*?*/ GL210, GL420) // #116 _extension( 74,ARB,shading_language_packing, /*?*/ GL210, GL420) // #116
_extension( 75,GL,ARB,texture_storage, GL210, GL420) // #117 _extension( 75,ARB,texture_storage, GL210, GL420) // #117
_extension( 76,GL,ARB,arrays_of_arrays, GL210, GL430) // #120 _extension( 76,ARB,arrays_of_arrays, GL210, GL430) // #120
_extension( 77,GL,ARB,clear_buffer_object, GL210, GL430) // #121 _extension( 77,ARB,clear_buffer_object, GL210, GL430) // #121
_extension( 78,GL,ARB,compute_shader, GL420, GL430) // #122 _extension( 78,ARB,compute_shader, GL420, GL430) // #122
_extension( 79,GL,ARB,copy_image, GL210, GL430) // #123 _extension( 79,ARB,copy_image, GL210, GL430) // #123
_extension( 80,GL,ARB,texture_view, GL210, GL430) // #124 _extension( 80,ARB,texture_view, GL210, GL430) // #124
_extension( 81,GL,ARB,vertex_attrib_binding, GL210, GL430) // #125 _extension( 81,ARB,vertex_attrib_binding, GL210, GL430) // #125
_extension( 82,GL,ARB,robustness_isolation, GL210, None) // #126 _extension( 82,ARB,robustness_isolation, GL210, None) // #126
_extension( 83,GL,ARB,robustness_application_isolation, GL210, None) // #126 _extension( 83,ARB,robustness_application_isolation, GL210, None) // #126
_extension( 84,GL,ARB,robustness_share_group_isolation, GL210, None) // #126 _extension( 84,ARB,robustness_share_group_isolation, GL210, None) // #126
_extension( 85,GL,ARB,ES3_compatibility, GL330, GL430) // #127 _extension( 85,ARB,ES3_compatibility, GL330, GL430) // #127
_extension( 86,GL,ARB,explicit_uniform_location, GL210, GL430) // #128 _extension( 86,ARB,explicit_uniform_location, GL210, GL430) // #128
_extension( 87,GL,ARB,fragment_layer_viewport, GL300, GL430) // #129 _extension( 87,ARB,fragment_layer_viewport, GL300, GL430) // #129
_extension( 88,GL,ARB,framebuffer_no_attachments, GL210, GL430) // #130 _extension( 88,ARB,framebuffer_no_attachments, GL210, GL430) // #130
_extension( 89,GL,ARB,internalformat_query2, GL210, GL430) // #131 _extension( 89,ARB,internalformat_query2, GL210, GL430) // #131
_extension( 90,GL,ARB,invalidate_subdata, GL210, GL430) // #132 _extension( 90,ARB,invalidate_subdata, GL210, GL430) // #132
_extension( 91,GL,ARB,multi_draw_indirect, GL310, GL430) // #133 _extension( 91,ARB,multi_draw_indirect, GL310, GL430) // #133
_extension( 92,GL,ARB,program_interface_query, GL210, GL430) // #134 _extension( 92,ARB,program_interface_query, GL210, GL430) // #134
_extension( 93,GL,ARB,robust_buffer_access_behavior,GL210, GL430) // #135 _extension( 93,ARB,robust_buffer_access_behavior, GL210, GL430) // #135
_extension( 94,GL,ARB,shader_image_size, GL420, GL430) // #136 _extension( 94,ARB,shader_image_size, GL420, GL430) // #136
_extension( 95,GL,ARB,shader_storage_buffer_object, GL400, GL430) // #137 _extension( 95,ARB,shader_storage_buffer_object, GL400, GL430) // #137
_extension( 96,GL,ARB,stencil_texturing, GL210, GL430) // #138 _extension( 96,ARB,stencil_texturing, GL210, GL430) // #138
_extension( 97,GL,ARB,texture_buffer_range, GL210, GL430) // #139 _extension( 97,ARB,texture_buffer_range, GL210, GL430) // #139
_extension( 98,GL,ARB,texture_query_levels, GL300, GL430) // #140 _extension( 98,ARB,texture_query_levels, GL300, GL430) // #140
_extension( 99,GL,ARB,texture_storage_multisample, GL210, GL430) // #141 _extension( 99,ARB,texture_storage_multisample, GL210, GL430) // #141
_extension(100,GL,ARB,buffer_storage, /*?*/ GL430, GL440) // #144 _extension(100,ARB,buffer_storage, /*?*/ GL430, GL440) // #144
_extension(101,GL,ARB,clear_texture, GL210, GL440) // #145 _extension(101,ARB,clear_texture, GL210, GL440) // #145
_extension(102,GL,ARB,enhanced_layouts, GL310, GL440) // #146 _extension(102,ARB,enhanced_layouts, GL310, GL440) // #146
_extension(103,GL,ARB,multi_bind, GL300, GL440) // #147 _extension(103,ARB,multi_bind, GL300, GL440) // #147
_extension(104,GL,ARB,query_buffer_object, GL210, GL440) // #148 _extension(104,ARB,query_buffer_object, GL210, GL440) // #148
_extension(105,GL,ARB,texture_mirror_clamp_to_edge, GL210, GL440) // #149 _extension(105,ARB,texture_mirror_clamp_to_edge, GL210, GL440) // #149
_extension(106,GL,ARB,texture_stencil8, GL210, GL440) // #150 _extension(106,ARB,texture_stencil8, GL210, GL440) // #150
_extension(107,GL,ARB,vertex_type_10f_11f_11f_rev, GL300, GL440) // #151 _extension(107,ARB,vertex_type_10f_11f_11f_rev, GL300, GL440) // #151
_extension(108,GL,ARB,bindless_texture, GL400, None) // #152 _extension(108,ARB,bindless_texture, GL400, None) // #152
_extension(109,GL,ARB,compute_variable_group_size, GL420, None) // #153 _extension(109,ARB,compute_variable_group_size, GL420, None) // #153
_extension(110,GL,ARB,indirect_parameters, GL420, GL460) // #154 _extension(110,ARB,indirect_parameters, GL420, GL460) // #154
_extension(111,GL,ARB,seamless_cubemap_per_texture, GL320, None) // #155 _extension(111,ARB,seamless_cubemap_per_texture, GL320, None) // #155
_extension(112,GL,ARB,shader_draw_parameters, GL310, GL460) // #156 _extension(112,ARB,shader_draw_parameters, GL310, GL460) // #156
_extension(113,GL,ARB,shader_group_vote, GL420, GL460) // #157 _extension(113,ARB,shader_group_vote, GL420, GL460) // #157
_extension(114,GL,ARB,sparse_texture, GL210, None) // #158 _extension(114,ARB,sparse_texture, GL210, None) // #158
_extension(115,GL,ARB,ES3_1_compatibility, GL440, GL450) // #159 _extension(115,ARB,ES3_1_compatibility, GL440, GL450) // #159
_extension(116,GL,ARB,clip_control, GL210, GL450) // #160 _extension(116,ARB,clip_control, GL210, GL450) // #160
_extension(117,GL,ARB,conditional_render_inverted, GL300, GL450) // #161 _extension(117,ARB,conditional_render_inverted, GL300, GL450) // #161
_extension(118,GL,ARB,cull_distance, GL300, GL450) // #162 _extension(118,ARB,cull_distance, GL300, GL450) // #162
_extension(119,GL,ARB,derivative_control, GL400, GL450) // #163 _extension(119,ARB,derivative_control, GL400, GL450) // #163
_extension(120,GL,ARB,direct_state_access, GL210, GL450) // #164 _extension(120,ARB,direct_state_access, GL210, GL450) // #164
_extension(121,GL,ARB,get_texture_sub_image, GL210, GL450) // #165 _extension(121,ARB,get_texture_sub_image, GL210, GL450) // #165
_extension(122,GL,ARB,shader_texture_image_samples, GL430, GL450) // #166 _extension(122,ARB,shader_texture_image_samples, GL430, GL450) // #166
_extension(123,GL,ARB,texture_barrier, GL210, GL450) // #167 _extension(123,ARB,texture_barrier, GL210, GL450) // #167
_extension(124,GL,ARB,pipeline_statistics_query, GL300, GL460) // #171 _extension(124,ARB,pipeline_statistics_query, GL300, GL460) // #171
_extension(125,GL,ARB,sparse_buffer, GL210, None) // #172 _extension(125,ARB,sparse_buffer, GL210, None) // #172
_extension(126,GL,ARB,transform_feedback_overflow_query, GL300, None) // #173 _extension(126,ARB,transform_feedback_overflow_query, GL300, None) // #173
_extension(127,GL,ARB,ES3_2_compatibility, GL450, None) // #177 _extension(127,ARB,ES3_2_compatibility, GL450, None) // #177
_extension(128,GL,ARB,shader_atomic_counter_ops, GL300, GL460) // #182 _extension(128,ARB,shader_atomic_counter_ops, GL300, GL460) // #182
_extension(129,GL,ARB,gl_spirv, GL330, GL460) // #190 _extension(129,ARB,gl_spirv, GL330, GL460) // #190
_extension(130,GL,ARB,polygon_offset_clamp, GL330, GL460) // #193 _extension(130,ARB,polygon_offset_clamp, GL330, GL460) // #193
_extension(131,GL,ARB,spirv_extensions, GL330, GL460) // #194 _extension(131,ARB,spirv_extensions, GL330, GL460) // #194
_extension(132,GL,ARB,texture_filter_anisotropic, GL210, GL460) // #195 _extension(132,ARB,texture_filter_anisotropic, GL210, GL460) // #195
} namespace ATI { } namespace ATI {
_extension(133,GL,ATI,texture_mirror_once, GL210, None) // #221 _extension(133,ATI,texture_mirror_once, GL210, None) // #221
} namespace EXT { } namespace EXT {
_extension(140,GL,EXT,texture_filter_anisotropic, GL210, None) // #187 _extension(140,EXT,texture_filter_anisotropic, GL210, None) // #187
_extension(141,GL,EXT,texture_compression_s3tc, GL210, None) // #198 _extension(141,EXT,texture_compression_s3tc, GL210, None) // #198
/* EXT_framebuffer_object, EXT_packed_depth_stencil, EXT_framebuffer_blit, /* EXT_framebuffer_object, EXT_packed_depth_stencil, EXT_framebuffer_blit,
EXT_framebuffer_multisample replaced with ARB_framebuffer_object */ EXT_framebuffer_multisample replaced with ARB_framebuffer_object */
_extension(142,GL,EXT,texture_mirror_clamp, GL210, None) // #298 _extension(142,EXT,texture_mirror_clamp, GL210, None) // #298
_extension(143,GL,EXT,gpu_shader4, GL210, GL300) // #326 _extension(143,EXT,gpu_shader4, GL210, GL300) // #326
_extension(144,GL,EXT,packed_float, GL210, GL300) // #328 _extension(144,EXT,packed_float, GL210, GL300) // #328
_extension(145,GL,EXT,texture_array, GL210, GL300) // #329 _extension(145,EXT,texture_array, GL210, GL300) // #329
_extension(146,GL,EXT,texture_compression_rgtc, GL210, GL300) // #332 _extension(146,EXT,texture_compression_rgtc, GL210, GL300) // #332
_extension(147,GL,EXT,texture_shared_exponent, GL210, GL300) // #333 _extension(147,EXT,texture_shared_exponent, GL210, GL300) // #333
_extension(148,GL,EXT,draw_buffers2, GL210, GL300) // #340 _extension(148,EXT,draw_buffers2, GL210, GL300) // #340
_extension(149,GL,EXT,texture_integer, GL210, GL300) // #343 _extension(149,EXT,texture_integer, GL210, GL300) // #343
_extension(150,GL,EXT,transform_feedback, GL210, GL300) // #352 _extension(150,EXT,transform_feedback, GL210, GL300) // #352
_extension(151,GL,EXT,direct_state_access, GL210, None) // #353 _extension(151,EXT,direct_state_access, GL210, None) // #353
_extension(152,GL,EXT,texture_snorm, GL300, GL310) // #365 _extension(152,EXT,texture_snorm, GL300, GL310) // #365
_extension(153,GL,EXT,texture_sRGB_decode, GL210, None) // #402 _extension(153,EXT,texture_sRGB_decode, GL210, None) // #402
_extension(154,GL,EXT,shader_integer_mix, GL300, None) // #437 _extension(154,EXT,shader_integer_mix, GL300, None) // #437
_extension(155,GL,EXT,debug_label, GL210, None) // #439 _extension(155,EXT,debug_label, GL210, None) // #439
_extension(156,GL,EXT,debug_marker, GL210, None) // #440 _extension(156,EXT,debug_marker, GL210, None) // #440
} namespace GREMEDY { } namespace GREMEDY {
_extension(157,GL,GREMEDY,string_marker, GL210, None) // #311 _extension(157,GREMEDY,string_marker, GL210, None) // #311
} namespace KHR { } namespace KHR {
_extension(160,GL,KHR,texture_compression_astc_ldr, GL210, None) // #118 _extension(160,KHR,texture_compression_astc_ldr, GL210, None) // #118
_extension(161,GL,KHR,texture_compression_astc_hdr, GL210, None) // #118 _extension(161,KHR,texture_compression_astc_hdr, GL210, None) // #118
_extension(162,GL,KHR,debug, GL210, GL430) // #119 _extension(162,KHR,debug, GL210, GL430) // #119
_extension(163,GL,KHR,context_flush_control, GL210, GL450) // #168 _extension(163,KHR,context_flush_control, GL210, GL450) // #168
_extension(164,GL,KHR,robust_buffer_access_behavior, GL320, None) // #169 _extension(164,KHR,robust_buffer_access_behavior, GL320, None) // #169
_extension(165,GL,KHR,robustness, GL320, GL450) // #170 _extension(165,KHR,robustness, GL320, GL450) // #170
_extension(166,GL,KHR,blend_equation_advanced, GL210, None) // #174 _extension(166,KHR,blend_equation_advanced, GL210, None) // #174
_extension(167,GL,KHR,blend_equation_advanced_coherent, GL210, None) // #174 _extension(167,KHR,blend_equation_advanced_coherent, GL210, None) // #174
_extension(168,GL,KHR,no_error, GL210, None) // #175 _extension(168,KHR,no_error, GL210, None) // #175
} namespace NV { } namespace NV {
_extension(169,GL,NV,primitive_restart, GL210, GL310) // #285 _extension(169,NV,primitive_restart, GL210, GL310) // #285
_extension(170,GL,NV,depth_buffer_float, GL210, GL300) // #334 _extension(170,NV,depth_buffer_float, GL210, GL300) // #334
_extension(171,GL,NV,conditional_render, GL210, GL300) // #346 _extension(171,NV,conditional_render, GL210, GL300) // #346
/* NV_draw_texture not supported */ // #430 /* NV_draw_texture not supported */ // #430
} }
/* IMPORTANT: if this line is > 329 (73 + size), don't forget to update array size in Context.h */ /* IMPORTANT: if this line is > 329 (73 + size), don't forget to update array size in Context.h */
#elif defined(MAGNUM_TARGET_WEBGL) #elif defined(MAGNUM_TARGET_WEBGL)
namespace ANGLE { namespace ANGLE {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 1,GL,ANGLE,instanced_arrays, GLES200, GLES300) // #19 _extension( 1,ANGLE,instanced_arrays, GLES200, GLES300) // #19
#endif #endif
} namespace EXT { } namespace EXT {
_extension( 2,GL,EXT,texture_filter_anisotropic, GLES200, None) // #11 _extension( 2,EXT,texture_filter_anisotropic, GLES200, None) // #11
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 3,GL,EXT,color_buffer_half_float, GLES200, None) // #14 _extension( 3,EXT,color_buffer_half_float, GLES200, None) // #14
#endif #endif
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 4,GL,EXT,sRGB, GLES200, GLES300) // #17 _extension( 4,EXT,sRGB, GLES200, GLES300) // #17
_extension( 5,GL,EXT,blend_minmax, GLES200, GLES300) // #25 _extension( 5,EXT,blend_minmax, GLES200, GLES300) // #25
#endif #endif
_extension( 6,GL,EXT,disjoint_timer_query, GLES200, None) // #26 _extension( 6,EXT,disjoint_timer_query, GLES200, None) // #26
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 7,GL,EXT,shader_texture_lod, GLES200, GLES300) // #27 _extension( 7,EXT,shader_texture_lod, GLES200, GLES300) // #27
#endif #endif
_extension( 8,GL,EXT,color_buffer_float, GLES300, None) // #31 _extension( 8,EXT,color_buffer_float, GLES300, None) // #31
} namespace OES { } namespace OES {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 9,GL,OES,texture_float, GLES200, GLES300) // #1 _extension( 9,OES,texture_float, GLES200, GLES300) // #1
_extension(10,GL,OES,texture_half_float, GLES200, GLES300) // #2 _extension(10,OES,texture_half_float, GLES200, GLES300) // #2
_extension(11,GL,OES,standard_derivatives, GLES200, GLES300) // #4 _extension(11,OES,standard_derivatives, GLES200, GLES300) // #4
_extension(12,GL,OES,vertex_array_object, GLES200, GLES300) // #5 _extension(12,OES,vertex_array_object, GLES200, GLES300) // #5
_extension(13,GL,OES,element_index_uint, GLES200, GLES300) // #10 _extension(13,OES,element_index_uint, GLES200, GLES300) // #10
#endif #endif
_extension(14,GL,OES,texture_float_linear, GLES200, None) // #20 _extension(14,OES,texture_float_linear, GLES200, None) // #20
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension(15,GL,OES,texture_half_float_linear, GLES200, GLES300) // #21 _extension(15,OES,texture_half_float_linear, GLES200, GLES300) // #21
_extension(16,GL,OES,fbo_render_mipmap, GLES200, GLES300) // #28 _extension(16,OES,fbo_render_mipmap, GLES200, GLES300) // #28
#endif #endif
} namespace WEBGL { } namespace WEBGL {
_extension(17,GL,WEBGL,compressed_texture_s3tc, GLES200, None) // #8 _extension(17,WEBGL,compressed_texture_s3tc, GLES200, None) // #8
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension(18,GL,WEBGL,depth_texture, GLES200, GLES300) // #9 _extension(18,WEBGL,depth_texture, GLES200, GLES300) // #9
_extension(19,GL,WEBGL,color_buffer_float, GLES200, None) // #14 _extension(19,WEBGL,color_buffer_float, GLES200, None) // #14
_extension(20,GL,WEBGL,draw_buffers, GLES200, GLES300) // #18 _extension(20,WEBGL,draw_buffers, GLES200, GLES300) // #18
#endif #endif
} }
#else #else
namespace ANDROID { namespace ANDROID {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension( 1,GL,ANDROID,extension_pack_es31a, GLES310, None) // #187 _extension( 1,ANDROID,extension_pack_es31a, GLES310, None) // #187
#endif #endif
} namespace ANGLE { } namespace ANGLE {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 2,GL,ANGLE,framebuffer_blit, GLES200, GLES300) // #83 _extension( 2,ANGLE,framebuffer_blit, GLES200, GLES300) // #83
_extension( 3,GL,ANGLE,framebuffer_multisample, GLES200, GLES300) // #84 _extension( 3,ANGLE,framebuffer_multisample, GLES200, GLES300) // #84
_extension( 4,GL,ANGLE,instanced_arrays, GLES200, GLES300) // #109 _extension( 4,ANGLE,instanced_arrays, GLES200, GLES300) // #109
_extension( 5,GL,ANGLE,depth_texture, GLES200, GLES300) // #138 _extension( 5,ANGLE,depth_texture, GLES200, GLES300) // #138
#endif #endif
} namespace APPLE { } namespace APPLE {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 6,GL,APPLE,framebuffer_multisample, GLES200, GLES300) // #78 _extension( 6,APPLE,framebuffer_multisample, GLES200, GLES300) // #78
#endif #endif
_extension( 7,GL,APPLE,texture_format_BGRA8888, GLES200, None) // #79 _extension( 7,APPLE,texture_format_BGRA8888, GLES200, None) // #79
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 8,GL,APPLE,texture_max_level, GLES200, None) // #80 _extension( 8,APPLE,texture_max_level, GLES200, None) // #80
#endif #endif
} namespace ARM { } namespace ARM {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 9,GL,ARM,rgba8, GLES200, GLES300) // #82 _extension( 9,ARM,rgba8, GLES200, GLES300) // #82
#endif #endif
_extension( 10,GL,ARM,shader_framebuffer_fetch, GLES200, None) // #165 _extension( 10,ARM,shader_framebuffer_fetch, GLES200, None) // #165
_extension( 11,GL,ARM,shader_framebuffer_fetch_depth_stencil, GLES200, None) // #166 _extension( 11,ARM,shader_framebuffer_fetch_depth_stencil, GLES200, None) // #166
} namespace EXT { } namespace EXT {
_extension( 20,GL,EXT,texture_filter_anisotropic, GLES200, None) // #41 _extension( 20,EXT,texture_filter_anisotropic, GLES200, None) // #41
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 21,GL,EXT,texture_type_2_10_10_10_REV, GLES200, GLES300) // #42 _extension( 21,EXT,texture_type_2_10_10_10_REV, GLES200, GLES300) // #42
#endif #endif
_extension( 22,GL,EXT,texture_format_BGRA8888, GLES200, None) // #51 _extension( 22,EXT,texture_format_BGRA8888, GLES200, None) // #51
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 23,GL,EXT,discard_framebuffer, GLES200, GLES300) // #64 _extension( 23,EXT,discard_framebuffer, GLES200, GLES300) // #64
_extension( 24,GL,EXT,blend_minmax, GLES200, GLES300) // #65 _extension( 24,EXT,blend_minmax, GLES200, GLES300) // #65
#endif #endif
_extension( 25,GL,EXT,read_format_bgra, GLES200, None) // #66 _extension( 25,EXT,read_format_bgra, GLES200, None) // #66
_extension( 26,GL,EXT,multi_draw_arrays, GLES200, None) // #67 _extension( 26,EXT,multi_draw_arrays, GLES200, None) // #67
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 27,GL,EXT,shader_texture_lod, GLES200, GLES300) // #77 _extension( 27,EXT,shader_texture_lod, GLES200, GLES300) // #77
_extension( 28,GL,EXT,unpack_subimage, GLES200, GLES300) // #90 _extension( 28,EXT,unpack_subimage, GLES200, GLES300) // #90
#endif #endif
_extension( 29,GL,EXT,color_buffer_half_float, GLES200, GLES320) // #97 _extension( 29,EXT,color_buffer_half_float, GLES200, GLES320) // #97
_extension( 30,GL,EXT,debug_label, GLES200, None) // #98 _extension( 30,EXT,debug_label, GLES200, None) // #98
_extension( 31,GL,EXT,debug_marker, GLES200, None) // #99 _extension( 31,EXT,debug_marker, GLES200, None) // #99
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 32,GL,EXT,occlusion_query_boolean, GLES200, GLES300) // #100 _extension( 32,EXT,occlusion_query_boolean, GLES200, GLES300) // #100
#endif #endif
_extension( 33,GL,EXT,separate_shader_objects, GLES200, None) // #101 _extension( 33,EXT,separate_shader_objects, GLES200, None) // #101
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 34,GL,EXT,shadow_samplers, GLES200, GLES300) // #102 _extension( 34,EXT,shadow_samplers, GLES200, GLES300) // #102
_extension( 35,GL,EXT,texture_rg, GLES200, GLES300) // #103 _extension( 35,EXT,texture_rg, GLES200, GLES300) // #103
_extension( 36,GL,EXT,sRGB, GLES200, GLES300) // #105 _extension( 36,EXT,sRGB, GLES200, GLES300) // #105
#endif #endif
_extension( 37,GL,EXT,multisampled_render_to_texture, GLES200, None) // #106 _extension( 37,EXT,multisampled_render_to_texture, GLES200, None) // #106
_extension( 38,GL,EXT,robustness, GLES200, None) // #107 _extension( 38,EXT,robustness, GLES200, None) // #107
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 39,GL,EXT,texture_storage, GLES200, GLES300) // #108 _extension( 39,EXT,texture_storage, GLES200, GLES300) // #108
_extension( 40,GL,EXT,map_buffer_range, GLES200, GLES300) // #121 _extension( 40,EXT,map_buffer_range, GLES200, GLES300) // #121
#endif #endif
_extension( 41,GL,EXT,shader_framebuffer_fetch, GLES200, None) // #122 _extension( 41,EXT,shader_framebuffer_fetch, GLES200, None) // #122
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension( 42,GL,EXT,color_buffer_float, GLES300, GLES320) // #137 _extension( 42,EXT,color_buffer_float, GLES300, GLES320) // #137
#endif #endif
_extension( 43,GL,EXT,disjoint_timer_query, GLES200, None) // #150 _extension( 43,EXT,disjoint_timer_query, GLES200, None) // #150
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 44,GL,EXT,draw_buffers, GLES200, GLES300) // #151 _extension( 44,EXT,draw_buffers, GLES200, GLES300) // #151
#endif #endif
_extension( 45,GL,EXT,texture_sRGB_decode, GLES200, None) // #152 _extension( 45,EXT,texture_sRGB_decode, GLES200, None) // #152
_extension( 46,GL,EXT,sRGB_write_control, GLES200, None) // #153 _extension( 46,EXT,sRGB_write_control, GLES200, None) // #153
_extension( 47,GL,EXT,texture_compression_s3tc, GLES200, None) // #154 _extension( 47,EXT,texture_compression_s3tc, GLES200, None) // #154
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 48,GL,EXT,instanced_arrays, GLES200, GLES300) // #156 _extension( 48,EXT,instanced_arrays, GLES200, GLES300) // #156
_extension( 49,GL,EXT,draw_instanced, GLES200, GLES300) // #157 _extension( 49,EXT,draw_instanced, GLES200, GLES300) // #157
#endif #endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension( 50,GL,EXT,shader_integer_mix, GLES300, None) // #161 _extension( 50,EXT,shader_integer_mix, GLES300, None) // #161
_extension( 51,GL,EXT,copy_image, GLES300, GLES320) // #175 _extension( 51,EXT,copy_image, GLES300, GLES320) // #175
#endif #endif
_extension( 52,GL,EXT,draw_buffers_indexed, GLES200, GLES320) // #176 _extension( 52,EXT,draw_buffers_indexed, GLES200, GLES320) // #176
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension( 53,GL,EXT,geometry_shader, GLES310, GLES320) // #177 _extension( 53,EXT,geometry_shader, GLES310, GLES320) // #177
_extension( 54,GL,EXT,gpu_shader5, GLES310, GLES320) // #178 _extension( 54,EXT,gpu_shader5, GLES310, GLES320) // #178
_extension( 55,GL,EXT,shader_io_blocks, GLES310, GLES320) // #180 _extension( 55,EXT,shader_io_blocks, GLES310, GLES320) // #180
_extension( 56,GL,EXT,tessellation_shader, GLES310, GLES320) // #181 _extension( 56,EXT,tessellation_shader, GLES310, GLES320) // #181
#endif #endif
_extension( 57,GL,EXT,texture_border_clamp, GLES200, GLES320) // #182 _extension( 57,EXT,texture_border_clamp, GLES200, GLES320) // #182
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension( 58,GL,EXT,texture_buffer, GLES310, GLES320) // #183 _extension( 58,EXT,texture_buffer, GLES310, GLES320) // #183
_extension( 59,GL,EXT,texture_cube_map_array, GLES310, GLES320) // #184 _extension( 59,EXT,texture_cube_map_array, GLES310, GLES320) // #184
_extension( 60,GL,EXT,primitive_bounding_box, GLES310, GLES320) // #186 _extension( 60,EXT,primitive_bounding_box, GLES310, GLES320) // #186
#endif #endif
_extension( 61,GL,EXT,polygon_offset_clamp, GLES200, None) // #252 _extension( 61,EXT,polygon_offset_clamp, GLES200, None) // #252
} namespace KHR { } namespace KHR {
_extension( 70,GL,KHR,texture_compression_astc_ldr, GLES200, GLES320) // #117 _extension( 70,KHR,texture_compression_astc_ldr,GLES200, GLES320) // #117
_extension( 71,GL,KHR,texture_compression_astc_hdr, GLES200, None) // #117 _extension( 71,KHR,texture_compression_astc_hdr,GLES200, None) // #117
_extension( 72,GL,KHR,debug, GLES200, GLES320) // #118 _extension( 72,KHR,debug, GLES200, GLES320) // #118
_extension( 73,GL,KHR,blend_equation_advanced, GLES200, GLES320) // #168 _extension( 73,KHR,blend_equation_advanced, GLES200, GLES320) // #168
_extension( 74,GL,KHR,blend_equation_advanced_coherent, GLES200, None) // #168 _extension( 74,KHR,blend_equation_advanced_coherent, GLES200, None) // #168
_extension( 75,GL,KHR,robustness, GLES200, GLES320) // #170 _extension( 75,KHR,robustness, GLES200, GLES320) // #170
_extension( 76,GL,KHR,robust_buffer_access_behavior, GLES200, GLES320) // #189 _extension( 76,KHR,robust_buffer_access_behavior, GLES200, GLES320) // #189
_extension( 77,GL,KHR,context_flush_control, GLES200, None) // #191 _extension( 77,KHR,context_flush_control, GLES200, None) // #191
_extension( 78,GL,KHR,no_error, GLES200, None) // #243 _extension( 78,KHR,no_error, GLES200, None) // #243
} namespace NV { } namespace NV {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 80,GL,NV,draw_buffers, GLES200, GLES300) // #91 _extension( 80,NV,draw_buffers, GLES200, GLES300) // #91
_extension( 81,GL,NV,fbo_color_attachments, GLES200, GLES300) // #92 _extension( 81,NV,fbo_color_attachments, GLES200, GLES300) // #92
_extension( 82,GL,NV,read_buffer, GLES200, GLES300) // #93 _extension( 82,NV,read_buffer, GLES200, GLES300) // #93
#endif #endif
_extension( 83,GL,NV,read_buffer_front, GLES200, None) // #93 _extension( 83,NV,read_buffer_front, GLES200, None) // #93
_extension( 84,GL,NV,read_depth, GLES200, None) // #94 _extension( 84,NV,read_depth, GLES200, None) // #94
_extension( 85,GL,NV,read_stencil, GLES200, None) // #94 _extension( 85,NV,read_stencil, GLES200, None) // #94
_extension( 86,GL,NV,read_depth_stencil, GLES200, None) // #94 _extension( 86,NV,read_depth_stencil, GLES200, None) // #94
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension( 87,GL,NV,pack_subimage, GLES200, GLES300) // #132 _extension( 87,NV,pack_subimage, GLES200, GLES300) // #132
_extension( 88,GL,NV,draw_instanced, GLES200, GLES300) // #141 _extension( 88,NV,draw_instanced, GLES200, GLES300) // #141
_extension( 89,GL,NV,framebuffer_blit, GLES200, GLES300) // #142 _extension( 89,NV,framebuffer_blit, GLES200, GLES300) // #142
_extension( 90,GL,NV,framebuffer_multisample, GLES200, GLES300) // #143 _extension( 90,NV,framebuffer_multisample, GLES200, GLES300) // #143
_extension( 91,GL,NV,instanced_arrays, GLES200, GLES300) // #145 _extension( 91,NV,instanced_arrays, GLES200, GLES300) // #145
_extension( 92,GL,NV,shadow_samplers_array, GLES200, GLES300) // #146 _extension( 92,NV,shadow_samplers_array, GLES200, GLES300) // #146
_extension( 93,GL,NV,shadow_samplers_cube, GLES200, GLES300) // #147 _extension( 93,NV,shadow_samplers_cube, GLES200, GLES300) // #147
#endif #endif
_extension( 94,GL,NV,texture_border_clamp, GLES200, None) // #149 _extension( 94,NV,texture_border_clamp, GLES200, None) // #149
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension( 95,GL,NV,shader_noperspective_interpolation, GLES300, None) // #201 _extension( 95,NV,shader_noperspective_interpolation, GLES300, None) // #201
#endif #endif
_extension( 96,GL,NV,polygon_mode, GLES200, None) // #238 _extension( 96,NV,polygon_mode, GLES200, None) // #238
} namespace OES { } namespace OES {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension(100,GL,OES,depth24, GLES200, GLES300) // #24 _extension(100,OES,depth24, GLES200, GLES300) // #24
#endif #endif
_extension(101,GL,OES,depth32, GLES200, None) // #25 _extension(101,OES,depth32, GLES200, None) // #25
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension(102, GL,OES,element_index_uint, GLES200, GLES300) // #26 _extension(102,OES,element_index_uint, GLES200, GLES300) // #26
_extension(103,GL,OES,fbo_render_mipmap, GLES200, GLES300) // #27 _extension(103,OES,fbo_render_mipmap, GLES200, GLES300) // #27
#endif #endif
_extension(104,GL,OES,mapbuffer, GLES200, None) // #29 _extension(104,OES,mapbuffer, GLES200, None) // #29
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension(105,GL,OES,rgb8_rgba8, GLES200, GLES300) // #30 _extension(105,OES,rgb8_rgba8, GLES200, GLES300) // #30
#endif #endif
_extension(106,GL,OES,stencil1, GLES200, None) // #31 _extension(106,OES,stencil1, GLES200, None) // #31
_extension(107,GL,OES,stencil4, GLES200, None) // #32 _extension(107,OES,stencil4, GLES200, None) // #32
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension(108,GL,OES,texture_3D, GLES200, GLES300) // #34 _extension(108,OES,texture_3D, GLES200, GLES300) // #34
_extension(109,GL,OES,texture_half_float_linear, GLES200, GLES300) // #35 _extension(109,OES,texture_half_float_linear, GLES200, GLES300) // #35
#endif #endif
_extension(110,GL,OES,texture_float_linear, GLES200, None) // #35 _extension(110,OES,texture_float_linear, GLES200, None) // #35
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
_extension(111,GL,OES,texture_half_float, GLES200, GLES300) // #36 _extension(111,OES,texture_half_float, GLES200, GLES300) // #36
_extension(112,GL,OES,texture_float, GLES200, GLES300) // #36 _extension(112,OES,texture_float, GLES200, GLES300) // #36
_extension(113,GL,OES,texture_npot, GLES200, GLES300) // #37 _extension(113,OES,texture_npot, GLES200, GLES300) // #37
_extension(114,GL,OES,vertex_half_float, GLES200, GLES300) // #38 _extension(114,OES,vertex_half_float, GLES200, GLES300) // #38
_extension(115,GL,OES,packed_depth_stencil, GLES200, GLES300) // #43 _extension(115,OES,packed_depth_stencil, GLES200, GLES300) // #43
_extension(116,GL,OES,depth_texture, GLES200, GLES300) // #44 _extension(116,OES,depth_texture, GLES200, GLES300) // #44
_extension(117,GL,OES,standard_derivatives, GLES200, GLES300) // #45 _extension(117,OES,standard_derivatives, GLES200, GLES300) // #45
_extension(118,GL,OES,vertex_array_object, GLES200, GLES300) // #71 _extension(118,OES,vertex_array_object, GLES200, GLES300) // #71
_extension(119,GL,OES,required_internalformat, GLES200, GLES300) // #115 _extension(119,OES,required_internalformat, GLES200, GLES300) // #115
_extension(120,GL,OES,surfaceless_context, GLES200, GLES300) // #116 _extension(120,OES,surfaceless_context, GLES200, GLES300) // #116
#endif #endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension(121,GL,OES,sample_shading, GLES300, GLES320) // #169 _extension(121,OES,sample_shading, GLES300, GLES320) // #169
_extension(122,GL,OES,sample_variables, GLES300, GLES320) // #170 _extension(122,OES,sample_variables, GLES300, GLES320) // #170
_extension(123,GL,OES,shader_image_atomic, GLES310, GLES320) // #171 _extension(123,OES,shader_image_atomic, GLES310, GLES320) // #171
_extension(124,GL,OES,shader_multisample_interpolation, GLES300, GLES320) // #172 _extension(124,OES,shader_multisample_interpolation, GLES300, GLES320) // #172
#endif #endif
_extension(125,GL,OES,texture_stencil8, GLES200, GLES320) // #173 _extension(125,OES,texture_stencil8, GLES200, GLES320) // #173
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_extension(126,GL,OES,texture_storage_multisample_2d_array, GLES310, GLES320) // #174 _extension(126,OES,texture_storage_multisample_2d_array, GLES310, GLES320) // #174
#endif #endif
} }
#endif #endif
}
#undef _extension #undef _extension
#endif #endif
@ -482,7 +478,7 @@ namespace ANDROID {
* @deprecated Use @ref GL::Extensions instead. * @deprecated Use @ref GL::Extensions instead.
*/ */
namespace CORRADE_DEPRECATED_NAMESPACE("use GL::Extensions instead") Extensions { namespace CORRADE_DEPRECATED_NAMESPACE("use GL::Extensions instead") Extensions {
namespace GL = Magnum::GL::Extensions::GL; namespace GL = Magnum::GL::Extensions;
} }
#endif #endif

6
src/Magnum/GL/Framebuffer.cpp

@ -75,11 +75,11 @@ const Framebuffer::InvalidationAttachment Framebuffer::InvalidationAttachment::S
Int Framebuffer::maxColorAttachments() { Int Framebuffer::maxColorAttachments() {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::draw_buffers>() && if(!Context::current().isExtensionSupported<Extensions::EXT::draw_buffers>() &&
!Context::current().isExtensionSupported<Extensions::GL::NV::fbo_color_attachments>()) !Context::current().isExtensionSupported<Extensions::NV::fbo_color_attachments>())
return 0; return 0;
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::WEBGL::draw_buffers>()) if(!Context::current().isExtensionSupported<Extensions::WEBGL::draw_buffers>())
return 0; return 0;
#endif #endif
#endif #endif

22
src/Magnum/GL/Implementation/BufferState.cpp

@ -90,8 +90,8 @@ BufferState::BufferState(Context& context, std::vector<std::string>& extensions)
{ {
/* Create implementation */ /* Create implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
extensions.emplace_back(Extensions::GL::ARB::direct_state_access::string()); extensions.emplace_back(Extensions::ARB::direct_state_access::string());
createImplementation = &Buffer::createImplementationDSA; createImplementation = &Buffer::createImplementationDSA;
} else } else
@ -101,8 +101,8 @@ BufferState::BufferState(Context& context, std::vector<std::string>& extensions)
} }
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
extensions.emplace_back(Extensions::GL::ARB::direct_state_access::string()); extensions.emplace_back(Extensions::ARB::direct_state_access::string());
copyImplementation = &Buffer::copyImplementationDSA; copyImplementation = &Buffer::copyImplementationDSA;
getParameterImplementation = &Buffer::getParameterImplementationDSA; getParameterImplementation = &Buffer::getParameterImplementationDSA;
@ -113,8 +113,8 @@ BufferState::BufferState(Context& context, std::vector<std::string>& extensions)
mapRangeImplementation = &Buffer::mapRangeImplementationDSA; mapRangeImplementation = &Buffer::mapRangeImplementationDSA;
flushMappedRangeImplementation = &Buffer::flushMappedRangeImplementationDSA; flushMappedRangeImplementation = &Buffer::flushMappedRangeImplementationDSA;
unmapImplementation = &Buffer::unmapImplementationDSA; unmapImplementation = &Buffer::unmapImplementationDSA;
} else if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) { } else if(context.isExtensionSupported<Extensions::EXT::direct_state_access>()) {
extensions.emplace_back(Extensions::GL::EXT::direct_state_access::string()); extensions.emplace_back(Extensions::EXT::direct_state_access::string());
copyImplementation = &Buffer::copyImplementationDSAEXT; copyImplementation = &Buffer::copyImplementationDSAEXT;
getParameterImplementation = &Buffer::getParameterImplementationDSAEXT; getParameterImplementation = &Buffer::getParameterImplementationDSAEXT;
@ -146,8 +146,8 @@ BufferState::BufferState(Context& context, std::vector<std::string>& extensions)
} }
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::invalidate_subdata>()) { if(context.isExtensionSupported<Extensions::ARB::invalidate_subdata>()) {
extensions.emplace_back(Extensions::GL::ARB::invalidate_subdata::string()); extensions.emplace_back(Extensions::ARB::invalidate_subdata::string());
invalidateImplementation = &Buffer::invalidateImplementationARB; invalidateImplementation = &Buffer::invalidateImplementationARB;
invalidateSubImplementation = &Buffer::invalidateSubImplementationARB; invalidateSubImplementation = &Buffer::invalidateSubImplementationARB;
@ -160,8 +160,8 @@ BufferState::BufferState(Context& context, std::vector<std::string>& extensions)
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::multi_bind>()) { if(context.isExtensionSupported<Extensions::ARB::multi_bind>()) {
extensions.emplace_back(Extensions::GL::ARB::multi_bind::string()); extensions.emplace_back(Extensions::ARB::multi_bind::string());
bindBasesImplementation = &Buffer::bindImplementationMulti; bindBasesImplementation = &Buffer::bindImplementationMulti;
bindRangesImplementation = &Buffer::bindImplementationMulti; bindRangesImplementation = &Buffer::bindImplementationMulti;
@ -174,7 +174,7 @@ BufferState::BufferState(Context& context, std::vector<std::string>& extensions)
#endif #endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>() && if(context.isExtensionSupported<Extensions::ARB::direct_state_access>() &&
(context.detectedDriver() & Context::DetectedDriver::Svga3D) && (context.detectedDriver() & Context::DetectedDriver::Svga3D) &&
!context.isDriverWorkaroundDisabled("svga3d-broken-dsa-bufferdata")) !context.isDriverWorkaroundDisabled("svga3d-broken-dsa-bufferdata"))
{ {

20
src/Magnum/GL/Implementation/DebugState.cpp

@ -40,13 +40,13 @@ DebugState::DebugState(Context& context, std::vector<std::string>& extensions):
{ {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::KHR::debug>()) if(context.isExtensionSupported<Extensions::KHR::debug>())
#else #else
if(context.isVersionSupported(Version::GLES320)) if(context.isVersionSupported(Version::GLES320))
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extensions.emplace_back(Extensions::GL::KHR::debug::string()); extensions.emplace_back(Extensions::KHR::debug::string());
#endif #endif
getLabelImplementation = &AbstractObject::getLabelImplementationKhrDesktopES32; getLabelImplementation = &AbstractObject::getLabelImplementationKhrDesktopES32;
@ -60,8 +60,8 @@ DebugState::DebugState(Context& context, std::vector<std::string>& extensions):
} else } else
#endif #endif
#ifdef MAGNUM_TARGET_GLES #ifdef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::KHR::debug>()) { if(context.isExtensionSupported<Extensions::KHR::debug>()) {
extensions.emplace_back(Extensions::GL::KHR::debug::string()); extensions.emplace_back(Extensions::KHR::debug::string());
getLabelImplementation = &AbstractObject::getLabelImplementationKhrES; getLabelImplementation = &AbstractObject::getLabelImplementationKhrES;
labelImplementation = &AbstractObject::labelImplementationKhrES; labelImplementation = &AbstractObject::labelImplementationKhrES;
@ -74,8 +74,8 @@ DebugState::DebugState(Context& context, std::vector<std::string>& extensions):
} else } else
#endif #endif
{ {
if(context.isExtensionSupported<Extensions::GL::EXT::debug_label>()) { if(context.isExtensionSupported<Extensions::EXT::debug_label>()) {
extensions.emplace_back(Extensions::GL::EXT::debug_label::string()); extensions.emplace_back(Extensions::EXT::debug_label::string());
getLabelImplementation = &AbstractObject::getLabelImplementationExt; getLabelImplementation = &AbstractObject::getLabelImplementationExt;
labelImplementation = &AbstractObject::labelImplementationExt; labelImplementation = &AbstractObject::labelImplementationExt;
@ -84,15 +84,15 @@ DebugState::DebugState(Context& context, std::vector<std::string>& extensions):
labelImplementation = &AbstractObject::labelImplementationNoOp; labelImplementation = &AbstractObject::labelImplementationNoOp;
} }
if(context.isExtensionSupported<Extensions::GL::EXT::debug_marker>()) { if(context.isExtensionSupported<Extensions::EXT::debug_marker>()) {
extensions.emplace_back(Extensions::GL::EXT::debug_marker::string()); extensions.emplace_back(Extensions::EXT::debug_marker::string());
pushGroupImplementation = &DebugGroup::pushImplementationExt; pushGroupImplementation = &DebugGroup::pushImplementationExt;
popGroupImplementation = &DebugGroup::popImplementationExt; popGroupImplementation = &DebugGroup::popImplementationExt;
messageInsertImplementation = &DebugMessage::insertImplementationExt; messageInsertImplementation = &DebugMessage::insertImplementationExt;
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
} else if(context.isExtensionSupported<Extensions::GL::GREMEDY::string_marker>()) { } else if(context.isExtensionSupported<Extensions::GREMEDY::string_marker>()) {
extensions.emplace_back(Extensions::GL::GREMEDY::string_marker::string()); extensions.emplace_back(Extensions::GREMEDY::string_marker::string());
pushGroupImplementation = &DebugGroup::pushImplementationNoOp; pushGroupImplementation = &DebugGroup::pushImplementationNoOp;
popGroupImplementation = &DebugGroup::popImplementationNoOp; popGroupImplementation = &DebugGroup::popImplementationNoOp;

80
src/Magnum/GL/Implementation/FramebufferState.cpp

@ -46,8 +46,8 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
{ {
/* Create implementation */ /* Create implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
extensions.emplace_back(Extensions::GL::ARB::direct_state_access::string()); extensions.emplace_back(Extensions::ARB::direct_state_access::string());
createImplementation = &Framebuffer::createImplementationDSA; createImplementation = &Framebuffer::createImplementationDSA;
createRenderbufferImplementation = &Renderbuffer::createImplementationDSA; createRenderbufferImplementation = &Renderbuffer::createImplementationDSA;
@ -60,7 +60,7 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
/* DSA/non-DSA implementation */ /* DSA/non-DSA implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
/* Extension added above */ /* Extension added above */
checkStatusImplementation = &AbstractFramebuffer::checkStatusImplementationDSA; checkStatusImplementation = &AbstractFramebuffer::checkStatusImplementationDSA;
@ -91,8 +91,8 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
renderbufferStorageImplementation = &Renderbuffer::storageImplementationDSA; renderbufferStorageImplementation = &Renderbuffer::storageImplementationDSA;
} else if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) { } else if(context.isExtensionSupported<Extensions::EXT::direct_state_access>()) {
extensions.emplace_back(Extensions::GL::EXT::direct_state_access::string()); extensions.emplace_back(Extensions::EXT::direct_state_access::string());
checkStatusImplementation = &AbstractFramebuffer::checkStatusImplementationDSAEXT; checkStatusImplementation = &AbstractFramebuffer::checkStatusImplementationDSAEXT;
@ -172,7 +172,7 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2) #if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2)
if(context.isVersionSupported(Version::GLES320)) if(context.isVersionSupported(Version::GLES320))
textureImplementation = &Framebuffer::textureImplementationDefault; textureImplementation = &Framebuffer::textureImplementationDefault;
else if(context.isExtensionSupported<Extensions::GL::EXT::geometry_shader>()) else if(context.isExtensionSupported<Extensions::EXT::geometry_shader>())
textureImplementation = &Framebuffer::textureImplementationEXT; textureImplementation = &Framebuffer::textureImplementationEXT;
else else
textureImplementation = nullptr; textureImplementation = nullptr;
@ -187,21 +187,21 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
bindInternalImplementation = &Framebuffer::bindImplementationDefault; bindInternalImplementation = &Framebuffer::bindImplementationDefault;
checkStatusImplementation = &Framebuffer::checkStatusImplementationDefault; checkStatusImplementation = &Framebuffer::checkStatusImplementationDefault;
if(context.isExtensionSupported<Extensions::GL::ANGLE::framebuffer_blit>()) { if(context.isExtensionSupported<Extensions::ANGLE::framebuffer_blit>()) {
extensions.push_back(Extensions::GL::ANGLE::framebuffer_blit::string()); extensions.push_back(Extensions::ANGLE::framebuffer_blit::string());
} else if(context.isExtensionSupported<Extensions::GL::APPLE::framebuffer_multisample>()) { } else if(context.isExtensionSupported<Extensions::APPLE::framebuffer_multisample>()) {
extensions.push_back(Extensions::GL::APPLE::framebuffer_multisample::string()); extensions.push_back(Extensions::APPLE::framebuffer_multisample::string());
} else if(context.isExtensionSupported<Extensions::GL::NV::framebuffer_blit>()) { } else if(context.isExtensionSupported<Extensions::NV::framebuffer_blit>()) {
extensions.push_back(Extensions::GL::NV::framebuffer_blit::string()); extensions.push_back(Extensions::NV::framebuffer_blit::string());
/* NV_framebuffer_multisample requires NV_framebuffer_blit, which has these /* NV_framebuffer_multisample requires NV_framebuffer_blit, which has these
enums. However, on my system only NV_framebuffer_multisample is enums. However, on my system only NV_framebuffer_multisample is
supported, but NV_framebuffer_blit isn't. I will hold my breath and supported, but NV_framebuffer_blit isn't. I will hold my breath and
assume these enums are available. */ assume these enums are available. */
} else if(context.isExtensionSupported<Extensions::GL::NV::framebuffer_multisample>()) { } else if(context.isExtensionSupported<Extensions::NV::framebuffer_multisample>()) {
extensions.push_back(Extensions::GL::NV::framebuffer_multisample::string()); extensions.push_back(Extensions::NV::framebuffer_multisample::string());
/* If no such extension is available, reset back to single target */ /* If no such extension is available, reset back to single target */
} else { } else {
@ -215,18 +215,18 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
/* Framebuffer draw mapping on ES2 */ /* Framebuffer draw mapping on ES2 */
if(context.isExtensionSupported<Extensions::GL::EXT::draw_buffers>()) { if(context.isExtensionSupported<Extensions::EXT::draw_buffers>()) {
extensions.push_back(Extensions::GL::EXT::draw_buffers::string()); extensions.push_back(Extensions::EXT::draw_buffers::string());
drawBuffersImplementation = &AbstractFramebuffer::drawBuffersImplementationEXT; drawBuffersImplementation = &AbstractFramebuffer::drawBuffersImplementationEXT;
} else if(context.isExtensionSupported<Extensions::GL::NV::draw_buffers>()) { } else if(context.isExtensionSupported<Extensions::NV::draw_buffers>()) {
extensions.push_back(Extensions::GL::NV::draw_buffers::string()); extensions.push_back(Extensions::NV::draw_buffers::string());
drawBuffersImplementation = &AbstractFramebuffer::drawBuffersImplementationNV; drawBuffersImplementation = &AbstractFramebuffer::drawBuffersImplementationNV;
} else drawBuffersImplementation = nullptr; } else drawBuffersImplementation = nullptr;
#else #else
if(context.isExtensionSupported<Extensions::GL::WEBGL::draw_buffers>()) { if(context.isExtensionSupported<Extensions::WEBGL::draw_buffers>()) {
extensions.push_back(Extensions::GL::WEBGL::draw_buffers::string()); extensions.push_back(Extensions::WEBGL::draw_buffers::string());
/* The EXT implementation is exposed in Emscripten */ /* The EXT implementation is exposed in Emscripten */
drawBuffersImplementation = &AbstractFramebuffer::drawBuffersImplementationEXT; drawBuffersImplementation = &AbstractFramebuffer::drawBuffersImplementationEXT;
} else drawBuffersImplementation = nullptr; } else drawBuffersImplementation = nullptr;
@ -236,15 +236,15 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
/* Framebuffer reading implementation in desktop/ES */ /* Framebuffer reading implementation in desktop/ES */
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::robustness>()) if(context.isExtensionSupported<Extensions::ARB::robustness>())
#else #else
if(context.isExtensionSupported<Extensions::GL::EXT::robustness>()) if(context.isExtensionSupported<Extensions::EXT::robustness>())
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extensions.emplace_back(Extensions::GL::ARB::robustness::string()); extensions.emplace_back(Extensions::ARB::robustness::string());
#else #else
extensions.push_back(Extensions::GL::EXT::robustness::string()); extensions.push_back(Extensions::EXT::robustness::string());
#endif #endif
readImplementation = &AbstractFramebuffer::readImplementationRobustness; readImplementation = &AbstractFramebuffer::readImplementationRobustness;
@ -257,12 +257,12 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
/* Multisample renderbuffer storage implementation */ /* Multisample renderbuffer storage implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
/* Extension added above */ /* Extension added above */
renderbufferStorageMultisampleImplementation = &Renderbuffer::storageMultisampleImplementationDSA; renderbufferStorageMultisampleImplementation = &Renderbuffer::storageMultisampleImplementationDSA;
} else if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) { } else if(context.isExtensionSupported<Extensions::EXT::direct_state_access>()) {
/* Extension added above */ /* Extension added above */
renderbufferStorageMultisampleImplementation = &Renderbuffer::storageMultisampleImplementationDSAEXT; renderbufferStorageMultisampleImplementation = &Renderbuffer::storageMultisampleImplementationDSAEXT;
@ -270,12 +270,12 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
#endif #endif
{ {
#if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
if(context.isExtensionSupported<Extensions::GL::ANGLE::framebuffer_multisample>()) { if(context.isExtensionSupported<Extensions::ANGLE::framebuffer_multisample>()) {
extensions.push_back(Extensions::GL::ANGLE::framebuffer_multisample::string()); extensions.push_back(Extensions::ANGLE::framebuffer_multisample::string());
renderbufferStorageMultisampleImplementation = &Renderbuffer::storageMultisampleImplementationANGLE; renderbufferStorageMultisampleImplementation = &Renderbuffer::storageMultisampleImplementationANGLE;
} else if (context.isExtensionSupported<Extensions::GL::NV::framebuffer_multisample>()) { } else if (context.isExtensionSupported<Extensions::NV::framebuffer_multisample>()) {
extensions.push_back(Extensions::GL::NV::framebuffer_multisample::string()); extensions.push_back(Extensions::NV::framebuffer_multisample::string());
renderbufferStorageMultisampleImplementation = &Renderbuffer::storageMultisampleImplementationNV; renderbufferStorageMultisampleImplementation = &Renderbuffer::storageMultisampleImplementationNV;
} else renderbufferStorageMultisampleImplementation = nullptr; } else renderbufferStorageMultisampleImplementation = nullptr;
@ -286,10 +286,10 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
/* Framebuffer invalidation implementation on desktop GL */ /* Framebuffer invalidation implementation on desktop GL */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::invalidate_subdata>()) { if(context.isExtensionSupported<Extensions::ARB::invalidate_subdata>()) {
extensions.emplace_back(Extensions::GL::ARB::invalidate_subdata::string()); extensions.emplace_back(Extensions::ARB::invalidate_subdata::string());
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
/* Extension added above */ /* Extension added above */
invalidateImplementation = &AbstractFramebuffer::invalidateImplementationDSA; invalidateImplementation = &AbstractFramebuffer::invalidateImplementationDSA;
invalidateSubImplementation = &AbstractFramebuffer::invalidateImplementationDSA; invalidateSubImplementation = &AbstractFramebuffer::invalidateImplementationDSA;
@ -305,8 +305,8 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
/* Framebuffer invalidation implementation on ES2 */ /* Framebuffer invalidation implementation on ES2 */
#elif defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #elif defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
if(context.isExtensionSupported<Extensions::GL::EXT::discard_framebuffer>()) { if(context.isExtensionSupported<Extensions::EXT::discard_framebuffer>()) {
extensions.push_back(Extensions::GL::EXT::discard_framebuffer::string()); extensions.push_back(Extensions::EXT::discard_framebuffer::string());
invalidateImplementation = &AbstractFramebuffer::invalidateImplementationDefault; invalidateImplementation = &AbstractFramebuffer::invalidateImplementationDefault;
} else { } else {
@ -321,7 +321,7 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
/* Blit implementation on desktop GL */ /* Blit implementation on desktop GL */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
/* Extension added above */ /* Extension added above */
blitImplementation = &AbstractFramebuffer::blitImplementationDSA; blitImplementation = &AbstractFramebuffer::blitImplementationDSA;
@ -329,12 +329,12 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
/* Blit implementation on ES2 */ /* Blit implementation on ES2 */
#elif defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #elif defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
if(context.isExtensionSupported<Extensions::GL::ANGLE::framebuffer_blit>()) { if(context.isExtensionSupported<Extensions::ANGLE::framebuffer_blit>()) {
extensions.push_back(Extensions::GL::ANGLE::framebuffer_blit::string()); extensions.push_back(Extensions::ANGLE::framebuffer_blit::string());
blitImplementation = &AbstractFramebuffer::blitImplementationANGLE; blitImplementation = &AbstractFramebuffer::blitImplementationANGLE;
} else if(context.isExtensionSupported<Extensions::GL::NV::framebuffer_blit>()) { } else if(context.isExtensionSupported<Extensions::NV::framebuffer_blit>()) {
extensions.push_back(Extensions::GL::NV::framebuffer_blit::string()); extensions.push_back(Extensions::NV::framebuffer_blit::string());
blitImplementation = &AbstractFramebuffer::blitImplementationNV; blitImplementation = &AbstractFramebuffer::blitImplementationNV;
} else blitImplementation = nullptr; } else blitImplementation = nullptr;

46
src/Magnum/GL/Implementation/MeshState.cpp

@ -39,26 +39,26 @@ MeshState::MeshState(Context& context, ContextState& contextState, std::vector<s
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::vertex_array_object>()) if(context.isExtensionSupported<Extensions::ARB::vertex_array_object>())
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
if(context.isExtensionSupported<Extensions::GL::OES::vertex_array_object>()) if(context.isExtensionSupported<Extensions::OES::vertex_array_object>())
#else #else
static_cast<void>(context); static_cast<void>(context);
static_cast<void>(extensions); static_cast<void>(extensions);
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extensions.emplace_back(Extensions::GL::ARB::vertex_array_object::string()); extensions.emplace_back(Extensions::ARB::vertex_array_object::string());
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
extensions.push_back(Extensions::GL::OES::vertex_array_object::string()); extensions.push_back(Extensions::OES::vertex_array_object::string());
#endif #endif
createImplementation = &Mesh::createImplementationVAO; createImplementation = &Mesh::createImplementationVAO;
destroyImplementation = &Mesh::destroyImplementationVAO; destroyImplementation = &Mesh::destroyImplementationVAO;
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) { if(context.isExtensionSupported<Extensions::EXT::direct_state_access>()) {
extensions.emplace_back(Extensions::GL::EXT::direct_state_access::string()); extensions.emplace_back(Extensions::EXT::direct_state_access::string());
attributePointerImplementation = &Mesh::attributePointerImplementationDSAEXT; attributePointerImplementation = &Mesh::attributePointerImplementationDSAEXT;
} else } else
@ -86,8 +86,8 @@ MeshState::MeshState(Context& context, ContextState& contextState, std::vector<s
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/* DSA create implementation (other cases handled above) */ /* DSA create implementation (other cases handled above) */
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
extensions.emplace_back(Extensions::GL::ARB::direct_state_access::string()); extensions.emplace_back(Extensions::ARB::direct_state_access::string());
createImplementation = &Mesh::createImplementationVAODSA; createImplementation = &Mesh::createImplementationVAODSA;
} }
#endif #endif
@ -95,8 +95,8 @@ MeshState::MeshState(Context& context, ContextState& contextState, std::vector<s
#ifdef MAGNUM_TARGET_GLES #ifdef MAGNUM_TARGET_GLES
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
/* Multi draw implementation on ES */ /* Multi draw implementation on ES */
if(context.isExtensionSupported<Extensions::GL::EXT::multi_draw_arrays>()) { if(context.isExtensionSupported<Extensions::EXT::multi_draw_arrays>()) {
extensions.push_back(Extensions::GL::EXT::multi_draw_arrays::string()); extensions.push_back(Extensions::EXT::multi_draw_arrays::string());
multiDrawImplementation = &MeshView::multiDrawImplementationDefault; multiDrawImplementation = &MeshView::multiDrawImplementationDefault;
} else multiDrawImplementation = &MeshView::multiDrawImplementationFallback; } else multiDrawImplementation = &MeshView::multiDrawImplementationFallback;
@ -107,21 +107,21 @@ MeshState::MeshState(Context& context, ContextState& contextState, std::vector<s
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
/* Instanced draw ímplementation on ES2 */ /* Instanced draw ímplementation on ES2 */
if(context.isExtensionSupported<Extensions::GL::ANGLE::instanced_arrays>()) { if(context.isExtensionSupported<Extensions::ANGLE::instanced_arrays>()) {
extensions.push_back(Extensions::GL::ANGLE::instanced_arrays::string()); extensions.push_back(Extensions::ANGLE::instanced_arrays::string());
drawArraysInstancedImplementation = &Mesh::drawArraysInstancedImplementationANGLE; drawArraysInstancedImplementation = &Mesh::drawArraysInstancedImplementationANGLE;
drawElementsInstancedImplementation = &Mesh::drawElementsInstancedImplementationANGLE; drawElementsInstancedImplementation = &Mesh::drawElementsInstancedImplementationANGLE;
} }
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
else if(context.isExtensionSupported<Extensions::GL::EXT::draw_instanced>()) { else if(context.isExtensionSupported<Extensions::EXT::draw_instanced>()) {
extensions.push_back(Extensions::GL::EXT::draw_instanced::string()); extensions.push_back(Extensions::EXT::draw_instanced::string());
drawArraysInstancedImplementation = &Mesh::drawArraysInstancedImplementationEXT; drawArraysInstancedImplementation = &Mesh::drawArraysInstancedImplementationEXT;
drawElementsInstancedImplementation = &Mesh::drawElementsInstancedImplementationEXT; drawElementsInstancedImplementation = &Mesh::drawElementsInstancedImplementationEXT;
} else if(context.isExtensionSupported<Extensions::GL::NV::draw_instanced>()) { } else if(context.isExtensionSupported<Extensions::NV::draw_instanced>()) {
extensions.push_back(Extensions::GL::NV::draw_instanced::string()); extensions.push_back(Extensions::NV::draw_instanced::string());
drawArraysInstancedImplementation = &Mesh::drawArraysInstancedImplementationNV; drawArraysInstancedImplementation = &Mesh::drawArraysInstancedImplementationNV;
drawElementsInstancedImplementation = &Mesh::drawElementsInstancedImplementationNV; drawElementsInstancedImplementation = &Mesh::drawElementsInstancedImplementationNV;
@ -135,26 +135,26 @@ MeshState::MeshState(Context& context, ContextState& contextState, std::vector<s
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/* Partial EXT_DSA implementation of vertex attrib divisor */ /* Partial EXT_DSA implementation of vertex attrib divisor */
if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) { if(context.isExtensionSupported<Extensions::EXT::direct_state_access>()) {
if(glVertexArrayVertexAttribDivisorEXT) if(glVertexArrayVertexAttribDivisorEXT)
vertexAttribDivisorImplementation = &Mesh::vertexAttribDivisorImplementationDSAEXT; vertexAttribDivisorImplementation = &Mesh::vertexAttribDivisorImplementationDSAEXT;
else vertexAttribDivisorImplementation = &Mesh::vertexAttribDivisorImplementationVAO; else vertexAttribDivisorImplementation = &Mesh::vertexAttribDivisorImplementationVAO;
} else vertexAttribDivisorImplementation = nullptr; } else vertexAttribDivisorImplementation = nullptr;
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
/* Instanced arrays implementation on ES2 */ /* Instanced arrays implementation on ES2 */
if(context.isExtensionSupported<Extensions::GL::ANGLE::instanced_arrays>()) { if(context.isExtensionSupported<Extensions::ANGLE::instanced_arrays>()) {
/* Extension added above */ /* Extension added above */
vertexAttribDivisorImplementation = &Mesh::vertexAttribDivisorImplementationANGLE; vertexAttribDivisorImplementation = &Mesh::vertexAttribDivisorImplementationANGLE;
} }
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
else if(context.isExtensionSupported<Extensions::GL::EXT::instanced_arrays>()) { else if(context.isExtensionSupported<Extensions::EXT::instanced_arrays>()) {
extensions.push_back(Extensions::GL::EXT::instanced_arrays::string()); extensions.push_back(Extensions::EXT::instanced_arrays::string());
vertexAttribDivisorImplementation = &Mesh::vertexAttribDivisorImplementationEXT; vertexAttribDivisorImplementation = &Mesh::vertexAttribDivisorImplementationEXT;
} else if(context.isExtensionSupported<Extensions::GL::NV::instanced_arrays>()) { } else if(context.isExtensionSupported<Extensions::NV::instanced_arrays>()) {
extensions.push_back(Extensions::GL::NV::instanced_arrays::string()); extensions.push_back(Extensions::NV::instanced_arrays::string());
vertexAttribDivisorImplementation = &Mesh::vertexAttribDivisorImplementationNV; vertexAttribDivisorImplementation = &Mesh::vertexAttribDivisorImplementationNV;
} }
@ -165,7 +165,7 @@ MeshState::MeshState(Context& context, ContextState& contextState, std::vector<s
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/* If we are on core profile and ARB_VAO was explicitly disabled by the /* If we are on core profile and ARB_VAO was explicitly disabled by the
user, we need to bind a default VAO so we are still able to draw things */ user, we need to bind a default VAO so we are still able to draw things */
if(context.isExtensionDisabled<Extensions::GL::ARB::vertex_array_object>() && context.isCoreProfileInternal(contextState)) { if(context.isExtensionDisabled<Extensions::ARB::vertex_array_object>() && context.isCoreProfileInternal(contextState)) {
glGenVertexArrays(1, &defaultVAO); glGenVertexArrays(1, &defaultVAO);
glBindVertexArray(defaultVAO); glBindVertexArray(defaultVAO);
} }

4
src/Magnum/GL/Implementation/QueryState.cpp

@ -34,8 +34,8 @@ namespace Magnum { namespace GL { namespace Implementation {
QueryState::QueryState(Context& context, std::vector<std::string>& extensions) { QueryState::QueryState(Context& context, std::vector<std::string>& extensions) {
/* Create implementation */ /* Create implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
extensions.emplace_back(Extensions::GL::ARB::direct_state_access::string()); extensions.emplace_back(Extensions::ARB::direct_state_access::string());
createImplementation = &AbstractQuery::createImplementationDSA; createImplementation = &AbstractQuery::createImplementationDSA;
} else } else

16
src/Magnum/GL/Implementation/RendererState.cpp

@ -38,11 +38,11 @@ RendererState::RendererState(Context& context, std::vector<std::string>& extensi
{ {
/* Float depth clear value implementation */ /* Float depth clear value implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::ES2_compatibility>()) if(context.isExtensionSupported<Extensions::ARB::ES2_compatibility>())
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extensions.emplace_back(Extensions::GL::ARB::ES2_compatibility::string()); extensions.emplace_back(Extensions::ARB::ES2_compatibility::string());
#endif #endif
clearDepthfImplementation = &Renderer::clearDepthfImplementationES; clearDepthfImplementation = &Renderer::clearDepthfImplementationES;
@ -54,15 +54,15 @@ RendererState::RendererState(Context& context, std::vector<std::string>& extensi
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
/* Graphics reset status implementation */ /* Graphics reset status implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::robustness>()) if(context.isExtensionSupported<Extensions::ARB::robustness>())
#else #else
if(context.isExtensionSupported<Extensions::GL::EXT::robustness>()) if(context.isExtensionSupported<Extensions::EXT::robustness>())
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extensions.emplace_back(Extensions::GL::ARB::robustness::string()); extensions.emplace_back(Extensions::ARB::robustness::string());
#else #else
extensions.push_back(Extensions::GL::EXT::robustness::string()); extensions.push_back(Extensions::EXT::robustness::string());
#endif #endif
graphicsResetStatusImplementation = &Renderer::graphicsResetStatusImplementationRobustness; graphicsResetStatusImplementation = &Renderer::graphicsResetStatusImplementationRobustness;
@ -78,9 +78,9 @@ RendererState::RendererState(Context& context, std::vector<std::string>& extensi
unpackPixelStorage.disengagedRowLength = PixelStorage::DisengagedValue; unpackPixelStorage.disengagedRowLength = PixelStorage::DisengagedValue;
packPixelStorage.disengagedRowLength = PixelStorage::DisengagedValue; packPixelStorage.disengagedRowLength = PixelStorage::DisengagedValue;
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
if(!context.isExtensionSupported<Extensions::GL::EXT::unpack_subimage>()) if(!context.isExtensionSupported<Extensions::EXT::unpack_subimage>())
unpackPixelStorage.disengagedRowLength = 0; unpackPixelStorage.disengagedRowLength = 0;
if(!context.isExtensionSupported<Extensions::GL::NV::pack_subimage>()) if(!context.isExtensionSupported<Extensions::NV::pack_subimage>())
packPixelStorage.disengagedRowLength = 0; packPixelStorage.disengagedRowLength = 0;
#endif #endif
#endif #endif

12
src/Magnum/GL/Implementation/ShaderProgramState.cpp

@ -62,13 +62,13 @@ ShaderProgramState::ShaderProgramState(Context& context, std::vector<std::string
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::separate_shader_objects>()) if(context.isExtensionSupported<Extensions::ARB::separate_shader_objects>())
#else #else
if(context.isVersionSupported(Version::GLES310)) if(context.isVersionSupported(Version::GLES310))
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extensions.emplace_back(Extensions::GL::ARB::separate_shader_objects::string()); extensions.emplace_back(Extensions::ARB::separate_shader_objects::string());
#endif #endif
uniform1fvImplementation = &AbstractShaderProgram::uniformImplementationSSO; uniform1fvImplementation = &AbstractShaderProgram::uniformImplementationSSO;
@ -115,15 +115,15 @@ ShaderProgramState::ShaderProgramState(Context& context, std::vector<std::string
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) if(context.isExtensionSupported<Extensions::EXT::direct_state_access>())
#else #else
if(context.isExtensionSupported<Extensions::GL::EXT::separate_shader_objects>()) if(context.isExtensionSupported<Extensions::EXT::separate_shader_objects>())
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extensions.emplace_back(Extensions::GL::EXT::direct_state_access::string()); extensions.emplace_back(Extensions::EXT::direct_state_access::string());
#else #else
extensions.push_back(Extensions::GL::EXT::separate_shader_objects::string()); extensions.push_back(Extensions::EXT::separate_shader_objects::string());
#endif #endif
uniform1fvImplementation = &AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT; uniform1fvImplementation = &AbstractShaderProgram::uniformImplementationDSAEXT_SSOEXT;

90
src/Magnum/GL/Implementation/TextureState.cpp

@ -64,8 +64,8 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
{ {
/* Create implementation */ /* Create implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
extensions.emplace_back(Extensions::GL::ARB::direct_state_access::string()); extensions.emplace_back(Extensions::ARB::direct_state_access::string());
createImplementation = &AbstractTexture::createImplementationDSA; createImplementation = &AbstractTexture::createImplementationDSA;
} else } else
@ -76,18 +76,18 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
/* Single bind implementation */ /* Single bind implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
/* Extension name added below */ /* Extension name added below */
unbindImplementation = &AbstractTexture::unbindImplementationDSA; unbindImplementation = &AbstractTexture::unbindImplementationDSA;
bindImplementation = &AbstractTexture::bindImplementationDSA; bindImplementation = &AbstractTexture::bindImplementationDSA;
} else if(context.isExtensionSupported<Extensions::GL::ARB::multi_bind>()) { } else if(context.isExtensionSupported<Extensions::ARB::multi_bind>()) {
/* Extension name added below */ /* Extension name added below */
unbindImplementation = &AbstractTexture::unbindImplementationMulti; unbindImplementation = &AbstractTexture::unbindImplementationMulti;
bindImplementation = &AbstractTexture::bindImplementationMulti; bindImplementation = &AbstractTexture::bindImplementationMulti;
} else if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) { } else if(context.isExtensionSupported<Extensions::EXT::direct_state_access>()) {
/* Extension name added below */ /* Extension name added below */
unbindImplementation = &AbstractTexture::unbindImplementationDSAEXT; unbindImplementation = &AbstractTexture::unbindImplementationDSAEXT;
@ -102,8 +102,8 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
/* Multi bind implementation */ /* Multi bind implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::multi_bind>()) { if(context.isExtensionSupported<Extensions::ARB::multi_bind>()) {
extensions.emplace_back(Extensions::GL::ARB::multi_bind::string()); extensions.emplace_back(Extensions::ARB::multi_bind::string());
bindMultiImplementation = &AbstractTexture::bindImplementationMulti; bindMultiImplementation = &AbstractTexture::bindImplementationMulti;
@ -115,8 +115,8 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
/* DSA/non-DSA implementation */ /* DSA/non-DSA implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
extensions.emplace_back(Extensions::GL::ARB::direct_state_access::string()); extensions.emplace_back(Extensions::ARB::direct_state_access::string());
parameteriImplementation = &AbstractTexture::parameterImplementationDSA; parameteriImplementation = &AbstractTexture::parameterImplementationDSA;
parameterfImplementation = &AbstractTexture::parameterImplementationDSA; parameterfImplementation = &AbstractTexture::parameterImplementationDSA;
@ -140,8 +140,8 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
cubeSubImageImplementation = &CubeMapTexture::subImageImplementationDSA; cubeSubImageImplementation = &CubeMapTexture::subImageImplementationDSA;
cubeCompressedSubImageImplementation = &CubeMapTexture::compressedSubImageImplementationDSA; cubeCompressedSubImageImplementation = &CubeMapTexture::compressedSubImageImplementationDSA;
} else if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) { } else if(context.isExtensionSupported<Extensions::EXT::direct_state_access>()) {
extensions.emplace_back(Extensions::GL::EXT::direct_state_access::string()); extensions.emplace_back(Extensions::EXT::direct_state_access::string());
parameteriImplementation = &AbstractTexture::parameterImplementationDSAEXT; parameteriImplementation = &AbstractTexture::parameterImplementationDSAEXT;
parameterfImplementation = &AbstractTexture::parameterImplementationDSAEXT; parameterfImplementation = &AbstractTexture::parameterImplementationDSAEXT;
@ -210,7 +210,7 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
if(context.isVersionSupported(Version::GLES320)) { if(context.isVersionSupported(Version::GLES320)) {
parameterIuivImplementation = &AbstractTexture::parameterIImplementationDefault; parameterIuivImplementation = &AbstractTexture::parameterIImplementationDefault;
parameterIivImplementation = &AbstractTexture::parameterIImplementationDefault; parameterIivImplementation = &AbstractTexture::parameterIImplementationDefault;
} else if(context.isExtensionSupported<Extensions::GL::EXT::texture_border_clamp>()) { } else if(context.isExtensionSupported<Extensions::EXT::texture_border_clamp>()) {
parameterIuivImplementation = &AbstractTexture::parameterIImplementationEXT; parameterIuivImplementation = &AbstractTexture::parameterIImplementationEXT;
parameterIivImplementation = &AbstractTexture::parameterIImplementationEXT; parameterIivImplementation = &AbstractTexture::parameterIImplementationEXT;
} else { } else {
@ -222,7 +222,7 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
if(context.isVersionSupported(Version::GLES320)) { if(context.isVersionSupported(Version::GLES320)) {
setBufferImplementation = &BufferTexture::setBufferImplementationDefault; setBufferImplementation = &BufferTexture::setBufferImplementationDefault;
setBufferRangeImplementation = &BufferTexture::setBufferRangeImplementationDefault; setBufferRangeImplementation = &BufferTexture::setBufferRangeImplementationDefault;
} else if(context.isExtensionSupported<Extensions::GL::EXT::texture_buffer>()) { } else if(context.isExtensionSupported<Extensions::EXT::texture_buffer>()) {
setBufferImplementation = &BufferTexture::setBufferImplementationEXT; setBufferImplementation = &BufferTexture::setBufferImplementationEXT;
setBufferRangeImplementation = &BufferTexture::setBufferRangeImplementationEXT; setBufferRangeImplementation = &BufferTexture::setBufferRangeImplementationEXT;
} else { } else {
@ -233,8 +233,8 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
/* Data invalidation implementation */ /* Data invalidation implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::invalidate_subdata>()) { if(context.isExtensionSupported<Extensions::ARB::invalidate_subdata>()) {
extensions.emplace_back(Extensions::GL::ARB::invalidate_subdata::string()); extensions.emplace_back(Extensions::ARB::invalidate_subdata::string());
invalidateImageImplementation = &AbstractTexture::invalidateImageImplementationARB; invalidateImageImplementation = &AbstractTexture::invalidateImageImplementationARB;
invalidateSubImageImplementation = &AbstractTexture::invalidateSubImageImplementationARB; invalidateSubImageImplementation = &AbstractTexture::invalidateSubImageImplementationARB;
@ -250,31 +250,31 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
above) */ above) */
if((context.detectedDriver() & Context::DetectedDriver::NVidia) && if((context.detectedDriver() & Context::DetectedDriver::NVidia) &&
!context.isDriverWorkaroundDisabled("nv-cubemap-inconsistent-compressed-image-size")) { !context.isDriverWorkaroundDisabled("nv-cubemap-inconsistent-compressed-image-size")) {
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) if(context.isExtensionSupported<Extensions::ARB::direct_state_access>())
getCubeLevelCompressedImageSizeImplementation = &CubeMapTexture::getLevelCompressedImageSizeImplementationDSANonImmutableWorkaround; getCubeLevelCompressedImageSizeImplementation = &CubeMapTexture::getLevelCompressedImageSizeImplementationDSANonImmutableWorkaround;
else if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) else if(context.isExtensionSupported<Extensions::EXT::direct_state_access>())
getCubeLevelCompressedImageSizeImplementation = &CubeMapTexture::getLevelCompressedImageSizeImplementationDSAEXTImmutableWorkaround; getCubeLevelCompressedImageSizeImplementation = &CubeMapTexture::getLevelCompressedImageSizeImplementationDSAEXTImmutableWorkaround;
else getCubeLevelCompressedImageSizeImplementation = &CubeMapTexture::getLevelCompressedImageSizeImplementationDefaultImmutableWorkaround; else getCubeLevelCompressedImageSizeImplementation = &CubeMapTexture::getLevelCompressedImageSizeImplementationDefaultImmutableWorkaround;
} else { } else {
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) if(context.isExtensionSupported<Extensions::ARB::direct_state_access>())
getCubeLevelCompressedImageSizeImplementation = &CubeMapTexture::getLevelCompressedImageSizeImplementationDSA; getCubeLevelCompressedImageSizeImplementation = &CubeMapTexture::getLevelCompressedImageSizeImplementationDSA;
else if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) else if(context.isExtensionSupported<Extensions::EXT::direct_state_access>())
getCubeLevelCompressedImageSizeImplementation = &CubeMapTexture::getLevelCompressedImageSizeImplementationDSAEXT; getCubeLevelCompressedImageSizeImplementation = &CubeMapTexture::getLevelCompressedImageSizeImplementationDSAEXT;
else getCubeLevelCompressedImageSizeImplementation = &CubeMapTexture::getLevelCompressedImageSizeImplementationDefault; else getCubeLevelCompressedImageSizeImplementation = &CubeMapTexture::getLevelCompressedImageSizeImplementationDefault;
} }
/* Image retrieval implementation */ /* Image retrieval implementation */
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
/* Extension name added above */ /* Extension name added above */
getImageImplementation = &AbstractTexture::getImageImplementationDSA; getImageImplementation = &AbstractTexture::getImageImplementationDSA;
getCompressedImageImplementation = &AbstractTexture::getCompressedImageImplementationDSA; getCompressedImageImplementation = &AbstractTexture::getCompressedImageImplementationDSA;
} else if(context.isExtensionSupported<Extensions::GL::ARB::robustness>()) { } else if(context.isExtensionSupported<Extensions::ARB::robustness>()) {
extensions.emplace_back(Extensions::GL::ARB::robustness::string()); extensions.emplace_back(Extensions::ARB::robustness::string());
getImageImplementation = &AbstractTexture::getImageImplementationRobustness; getImageImplementation = &AbstractTexture::getImageImplementationRobustness;
getCompressedImageImplementation = &AbstractTexture::getCompressedImageImplementationRobustness; getCompressedImageImplementation = &AbstractTexture::getCompressedImageImplementationRobustness;
} else if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) { } else if(context.isExtensionSupported<Extensions::EXT::direct_state_access>()) {
/* Extension name added above */ /* Extension name added above */
getImageImplementation = &AbstractTexture::getImageImplementationDSAEXT; getImageImplementation = &AbstractTexture::getImageImplementationDSAEXT;
getCompressedImageImplementation = &AbstractTexture::getCompressedImageImplementationDSAEXT; getCompressedImageImplementation = &AbstractTexture::getCompressedImageImplementationDSAEXT;
@ -285,17 +285,17 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
} }
/* Image retrieval implementation for cube map */ /* Image retrieval implementation for cube map */
if(context.isExtensionSupported<Extensions::GL::ARB::get_texture_sub_image>()) { if(context.isExtensionSupported<Extensions::ARB::get_texture_sub_image>()) {
extensions.emplace_back(Extensions::GL::ARB::get_texture_sub_image::string()); extensions.emplace_back(Extensions::ARB::get_texture_sub_image::string());
getCubeImageImplementation = &CubeMapTexture::getImageImplementationDSA; getCubeImageImplementation = &CubeMapTexture::getImageImplementationDSA;
getCompressedCubeImageImplementation = &CubeMapTexture::getCompressedImageImplementationDSA; getCompressedCubeImageImplementation = &CubeMapTexture::getCompressedImageImplementationDSA;
} else if(context.isExtensionSupported<Extensions::GL::ARB::robustness>()) { } else if(context.isExtensionSupported<Extensions::ARB::robustness>()) {
/* Extension name added above */ /* Extension name added above */
getCubeImageImplementation = &CubeMapTexture::getImageImplementationRobustness; getCubeImageImplementation = &CubeMapTexture::getImageImplementationRobustness;
getCompressedCubeImageImplementation = &CubeMapTexture::getCompressedImageImplementationRobustness; getCompressedCubeImageImplementation = &CubeMapTexture::getCompressedImageImplementationRobustness;
} else if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) { } else if(context.isExtensionSupported<Extensions::EXT::direct_state_access>()) {
/* Extension name added above */ /* Extension name added above */
getCubeImageImplementation = &CubeMapTexture::getImageImplementationDSAEXT; getCubeImageImplementation = &CubeMapTexture::getImageImplementationDSAEXT;
getCompressedCubeImageImplementation = &CubeMapTexture::getCompressedImageImplementationDSAEXT; getCompressedCubeImageImplementation = &CubeMapTexture::getCompressedImageImplementationDSAEXT;
@ -308,7 +308,7 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
/* Full compressed cubemap image query implementation (extensions added /* Full compressed cubemap image query implementation (extensions added
above) */ above) */
if((context.detectedDriver() & Context::DetectedDriver::NVidia) && if((context.detectedDriver() & Context::DetectedDriver::NVidia) &&
context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>() && context.isExtensionSupported<Extensions::ARB::direct_state_access>() &&
!context.isDriverWorkaroundDisabled("nv-cubemap-broken-full-compressed-image-query")) !context.isDriverWorkaroundDisabled("nv-cubemap-broken-full-compressed-image-query"))
getFullCompressedCubeImageImplementation = &CubeMapTexture::getCompressedImageImplementationDSASingleSliceWorkaround; getFullCompressedCubeImageImplementation = &CubeMapTexture::getCompressedImageImplementationDSASingleSliceWorkaround;
else else
@ -318,24 +318,24 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
/* Texture storage implementation for desktop and ES */ /* Texture storage implementation for desktop and ES */
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::texture_storage>()) if(context.isExtensionSupported<Extensions::ARB::texture_storage>())
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
if(context.isExtensionSupported<Extensions::GL::EXT::texture_storage>()) if(context.isExtensionSupported<Extensions::EXT::texture_storage>())
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extensions.emplace_back(Extensions::GL::ARB::texture_storage::string()); extensions.emplace_back(Extensions::ARB::texture_storage::string());
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
extensions.push_back(Extensions::GL::EXT::texture_storage::string()); extensions.push_back(Extensions::EXT::texture_storage::string());
#endif #endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
storage1DImplementation = &AbstractTexture::storageImplementationDSA; storage1DImplementation = &AbstractTexture::storageImplementationDSA;
storage2DImplementation = &AbstractTexture::storageImplementationDSA; storage2DImplementation = &AbstractTexture::storageImplementationDSA;
storage3DImplementation = &AbstractTexture::storageImplementationDSA; storage3DImplementation = &AbstractTexture::storageImplementationDSA;
} else if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) { } else if(context.isExtensionSupported<Extensions::EXT::direct_state_access>()) {
storage1DImplementation = &AbstractTexture::storageImplementationDSAEXT; storage1DImplementation = &AbstractTexture::storageImplementationDSAEXT;
storage2DImplementation = &AbstractTexture::storageImplementationDSAEXT; storage2DImplementation = &AbstractTexture::storageImplementationDSAEXT;
storage3DImplementation = &AbstractTexture::storageImplementationDSAEXT; storage3DImplementation = &AbstractTexture::storageImplementationDSAEXT;
@ -372,13 +372,13 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/* Storage implementation for multisample textures. The fallback doesn't /* Storage implementation for multisample textures. The fallback doesn't
have DSA alternative, so it must be handled specially. */ have DSA alternative, so it must be handled specially. */
if(context.isExtensionSupported<Extensions::GL::ARB::texture_storage_multisample>()) { if(context.isExtensionSupported<Extensions::ARB::texture_storage_multisample>()) {
extensions.emplace_back(Extensions::GL::ARB::texture_storage_multisample::string()); extensions.emplace_back(Extensions::ARB::texture_storage_multisample::string());
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
storage2DMultisampleImplementation = &AbstractTexture::storageMultisampleImplementationDSA; storage2DMultisampleImplementation = &AbstractTexture::storageMultisampleImplementationDSA;
storage3DMultisampleImplementation = &AbstractTexture::storageMultisampleImplementationDSA; storage3DMultisampleImplementation = &AbstractTexture::storageMultisampleImplementationDSA;
} else if(context.isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) { } else if(context.isExtensionSupported<Extensions::EXT::direct_state_access>()) {
storage2DMultisampleImplementation = &AbstractTexture::storageMultisampleImplementationDSAEXT; storage2DMultisampleImplementation = &AbstractTexture::storageMultisampleImplementationDSAEXT;
storage3DMultisampleImplementation = &AbstractTexture::storageMultisampleImplementationDSAEXT; storage3DMultisampleImplementation = &AbstractTexture::storageMultisampleImplementationDSAEXT;
} else { } else {
@ -394,7 +394,7 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
if(context.isVersionSupported(Version::GLES320)) if(context.isVersionSupported(Version::GLES320))
storage3DMultisampleImplementation = &AbstractTexture::storageMultisampleImplementationDefault; storage3DMultisampleImplementation = &AbstractTexture::storageMultisampleImplementationDefault;
else if(context.isExtensionSupported<Extensions::GL::OES::texture_storage_multisample_2d_array>()) else if(context.isExtensionSupported<Extensions::OES::texture_storage_multisample_2d_array>())
storage3DMultisampleImplementation = &AbstractTexture::storageMultisampleImplementationOES; storage3DMultisampleImplementation = &AbstractTexture::storageMultisampleImplementationOES;
else else
storage3DMultisampleImplementation = nullptr; storage3DMultisampleImplementation = nullptr;
@ -402,14 +402,14 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
/* Anisotropic filter implementation */ /* Anisotropic filter implementation */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::EXT::texture_filter_anisotropic>()) { if(context.isExtensionSupported<Extensions::EXT::texture_filter_anisotropic>()) {
extensions.emplace_back(Extensions::GL::ARB::texture_filter_anisotropic::string()); extensions.emplace_back(Extensions::ARB::texture_filter_anisotropic::string());
setMaxAnisotropyImplementation = &AbstractTexture::setMaxAnisotropyImplementationArb; setMaxAnisotropyImplementation = &AbstractTexture::setMaxAnisotropyImplementationArb;
} else } else
#endif #endif
if(context.isExtensionSupported<Extensions::GL::EXT::texture_filter_anisotropic>()) { if(context.isExtensionSupported<Extensions::EXT::texture_filter_anisotropic>()) {
extensions.emplace_back(Extensions::GL::EXT::texture_filter_anisotropic::string()); extensions.emplace_back(Extensions::EXT::texture_filter_anisotropic::string());
setMaxAnisotropyImplementation = &AbstractTexture::setMaxAnisotropyImplementationExt; setMaxAnisotropyImplementation = &AbstractTexture::setMaxAnisotropyImplementationExt;
} else setMaxAnisotropyImplementation = &AbstractTexture::setMaxAnisotropyImplementationNoOp; } else setMaxAnisotropyImplementation = &AbstractTexture::setMaxAnisotropyImplementationNoOp;
@ -433,7 +433,7 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
#endif #endif
image3DImplementation = &AbstractTexture::imageImplementationSvga3DSliceBySlice; image3DImplementation = &AbstractTexture::imageImplementationSvga3DSliceBySlice;
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
subImage2DImplementation = &AbstractTexture::subImageImplementationSvga3DSliceBySlice<&AbstractTexture::subImage2DImplementationDSA>; subImage2DImplementation = &AbstractTexture::subImageImplementationSvga3DSliceBySlice<&AbstractTexture::subImage2DImplementationDSA>;
#endif #endif
@ -472,7 +472,7 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/* Allocate image bindings array to hold all possible image units */ /* Allocate image bindings array to hold all possible image units */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::shader_image_load_store>()) if(context.isExtensionSupported<Extensions::ARB::shader_image_load_store>())
#else #else
if(context.isVersionSupported(Version::GLES310)) if(context.isVersionSupported(Version::GLES310))
#endif #endif

4
src/Magnum/GL/Implementation/TransformFeedbackState.cpp

@ -13,8 +13,8 @@ TransformFeedbackState::TransformFeedbackState(Context& context, std::vector<std
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) { if(context.isExtensionSupported<Extensions::ARB::direct_state_access>()) {
extensions.emplace_back(Extensions::GL::ARB::direct_state_access::string()); extensions.emplace_back(Extensions::ARB::direct_state_access::string());
createImplementation = &TransformFeedback::createImplementationDSA; createImplementation = &TransformFeedback::createImplementationDSA;
attachRangeImplementation = &TransformFeedback::attachImplementationDSA; attachRangeImplementation = &TransformFeedback::attachImplementationDSA;

14
src/Magnum/GL/Implementation/driverSpecific.cpp

@ -227,22 +227,22 @@ void Context::setupDriverWorkarounds() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
#ifdef CORRADE_TARGET_WINDOWS #ifdef CORRADE_TARGET_WINDOWS
if((detectedDriver() & DetectedDriver::IntelWindows) && !isExtensionSupported<Extensions::GL::ARB::shading_language_420pack>() && !isDriverWorkaroundDisabled("intel-windows-glsl-exposes-unsupported-shading-language-420pack")) if((detectedDriver() & DetectedDriver::IntelWindows) && !isExtensionSupported<Extensions::ARB::shading_language_420pack>() && !isDriverWorkaroundDisabled("intel-windows-glsl-exposes-unsupported-shading-language-420pack"))
_setRequiredVersion(GL::ARB::shading_language_420pack, None); _setRequiredVersion(ARB::shading_language_420pack, None);
#endif #endif
if(!isDriverWorkaroundDisabled("no-layout-qualifiers-on-old-glsl")) { if(!isDriverWorkaroundDisabled("no-layout-qualifiers-on-old-glsl")) {
_setRequiredVersion(GL::ARB::explicit_attrib_location, GL320); _setRequiredVersion(ARB::explicit_attrib_location, GL320);
_setRequiredVersion(GL::ARB::explicit_uniform_location, GL320); _setRequiredVersion(ARB::explicit_uniform_location, GL320);
_setRequiredVersion(GL::ARB::shading_language_420pack, GL320); _setRequiredVersion(ARB::shading_language_420pack, GL320);
} }
#endif #endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if((detectedDriver() & DetectedDriver::Svga3D) && if((detectedDriver() & DetectedDriver::Svga3D) &&
isExtensionSupported<Extensions::GL::ARB::get_texture_sub_image>() && isExtensionSupported<Extensions::ARB::get_texture_sub_image>() &&
!isDriverWorkaroundDisabled("svga3d-gettexsubimage-oob-write")) !isDriverWorkaroundDisabled("svga3d-gettexsubimage-oob-write"))
_setRequiredVersion(GL::ARB::get_texture_sub_image, None); _setRequiredVersion(ARB::get_texture_sub_image, None);
#endif #endif
#undef _setRequiredVersion #undef _setRequiredVersion

2
src/Magnum/GL/Mesh.cpp

@ -153,7 +153,7 @@ Int Mesh::maxElementIndex()
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::ES3_compatibility>()) if(!Context::current().isExtensionSupported<Extensions::ARB::ES3_compatibility>())
return 0xFFFFFFFFl; return 0xFFFFFFFFl;
#endif #endif

6
src/Magnum/GL/MultisampleTexture.cpp

@ -35,7 +35,7 @@ namespace Magnum { namespace GL { namespace Implementation {
template<> Vector2i MAGNUM_GL_EXPORT maxMultisampleTextureSize<2>() { template<> Vector2i MAGNUM_GL_EXPORT maxMultisampleTextureSize<2>() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::texture_multisample>()) if(!Context::current().isExtensionSupported<Extensions::ARB::texture_multisample>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -46,10 +46,10 @@ template<> Vector2i MAGNUM_GL_EXPORT maxMultisampleTextureSize<2>() {
template<> Vector3i MAGNUM_GL_EXPORT maxMultisampleTextureSize<3>() { template<> Vector3i MAGNUM_GL_EXPORT maxMultisampleTextureSize<3>() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::texture_multisample>()) if(!Context::current().isExtensionSupported<Extensions::ARB::texture_multisample>())
return Vector3i{0}; return Vector3i{0};
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::OES::texture_storage_multisample_2d_array>()) if(!Context::current().isExtensionSupported<Extensions::OES::texture_storage_multisample_2d_array>())
return Vector3i{0}; return Vector3i{0};
#endif #endif

2
src/Magnum/GL/OpenGLTester.cpp

@ -44,7 +44,7 @@ OpenGLTester::OpenGLTester(): TestSuite::Tester{TestSuite::Tester::TesterConfigu
#endif #endif
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
if(Context::current().isExtensionSupported<Extensions::GL::KHR::debug>()) { if(Context::current().isExtensionSupported<Extensions::KHR::debug>()) {
Renderer::enable(Renderer::Feature::DebugOutput); Renderer::enable(Renderer::Feature::DebugOutput);
Renderer::enable(Renderer::Feature::DebugOutputSynchronous); Renderer::enable(Renderer::Feature::DebugOutputSynchronous);
DebugOutput::setDefaultCallback(); DebugOutput::setDefaultCallback();

2
src/Magnum/GL/RectangleTexture.cpp

@ -37,7 +37,7 @@
namespace Magnum { namespace GL { namespace Magnum { namespace GL {
Vector2i RectangleTexture::maxSize() { Vector2i RectangleTexture::maxSize() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::texture_rectangle>()) if(!Context::current().isExtensionSupported<Extensions::ARB::texture_rectangle>())
return {}; return {};
GLint& value = Context::current().state().texture->maxRectangleSize; GLint& value = Context::current().state().texture->maxRectangleSize;

2
src/Magnum/GL/Renderbuffer.cpp

@ -49,7 +49,7 @@ Int Renderbuffer::maxSize() {
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
Int Renderbuffer::maxSamples() { Int Renderbuffer::maxSamples() {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
if(!Context::current().isExtensionSupported<Extensions::GL::ANGLE::framebuffer_multisample>() && !Context::current().isExtensionSupported<Extensions::GL::NV::framebuffer_multisample>()) if(!Context::current().isExtensionSupported<Extensions::ANGLE::framebuffer_multisample>() && !Context::current().isExtensionSupported<Extensions::NV::framebuffer_multisample>())
return 0; return 0;
#endif #endif

4
src/Magnum/GL/Renderer.cpp

@ -177,9 +177,9 @@ void Renderer::setLogicOperation(const LogicOperation operation) {
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
Renderer::ResetNotificationStrategy Renderer::resetNotificationStrategy() { Renderer::ResetNotificationStrategy Renderer::resetNotificationStrategy() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::robustness>()) if(!Context::current().isExtensionSupported<Extensions::ARB::robustness>())
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::robustness>()) if(!Context::current().isExtensionSupported<Extensions::EXT::robustness>())
#endif #endif
return ResetNotificationStrategy::NoResetNotification; return ResetNotificationStrategy::NoResetNotification;

4
src/Magnum/GL/Sampler.cpp

@ -112,11 +112,11 @@ Float Sampler::maxMaxAnisotropy() {
/* Get the value, if not already cached */ /* Get the value, if not already cached */
if(value == 0.0f) { if(value == 0.0f) {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(Context::current().isExtensionSupported<Extensions::GL::ARB::texture_filter_anisotropic>()) if(Context::current().isExtensionSupported<Extensions::ARB::texture_filter_anisotropic>())
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY, &value); glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY, &value);
else else
#endif #endif
if(Context::current().isExtensionSupported<Extensions::GL::EXT::texture_filter_anisotropic>()) if(Context::current().isExtensionSupported<Extensions::EXT::texture_filter_anisotropic>())
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &value); glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &value);
} }

64
src/Magnum/GL/Shader.cpp

@ -84,23 +84,23 @@ UnsignedInt typeToIndex(const Shader::Type type) {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
bool isTypeSupported(const Shader::Type type) { bool isTypeSupported(const Shader::Type type) {
if(type == Shader::Type::Geometry && !Context::current().isExtensionSupported<Extensions::GL::ARB::geometry_shader4>()) if(type == Shader::Type::Geometry && !Context::current().isExtensionSupported<Extensions::ARB::geometry_shader4>())
return false; return false;
if((type == Shader::Type::TessellationControl || type == Shader::Type::TessellationEvaluation) && !Context::current().isExtensionSupported<Extensions::GL::ARB::tessellation_shader>()) if((type == Shader::Type::TessellationControl || type == Shader::Type::TessellationEvaluation) && !Context::current().isExtensionSupported<Extensions::ARB::tessellation_shader>())
return false; return false;
if(type == Shader::Type::Compute && !Context::current().isExtensionSupported<Extensions::GL::ARB::compute_shader>()) if(type == Shader::Type::Compute && !Context::current().isExtensionSupported<Extensions::ARB::compute_shader>())
return false; return false;
return true; return true;
} }
#elif !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #elif !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
bool isTypeSupported(const Shader::Type type) { bool isTypeSupported(const Shader::Type type) {
if(type == Shader::Type::Geometry && !Context::current().isExtensionSupported<Extensions::GL::EXT::geometry_shader>()) if(type == Shader::Type::Geometry && !Context::current().isExtensionSupported<Extensions::EXT::geometry_shader>())
return false; return false;
if((type == Shader::Type::TessellationControl || type == Shader::Type::TessellationEvaluation) && !Context::current().isExtensionSupported<Extensions::GL::EXT::tessellation_shader>()) if((type == Shader::Type::TessellationControl || type == Shader::Type::TessellationEvaluation) && !Context::current().isExtensionSupported<Extensions::EXT::tessellation_shader>())
return false; return false;
if(type == Shader::Type::Compute && !Context::current().isVersionSupported(Version::GLES310)) if(type == Shader::Type::Compute && !Context::current().isVersionSupported(Version::GLES310))
@ -138,10 +138,10 @@ Int Shader::maxVertexOutputComponents() {
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
Int Shader::maxTessellationControlInputComponents() { Int Shader::maxTessellationControlInputComponents() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::tessellation_shader>()) if(!Context::current().isExtensionSupported<Extensions::ARB::tessellation_shader>())
return 0; return 0;
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::tessellation_shader>()) if(!Context::current().isExtensionSupported<Extensions::EXT::tessellation_shader>())
return 0; return 0;
#endif #endif
@ -156,10 +156,10 @@ Int Shader::maxTessellationControlInputComponents() {
Int Shader::maxTessellationControlOutputComponents() { Int Shader::maxTessellationControlOutputComponents() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::tessellation_shader>()) if(!Context::current().isExtensionSupported<Extensions::ARB::tessellation_shader>())
return 0; return 0;
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::tessellation_shader>()) if(!Context::current().isExtensionSupported<Extensions::EXT::tessellation_shader>())
return 0; return 0;
#endif #endif
@ -174,10 +174,10 @@ Int Shader::maxTessellationControlOutputComponents() {
Int Shader::maxTessellationControlTotalOutputComponents() { Int Shader::maxTessellationControlTotalOutputComponents() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::tessellation_shader>()) if(!Context::current().isExtensionSupported<Extensions::ARB::tessellation_shader>())
return 0; return 0;
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::tessellation_shader>()) if(!Context::current().isExtensionSupported<Extensions::EXT::tessellation_shader>())
return 0; return 0;
#endif #endif
@ -192,10 +192,10 @@ Int Shader::maxTessellationControlTotalOutputComponents() {
Int Shader::maxTessellationEvaluationInputComponents() { Int Shader::maxTessellationEvaluationInputComponents() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::tessellation_shader>()) if(!Context::current().isExtensionSupported<Extensions::ARB::tessellation_shader>())
return 0; return 0;
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::tessellation_shader>()) if(!Context::current().isExtensionSupported<Extensions::EXT::tessellation_shader>())
return 0; return 0;
#endif #endif
@ -210,10 +210,10 @@ Int Shader::maxTessellationEvaluationInputComponents() {
Int Shader::maxTessellationEvaluationOutputComponents() { Int Shader::maxTessellationEvaluationOutputComponents() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::tessellation_shader>()) if(!Context::current().isExtensionSupported<Extensions::ARB::tessellation_shader>())
return 0; return 0;
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::tessellation_shader>()) if(!Context::current().isExtensionSupported<Extensions::EXT::tessellation_shader>())
return 0; return 0;
#endif #endif
@ -228,10 +228,10 @@ Int Shader::maxTessellationEvaluationOutputComponents() {
Int Shader::maxGeometryInputComponents() { Int Shader::maxGeometryInputComponents() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::geometry_shader4>()) if(!Context::current().isExtensionSupported<Extensions::ARB::geometry_shader4>())
return 0; return 0;
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::geometry_shader>()) if(!Context::current().isExtensionSupported<Extensions::EXT::geometry_shader>())
return 0; return 0;
#endif #endif
@ -247,10 +247,10 @@ Int Shader::maxGeometryInputComponents() {
Int Shader::maxGeometryOutputComponents() { Int Shader::maxGeometryOutputComponents() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::geometry_shader4>()) if(!Context::current().isExtensionSupported<Extensions::ARB::geometry_shader4>())
return 0; return 0;
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::geometry_shader>()) if(!Context::current().isExtensionSupported<Extensions::EXT::geometry_shader>())
return 0; return 0;
#endif #endif
@ -266,10 +266,10 @@ Int Shader::maxGeometryOutputComponents() {
Int Shader::maxGeometryTotalOutputComponents() { Int Shader::maxGeometryTotalOutputComponents() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::geometry_shader4>()) if(!Context::current().isExtensionSupported<Extensions::ARB::geometry_shader4>())
return 0; return 0;
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::geometry_shader>()) if(!Context::current().isExtensionSupported<Extensions::EXT::geometry_shader>())
return 0; return 0;
#endif #endif
@ -308,7 +308,7 @@ Int Shader::maxFragmentInputComponents() {
Int Shader::maxAtomicCounterBuffers(const Type type) { Int Shader::maxAtomicCounterBuffers(const Type type) {
if( if(
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_atomic_counters>() || !Context::current().isExtensionSupported<Extensions::ARB::shader_atomic_counters>() ||
#else #else
!Context::current().isVersionSupported(Version::GLES310) || !Context::current().isVersionSupported(Version::GLES310) ||
#endif #endif
@ -337,7 +337,7 @@ Int Shader::maxAtomicCounterBuffers(const Type type) {
Int Shader::maxCombinedAtomicCounterBuffers() { Int Shader::maxCombinedAtomicCounterBuffers() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_atomic_counters>()) if(!Context::current().isExtensionSupported<Extensions::ARB::shader_atomic_counters>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -355,7 +355,7 @@ Int Shader::maxCombinedAtomicCounterBuffers() {
Int Shader::maxAtomicCounters(const Type type) { Int Shader::maxAtomicCounters(const Type type) {
if( if(
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_atomic_counters>() || !Context::current().isExtensionSupported<Extensions::ARB::shader_atomic_counters>() ||
#else #else
!Context::current().isVersionSupported(Version::GLES310) || !Context::current().isVersionSupported(Version::GLES310) ||
#endif #endif
@ -384,7 +384,7 @@ Int Shader::maxAtomicCounters(const Type type) {
Int Shader::maxCombinedAtomicCounters() { Int Shader::maxCombinedAtomicCounters() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_atomic_counters>()) if(!Context::current().isExtensionSupported<Extensions::ARB::shader_atomic_counters>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -402,7 +402,7 @@ Int Shader::maxCombinedAtomicCounters() {
Int Shader::maxImageUniforms(const Type type) { Int Shader::maxImageUniforms(const Type type) {
if( if(
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_image_load_store>() || !Context::current().isExtensionSupported<Extensions::ARB::shader_image_load_store>() ||
#else #else
!Context::current().isVersionSupported(Version::GLES310) || !Context::current().isVersionSupported(Version::GLES310) ||
#endif #endif
@ -431,7 +431,7 @@ Int Shader::maxImageUniforms(const Type type) {
Int Shader::maxCombinedImageUniforms() { Int Shader::maxCombinedImageUniforms() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_image_load_store>()) if(!Context::current().isExtensionSupported<Extensions::ARB::shader_image_load_store>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -449,7 +449,7 @@ Int Shader::maxCombinedImageUniforms() {
Int Shader::maxShaderStorageBlocks(const Type type) { Int Shader::maxShaderStorageBlocks(const Type type) {
if( if(
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_storage_buffer_object>() || !Context::current().isExtensionSupported<Extensions::ARB::shader_storage_buffer_object>() ||
#else #else
!Context::current().isVersionSupported(Version::GLES310) || !Context::current().isVersionSupported(Version::GLES310) ||
#endif #endif
@ -478,7 +478,7 @@ Int Shader::maxShaderStorageBlocks(const Type type) {
Int Shader::maxCombinedShaderStorageBlocks() { Int Shader::maxCombinedShaderStorageBlocks() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::shader_atomic_counters>()) if(!Context::current().isExtensionSupported<Extensions::ARB::shader_atomic_counters>())
#else #else
if(!Context::current().isVersionSupported(Version::GLES310)) if(!Context::current().isVersionSupported(Version::GLES310))
#endif #endif
@ -531,7 +531,7 @@ Int Shader::maxCombinedTextureImageUnits() {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
Int Shader::maxUniformBlocks(const Type type) { Int Shader::maxUniformBlocks(const Type type) {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::uniform_buffer_object>() || !isTypeSupported(type)) if(!Context::current().isExtensionSupported<Extensions::ARB::uniform_buffer_object>() || !isTypeSupported(type))
#else #else
if(!isTypeSupported(type)) if(!isTypeSupported(type))
#endif #endif
@ -559,7 +559,7 @@ Int Shader::maxUniformBlocks(const Type type) {
Int Shader::maxCombinedUniformBlocks() { Int Shader::maxCombinedUniformBlocks() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::uniform_buffer_object>()) if(!Context::current().isExtensionSupported<Extensions::ARB::uniform_buffer_object>())
return 0; return 0;
#endif #endif
@ -613,7 +613,7 @@ Int Shader::maxUniformComponents(const Type type) {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
Int Shader::maxCombinedUniformComponents(const Type type) { Int Shader::maxCombinedUniformComponents(const Type type) {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::uniform_buffer_object>() || !isTypeSupported(type)) if(!Context::current().isExtensionSupported<Extensions::ARB::uniform_buffer_object>() || !isTypeSupported(type))
#else #else
if(!isTypeSupported(type)) if(!isTypeSupported(type))
#endif #endif

252
src/Magnum/GL/Test/MeshGLTest.cpp

@ -267,9 +267,9 @@ void MeshGLTest::construct() {
MAGNUM_VERIFY_NO_ERROR(); MAGNUM_VERIFY_NO_ERROR();
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_array_object>()) if(Context::current().isExtensionSupported<Extensions::ARB::vertex_array_object>())
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
if(Context::current().isExtensionSupported<Extensions::GL::OES::vertex_array_object>()) if(Context::current().isExtensionSupported<Extensions::OES::vertex_array_object>())
#endif #endif
{ {
CORRADE_VERIFY(mesh.id() > 0); CORRADE_VERIFY(mesh.id() > 0);
@ -291,9 +291,9 @@ void MeshGLTest::constructMove() {
MAGNUM_VERIFY_NO_ERROR(); MAGNUM_VERIFY_NO_ERROR();
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_array_object>()) if(Context::current().isExtensionSupported<Extensions::ARB::vertex_array_object>())
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
if(Context::current().isExtensionSupported<Extensions::GL::OES::vertex_array_object>()) if(Context::current().isExtensionSupported<Extensions::OES::vertex_array_object>())
#endif #endif
{ {
CORRADE_VERIFY(id > 0); CORRADE_VERIFY(id > 0);
@ -311,9 +311,9 @@ void MeshGLTest::constructMove() {
MAGNUM_VERIFY_NO_ERROR(); MAGNUM_VERIFY_NO_ERROR();
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_array_object>()) if(Context::current().isExtensionSupported<Extensions::ARB::vertex_array_object>())
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
if(Context::current().isExtensionSupported<Extensions::GL::OES::vertex_array_object>()) if(Context::current().isExtensionSupported<Extensions::OES::vertex_array_object>())
#endif #endif
{ {
CORRADE_VERIFY(cId > 0); CORRADE_VERIFY(cId > 0);
@ -325,11 +325,11 @@ void MeshGLTest::constructMove() {
void MeshGLTest::wrap() { void MeshGLTest::wrap() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_array_object>()) if(!Context::current().isExtensionSupported<Extensions::ARB::vertex_array_object>())
CORRADE_SKIP(Extensions::GL::ARB::vertex_array_object::string() + std::string{" is not supported."}); CORRADE_SKIP(Extensions::ARB::vertex_array_object::string() + std::string{" is not supported."});
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
if(!Context::current().isExtensionSupported<Extensions::GL::OES::vertex_array_object>()) if(!Context::current().isExtensionSupported<Extensions::OES::vertex_array_object>())
CORRADE_SKIP(Extensions::GL::OES::vertex_array_object::string() + std::string{" is not supported."}); CORRADE_SKIP(Extensions::OES::vertex_array_object::string() + std::string{" is not supported."});
#endif #endif
GLuint id; GLuint id;
@ -372,8 +372,8 @@ template<class T> void MeshGLTest::primitive() {
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
void MeshGLTest::label() { void MeshGLTest::label() {
/* No-Op version is tested in AbstractObjectGLTest */ /* No-Op version is tested in AbstractObjectGLTest */
if(!Context::current().isExtensionSupported<Extensions::GL::KHR::debug>() && if(!Context::current().isExtensionSupported<Extensions::KHR::debug>() &&
!Context::current().isExtensionSupported<Extensions::GL::EXT::debug_label>()) !Context::current().isExtensionSupported<Extensions::EXT::debug_label>())
CORRADE_SKIP("Required extension is not available"); CORRADE_SKIP("Required extension is not available");
Mesh mesh; Mesh mesh;
@ -586,8 +586,8 @@ template<class T> T Checker::get(PixelFormat format, PixelType type) {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
void MeshGLTest::addVertexBufferUnsignedInt() { void MeshGLTest::addVertexBufferUnsignedInt() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::gpu_shader4>()) if(!Context::current().isExtensionSupported<Extensions::EXT::gpu_shader4>())
CORRADE_SKIP(Extensions::GL::EXT::gpu_shader4::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::EXT::gpu_shader4::string() + std::string(" is not available."));
#endif #endif
constexpr UnsignedInt data[] = { 0, 157, 35681 }; constexpr UnsignedInt data[] = { 0, 157, 35681 };
@ -619,8 +619,8 @@ void MeshGLTest::addVertexBufferUnsignedInt() {
void MeshGLTest::addVertexBufferInt() { void MeshGLTest::addVertexBufferInt() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::gpu_shader4>()) if(!Context::current().isExtensionSupported<Extensions::EXT::gpu_shader4>())
CORRADE_SKIP(Extensions::GL::EXT::gpu_shader4::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::EXT::gpu_shader4::string() + std::string(" is not available."));
#endif #endif
constexpr Int data[] = { 0, 457931, 27530 }; constexpr Int data[] = { 0, 457931, 27530 };
@ -686,8 +686,8 @@ void MeshGLTest::addVertexBufferFloat() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void MeshGLTest::addVertexBufferDouble() { void MeshGLTest::addVertexBufferDouble() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_attrib_64bit>()) if(!Context::current().isExtensionSupported<Extensions::ARB::vertex_attrib_64bit>())
CORRADE_SKIP(Extensions::GL::ARB::vertex_attrib_64bit::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::vertex_attrib_64bit::string() + std::string(" is not available."));
const Double data[] = { 0.0, -0.7, Math::unpack<Double, UnsignedShort>(45828) }; const Double data[] = { 0.0, -0.7, Math::unpack<Double, UnsignedShort>(45828) };
Buffer buffer; Buffer buffer;
@ -720,8 +720,8 @@ void MeshGLTest::addVertexBufferDouble() {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
void MeshGLTest::addVertexBufferVectorNui() { void MeshGLTest::addVertexBufferVectorNui() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::gpu_shader4>()) if(!Context::current().isExtensionSupported<Extensions::EXT::gpu_shader4>())
CORRADE_SKIP(Extensions::GL::EXT::gpu_shader4::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::EXT::gpu_shader4::string() + std::string(" is not available."));
#endif #endif
constexpr Vector3ui data[] = { {}, {37448, 547686, 156}, {27592, 157, 25} }; constexpr Vector3ui data[] = { {}, {37448, 547686, 156}, {27592, 157, 25} };
@ -753,8 +753,8 @@ void MeshGLTest::addVertexBufferVectorNui() {
void MeshGLTest::addVertexBufferVectorNi() { void MeshGLTest::addVertexBufferVectorNi() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::gpu_shader4>()) if(!Context::current().isExtensionSupported<Extensions::EXT::gpu_shader4>())
CORRADE_SKIP(Extensions::GL::EXT::gpu_shader4::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::EXT::gpu_shader4::string() + std::string(" is not available."));
#endif #endif
constexpr Vector2i data[] = { {}, {-37448, 547686}, {27592, -157} }; constexpr Vector2i data[] = { {}, {-37448, 547686}, {27592, -157} };
@ -820,8 +820,8 @@ void MeshGLTest::addVertexBufferVectorN() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void MeshGLTest::addVertexBufferVectorNd() { void MeshGLTest::addVertexBufferVectorNd() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_attrib_64bit>()) if(!Context::current().isExtensionSupported<Extensions::ARB::vertex_attrib_64bit>())
CORRADE_SKIP(Extensions::GL::ARB::vertex_attrib_64bit::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::vertex_attrib_64bit::string() + std::string(" is not available."));
const Vector4d data[] = { const Vector4d data[] = {
{}, {0.0, -0.9, 1.0, 1.25}, {}, {0.0, -0.9, 1.0, 1.25},
@ -902,8 +902,8 @@ void MeshGLTest::addVertexBufferMatrixNxN() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void MeshGLTest::addVertexBufferMatrixNxNd() { void MeshGLTest::addVertexBufferMatrixNxNd() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_attrib_64bit>()) if(!Context::current().isExtensionSupported<Extensions::ARB::vertex_attrib_64bit>())
CORRADE_SKIP(Extensions::GL::ARB::vertex_attrib_64bit::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::vertex_attrib_64bit::string() + std::string(" is not available."));
const Matrix3x3d data[] = { const Matrix3x3d data[] = {
{}, {},
@ -1000,8 +1000,8 @@ void MeshGLTest::addVertexBufferMatrixMxN() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void MeshGLTest::addVertexBufferMatrixMxNd() { void MeshGLTest::addVertexBufferMatrixMxNd() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_attrib_64bit>()) if(!Context::current().isExtensionSupported<Extensions::ARB::vertex_attrib_64bit>())
CORRADE_SKIP(Extensions::GL::ARB::vertex_attrib_64bit::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::vertex_attrib_64bit::string() + std::string(" is not available."));
const Matrix3x4d data[] = { const Matrix3x4d data[] = {
{}, {},
@ -1056,8 +1056,8 @@ void MeshGLTest::addVertexBufferMatrixMxNd() {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
void MeshGLTest::addVertexBufferUnsignedIntWithUnsignedShort() { void MeshGLTest::addVertexBufferUnsignedIntWithUnsignedShort() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::gpu_shader4>()) if(!Context::current().isExtensionSupported<Extensions::EXT::gpu_shader4>())
CORRADE_SKIP(Extensions::GL::EXT::gpu_shader4::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::EXT::gpu_shader4::string() + std::string(" is not available."));
#endif #endif
constexpr UnsignedShort data[] = { 0, 49563, 2128, 3821, 16583 }; constexpr UnsignedShort data[] = { 0, 49563, 2128, 3821, 16583 };
@ -1089,8 +1089,8 @@ void MeshGLTest::addVertexBufferUnsignedIntWithUnsignedShort() {
void MeshGLTest::addVertexBufferUnsignedIntWithShort() { void MeshGLTest::addVertexBufferUnsignedIntWithShort() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::gpu_shader4>()) if(!Context::current().isExtensionSupported<Extensions::EXT::gpu_shader4>())
CORRADE_SKIP(Extensions::GL::EXT::gpu_shader4::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::EXT::gpu_shader4::string() + std::string(" is not available."));
#endif #endif
constexpr Short data[] = { 0, 24563, 2128, 3821, 16583 }; constexpr Short data[] = { 0, 24563, 2128, 3821, 16583 };
@ -1122,8 +1122,8 @@ void MeshGLTest::addVertexBufferUnsignedIntWithShort() {
void MeshGLTest::addVertexBufferIntWithUnsignedShort() { void MeshGLTest::addVertexBufferIntWithUnsignedShort() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::gpu_shader4>()) if(!Context::current().isExtensionSupported<Extensions::EXT::gpu_shader4>())
CORRADE_SKIP(Extensions::GL::EXT::gpu_shader4::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::EXT::gpu_shader4::string() + std::string(" is not available."));
#endif #endif
constexpr UnsignedShort data[] = { 0, 49563, 2128, 3821, 16583 }; constexpr UnsignedShort data[] = { 0, 49563, 2128, 3821, 16583 };
@ -1155,8 +1155,8 @@ void MeshGLTest::addVertexBufferIntWithUnsignedShort() {
void MeshGLTest::addVertexBufferIntWithShort() { void MeshGLTest::addVertexBufferIntWithShort() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::gpu_shader4>()) if(!Context::current().isExtensionSupported<Extensions::EXT::gpu_shader4>())
CORRADE_SKIP(Extensions::GL::EXT::gpu_shader4::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::EXT::gpu_shader4::string() + std::string(" is not available."));
#endif #endif
constexpr Short data[] = { 0, 24563, 2128, 3821, -16583 }; constexpr Short data[] = { 0, 24563, 2128, 3821, -16583 };
@ -1190,11 +1190,11 @@ void MeshGLTest::addVertexBufferIntWithShort() {
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
void MeshGLTest::addVertexBufferFloatWithHalfFloat() { void MeshGLTest::addVertexBufferFloatWithHalfFloat() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::half_float_vertex>()) if(!Context::current().isExtensionSupported<Extensions::ARB::half_float_vertex>())
CORRADE_SKIP(Extensions::GL::ARB::half_float_vertex::string() + std::string(" is not supported.")); CORRADE_SKIP(Extensions::ARB::half_float_vertex::string() + std::string(" is not supported."));
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
if(!Context::current().isExtensionSupported<Extensions::GL::OES::vertex_half_float>()) if(!Context::current().isExtensionSupported<Extensions::OES::vertex_half_float>())
CORRADE_SKIP(Extensions::GL::OES::vertex_half_float::string() + std::string(" is not supported.")); CORRADE_SKIP(Extensions::OES::vertex_half_float::string() + std::string(" is not supported."));
#endif #endif
using namespace Math::Literals; using namespace Math::Literals;
@ -1259,8 +1259,8 @@ void MeshGLTest::addVertexBufferFloatWithDouble() {
void MeshGLTest::addVertexBufferVector3WithUnsignedInt10f11f11fRev() { void MeshGLTest::addVertexBufferVector3WithUnsignedInt10f11f11fRev() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_type_10f_11f_11f_rev>()) if(!Context::current().isExtensionSupported<Extensions::ARB::vertex_type_10f_11f_11f_rev>())
CORRADE_SKIP(Extensions::GL::ARB::vertex_type_10f_11f_11f_rev::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::vertex_type_10f_11f_11f_rev::string() + std::string(" is not available."));
#endif #endif
Buffer buffer; Buffer buffer;
@ -1288,8 +1288,8 @@ void MeshGLTest::addVertexBufferVector3WithUnsignedInt10f11f11fRev() {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
void MeshGLTest::addVertexBufferVector4WithUnsignedInt2101010Rev() { void MeshGLTest::addVertexBufferVector4WithUnsignedInt2101010Rev() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_type_2_10_10_10_rev>()) if(!Context::current().isExtensionSupported<Extensions::ARB::vertex_type_2_10_10_10_rev>())
CORRADE_SKIP(Extensions::GL::ARB::vertex_type_2_10_10_10_rev::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::vertex_type_2_10_10_10_rev::string() + std::string(" is not available."));
#endif #endif
Buffer buffer; Buffer buffer;
@ -1315,8 +1315,8 @@ void MeshGLTest::addVertexBufferVector4WithUnsignedInt2101010Rev() {
void MeshGLTest::addVertexBufferVector4WithInt2101010Rev() { void MeshGLTest::addVertexBufferVector4WithInt2101010Rev() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_type_2_10_10_10_rev>()) if(!Context::current().isExtensionSupported<Extensions::ARB::vertex_type_2_10_10_10_rev>())
CORRADE_SKIP(Extensions::GL::ARB::vertex_type_2_10_10_10_rev::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::vertex_type_2_10_10_10_rev::string() + std::string(" is not available."));
#endif #endif
Buffer buffer; Buffer buffer;
@ -1414,8 +1414,8 @@ void MeshGLTest::addVertexBufferNormalized() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void MeshGLTest::addVertexBufferBGRA() { void MeshGLTest::addVertexBufferBGRA() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_array_bgra>()) if(!Context::current().isExtensionSupported<Extensions::ARB::vertex_array_bgra>())
CORRADE_SKIP(Extensions::GL::ARB::vertex_array_bgra::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::vertex_array_bgra::string() + std::string(" is not available."));
#endif #endif
constexpr Color4ub data[] = { {}, {0, 128, 64, 161}, {96, 24, 156, 225} }; constexpr Color4ub data[] = { {}, {0, 128, 64, 161}, {96, 24, 156, 225} };
@ -1728,8 +1728,8 @@ template<class T> void MeshGLTest::setIndexBufferRange() {
void MeshGLTest::setIndexBufferUnsignedInt() { void MeshGLTest::setIndexBufferUnsignedInt() {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
if(!Context::current().isExtensionSupported<Extensions::GL::OES::element_index_uint>()) if(!Context::current().isExtensionSupported<Extensions::OES::element_index_uint>())
CORRADE_SKIP(Extensions::GL::OES::element_index_uint::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::OES::element_index_uint::string() + std::string(" is not available."));
#endif #endif
Buffer vertices; Buffer vertices;
@ -1762,15 +1762,15 @@ void MeshGLTest::setIndexBufferUnsignedInt() {
void MeshGLTest::unbindVAOWhenSettingIndexBufferData() { void MeshGLTest::unbindVAOWhenSettingIndexBufferData() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_array_object>()) if(!Context::current().isExtensionSupported<Extensions::ARB::vertex_array_object>())
CORRADE_SKIP(Extensions::GL::ARB::vertex_array_object::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::vertex_array_object::string() + std::string(" is not available."));
if(Context::current().isExtensionSupported<Extensions::GL::ARB::direct_state_access>()) if(Context::current().isExtensionSupported<Extensions::ARB::direct_state_access>())
CORRADE_SKIP(Extensions::GL::ARB::direct_state_access::string() + std::string(" is active with circumvents the issue tested here.")); CORRADE_SKIP(Extensions::ARB::direct_state_access::string() + std::string(" is active with circumvents the issue tested here."));
if(Context::current().isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) if(Context::current().isExtensionSupported<Extensions::EXT::direct_state_access>())
CORRADE_SKIP(Extensions::GL::EXT::direct_state_access::string() + std::string(" is active with circumvents the issue tested here.")); CORRADE_SKIP(Extensions::EXT::direct_state_access::string() + std::string(" is active with circumvents the issue tested here."));
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
if(!Context::current().isExtensionSupported<Extensions::GL::OES::vertex_array_object>()) if(!Context::current().isExtensionSupported<Extensions::OES::vertex_array_object>())
CORRADE_SKIP(Extensions::GL::OES::vertex_array_object::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::OES::vertex_array_object::string() + std::string(" is not available."));
#endif #endif
typedef Attribute<0, Float> Attribute; typedef Attribute<0, Float> Attribute;
@ -1806,11 +1806,11 @@ void MeshGLTest::unbindVAOWhenSettingIndexBufferData() {
void MeshGLTest::unbindVAOBeforeEnteringExternalSection() { void MeshGLTest::unbindVAOBeforeEnteringExternalSection() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_array_object>()) if(!Context::current().isExtensionSupported<Extensions::ARB::vertex_array_object>())
CORRADE_SKIP(Extensions::GL::ARB::vertex_array_object::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::vertex_array_object::string() + std::string(" is not available."));
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
if(!Context::current().isExtensionSupported<Extensions::GL::OES::vertex_array_object>()) if(!Context::current().isExtensionSupported<Extensions::OES::vertex_array_object>())
CORRADE_SKIP(Extensions::GL::OES::vertex_array_object::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::OES::vertex_array_object::string() + std::string(" is not available."));
#endif #endif
typedef Attribute<0, Float> Attribute; typedef Attribute<0, Float> Attribute;
@ -1852,8 +1852,8 @@ void MeshGLTest::unbindVAOBeforeEnteringExternalSection() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void MeshGLTest::setBaseVertex() { void MeshGLTest::setBaseVertex() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_elements_base_vertex>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_elements_base_vertex>())
CORRADE_SKIP(Extensions::GL::ARB::draw_elements_base_vertex::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_elements_base_vertex::string() + std::string(" is not available."));
Buffer vertices; Buffer vertices;
vertices.setData(indexedVertexDataBaseVertex, BufferUsage::StaticDraw); vertices.setData(indexedVertexDataBaseVertex, BufferUsage::StaticDraw);
@ -1885,17 +1885,17 @@ void MeshGLTest::setInstanceCount() {
it didn't generate any error and rendered something */ it didn't generate any error and rendered something */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_instanced>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_instanced>())
CORRADE_SKIP(Extensions::GL::ARB::draw_instanced::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_instanced::string() + std::string(" is not available."));
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
if(!Context::current().isExtensionSupported<Extensions::GL::ANGLE::instanced_arrays>() && if(!Context::current().isExtensionSupported<Extensions::ANGLE::instanced_arrays>() &&
!Context::current().isExtensionSupported<Extensions::GL::EXT::draw_instanced>() && !Context::current().isExtensionSupported<Extensions::EXT::draw_instanced>() &&
!Context::current().isExtensionSupported<Extensions::GL::NV::draw_instanced>()) !Context::current().isExtensionSupported<Extensions::NV::draw_instanced>())
CORRADE_SKIP("Required extension is not available."); CORRADE_SKIP("Required extension is not available.");
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::ANGLE::instanced_arrays>()) if(!Context::current().isExtensionSupported<Extensions::ANGLE::instanced_arrays>())
CORRADE_SKIP(Extensions::GL::ANGLE::instanced_arrays::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ANGLE::instanced_arrays::string() + std::string(" is not available."));
#endif #endif
#endif #endif
@ -1931,17 +1931,17 @@ void MeshGLTest::setInstanceCountIndexed() {
it didn't generate any error and rendered something */ it didn't generate any error and rendered something */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_instanced>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_instanced>())
CORRADE_SKIP(Extensions::GL::ARB::draw_instanced::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_instanced::string() + std::string(" is not available."));
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
if(!Context::current().isExtensionSupported<Extensions::GL::ANGLE::instanced_arrays>() && if(!Context::current().isExtensionSupported<Extensions::ANGLE::instanced_arrays>() &&
!Context::current().isExtensionSupported<Extensions::GL::EXT::draw_instanced>() && !Context::current().isExtensionSupported<Extensions::EXT::draw_instanced>() &&
!Context::current().isExtensionSupported<Extensions::GL::NV::draw_instanced>()) !Context::current().isExtensionSupported<Extensions::NV::draw_instanced>())
CORRADE_SKIP("Required extension is not available."); CORRADE_SKIP("Required extension is not available.");
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::ANGLE::instanced_arrays>()) if(!Context::current().isExtensionSupported<Extensions::ANGLE::instanced_arrays>())
CORRADE_SKIP(Extensions::GL::ANGLE::instanced_arrays::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ANGLE::instanced_arrays::string() + std::string(" is not available."));
#endif #endif
#endif #endif
@ -1979,10 +1979,10 @@ void MeshGLTest::setInstanceCountBaseInstance() {
value. I'm too lazy to invent proper test case, so I'll just check that value. I'm too lazy to invent proper test case, so I'll just check that
it didn't generate any error and rendered something */ it didn't generate any error and rendered something */
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_instanced>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_instanced>())
CORRADE_SKIP(Extensions::GL::ARB::draw_instanced::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_instanced::string() + std::string(" is not available."));
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::base_instance>()) if(!Context::current().isExtensionSupported<Extensions::ARB::base_instance>())
CORRADE_SKIP(Extensions::GL::ARB::base_instance::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::base_instance::string() + std::string(" is not available."));
typedef Attribute<0, Float> Attribute; typedef Attribute<0, Float> Attribute;
@ -2012,10 +2012,10 @@ void MeshGLTest::setInstanceCountBaseInstanceIndexed() {
same value. I'm too lazy to invent proper test case, so I'll just check same value. I'm too lazy to invent proper test case, so I'll just check
that it didn't generate any error and rendered something */ that it didn't generate any error and rendered something */
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_instanced>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_instanced>())
CORRADE_SKIP(Extensions::GL::ARB::draw_instanced::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_instanced::string() + std::string(" is not available."));
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::base_instance>()) if(!Context::current().isExtensionSupported<Extensions::ARB::base_instance>())
CORRADE_SKIP(Extensions::GL::ARB::base_instance::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::base_instance::string() + std::string(" is not available."));
Buffer vertices; Buffer vertices;
vertices.setData(indexedVertexData, BufferUsage::StaticDraw); vertices.setData(indexedVertexData, BufferUsage::StaticDraw);
@ -2046,10 +2046,10 @@ void MeshGLTest::setInstanceCountBaseVertex() {
value. I'm too lazy to invent proper test case, so I'll just check value. I'm too lazy to invent proper test case, so I'll just check
that it didn't generate any error and rendered something */ that it didn't generate any error and rendered something */
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_instanced>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_instanced>())
CORRADE_SKIP(Extensions::GL::ARB::draw_instanced::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_instanced::string() + std::string(" is not available."));
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_elements_base_vertex>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_elements_base_vertex>())
CORRADE_SKIP(Extensions::GL::ARB::draw_elements_base_vertex::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_elements_base_vertex::string() + std::string(" is not available."));
Buffer vertices; Buffer vertices;
vertices.setData(indexedVertexDataBaseVertex, BufferUsage::StaticDraw); vertices.setData(indexedVertexDataBaseVertex, BufferUsage::StaticDraw);
@ -2080,12 +2080,12 @@ void MeshGLTest::setInstanceCountBaseVertexBaseInstance() {
value. I'm too lazy to invent proper test case, so I'll just check value. I'm too lazy to invent proper test case, so I'll just check
that it didn't generate any error and rendered something */ that it didn't generate any error and rendered something */
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_instanced>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_instanced>())
CORRADE_SKIP(Extensions::GL::ARB::draw_instanced::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_instanced::string() + std::string(" is not available."));
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_elements_base_vertex>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_elements_base_vertex>())
CORRADE_SKIP(Extensions::GL::ARB::draw_elements_base_vertex::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_elements_base_vertex::string() + std::string(" is not available."));
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::base_instance>()) if(!Context::current().isExtensionSupported<Extensions::ARB::base_instance>())
CORRADE_SKIP(Extensions::GL::ARB::base_instance::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::base_instance::string() + std::string(" is not available."));
Buffer vertices; Buffer vertices;
vertices.setData(indexedVertexDataBaseVertex, BufferUsage::StaticDraw); vertices.setData(indexedVertexDataBaseVertex, BufferUsage::StaticDraw);
@ -2115,23 +2115,23 @@ void MeshGLTest::setInstanceCountBaseVertexBaseInstance() {
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
void MeshGLTest::addVertexBufferInstancedFloat() { void MeshGLTest::addVertexBufferInstancedFloat() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_instanced>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_instanced>())
CORRADE_SKIP(Extensions::GL::ARB::draw_instanced::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_instanced::string() + std::string(" is not available."));
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::instanced_arrays>()) if(!Context::current().isExtensionSupported<Extensions::ARB::instanced_arrays>())
CORRADE_SKIP(Extensions::GL::ARB::instanced_arrays::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::instanced_arrays::string() + std::string(" is not available."));
#elif defined(MAGNUM_TARGET_GLES2) #elif defined(MAGNUM_TARGET_GLES2)
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
if(!Context::current().isExtensionSupported<Extensions::GL::ANGLE::instanced_arrays>() && if(!Context::current().isExtensionSupported<Extensions::ANGLE::instanced_arrays>() &&
!Context::current().isExtensionSupported<Extensions::GL::EXT::instanced_arrays>() && !Context::current().isExtensionSupported<Extensions::EXT::instanced_arrays>() &&
!Context::current().isExtensionSupported<Extensions::GL::NV::instanced_arrays>()) !Context::current().isExtensionSupported<Extensions::NV::instanced_arrays>())
CORRADE_SKIP("Required instancing extension is not available."); CORRADE_SKIP("Required instancing extension is not available.");
if(!Context::current().isExtensionSupported<Extensions::GL::ANGLE::instanced_arrays>() && if(!Context::current().isExtensionSupported<Extensions::ANGLE::instanced_arrays>() &&
!Context::current().isExtensionSupported<Extensions::GL::EXT::draw_instanced>() && !Context::current().isExtensionSupported<Extensions::EXT::draw_instanced>() &&
!Context::current().isExtensionSupported<Extensions::GL::NV::draw_instanced>()) !Context::current().isExtensionSupported<Extensions::NV::draw_instanced>())
CORRADE_SKIP("Required drawing extension is not available."); CORRADE_SKIP("Required drawing extension is not available.");
#else #else
if(!Context::current().isExtensionSupported<Extensions::GL::ANGLE::instanced_arrays>()) if(!Context::current().isExtensionSupported<Extensions::ANGLE::instanced_arrays>())
CORRADE_SKIP(Extensions::GL::ANGLE::instanced_arrays::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ANGLE::instanced_arrays::string() + std::string(" is not available."));
#endif #endif
#endif #endif
@ -2169,12 +2169,12 @@ void MeshGLTest::addVertexBufferInstancedFloat() {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
void MeshGLTest::addVertexBufferInstancedInteger() { void MeshGLTest::addVertexBufferInstancedInteger() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_instanced>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_instanced>())
CORRADE_SKIP(Extensions::GL::ARB::draw_instanced::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_instanced::string() + std::string(" is not available."));
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::instanced_arrays>()) if(!Context::current().isExtensionSupported<Extensions::ARB::instanced_arrays>())
CORRADE_SKIP(Extensions::GL::ARB::instanced_arrays::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::instanced_arrays::string() + std::string(" is not available."));
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::gpu_shader4>()) if(!Context::current().isExtensionSupported<Extensions::EXT::gpu_shader4>())
CORRADE_SKIP(Extensions::GL::EXT::gpu_shader4::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::EXT::gpu_shader4::string() + std::string(" is not available."));
#endif #endif
typedef Attribute<0, UnsignedInt> Attribute; typedef Attribute<0, UnsignedInt> Attribute;
@ -2205,12 +2205,12 @@ void MeshGLTest::addVertexBufferInstancedInteger() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void MeshGLTest::addVertexBufferInstancedDouble() { void MeshGLTest::addVertexBufferInstancedDouble() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_instanced>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_instanced>())
CORRADE_SKIP(Extensions::GL::ARB::draw_instanced::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_instanced::string() + std::string(" is not available."));
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::instanced_arrays>()) if(!Context::current().isExtensionSupported<Extensions::ARB::instanced_arrays>())
CORRADE_SKIP(Extensions::GL::ARB::instanced_arrays::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::instanced_arrays::string() + std::string(" is not available."));
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::vertex_attrib_64bit>()) if(!Context::current().isExtensionSupported<Extensions::ARB::vertex_attrib_64bit>())
CORRADE_SKIP(Extensions::GL::ARB::vertex_attrib_64bit::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::vertex_attrib_64bit::string() + std::string(" is not available."));
typedef Attribute<0, Double> Attribute; typedef Attribute<0, Double> Attribute;
@ -2290,8 +2290,8 @@ template<class T> T MultiChecker::get(PixelFormat format, PixelType type) {
void MeshGLTest::multiDraw() { void MeshGLTest::multiDraw() {
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL) #if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::multi_draw_arrays>()) if(!Context::current().isExtensionSupported<Extensions::EXT::multi_draw_arrays>())
Debug() << Extensions::GL::EXT::multi_draw_arrays::string() << "not supported, using fallback implementation"; Debug() << Extensions::EXT::multi_draw_arrays::string() << "not supported, using fallback implementation";
#endif #endif
typedef Attribute<0, Float> Attribute; typedef Attribute<0, Float> Attribute;
@ -2314,8 +2314,8 @@ void MeshGLTest::multiDraw() {
void MeshGLTest::multiDrawIndexed() { void MeshGLTest::multiDrawIndexed() {
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL) #if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::multi_draw_arrays>()) if(!Context::current().isExtensionSupported<Extensions::EXT::multi_draw_arrays>())
Debug() << Extensions::GL::EXT::multi_draw_arrays::string() << "not supported, using fallback implementation"; Debug() << Extensions::EXT::multi_draw_arrays::string() << "not supported, using fallback implementation";
#endif #endif
Buffer vertices; Buffer vertices;
@ -2340,8 +2340,8 @@ void MeshGLTest::multiDrawIndexed() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void MeshGLTest::multiDrawBaseVertex() { void MeshGLTest::multiDrawBaseVertex() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::draw_elements_base_vertex>()) if(!Context::current().isExtensionSupported<Extensions::ARB::draw_elements_base_vertex>())
CORRADE_SKIP(Extensions::GL::ARB::draw_elements_base_vertex::string() + std::string(" is not available.")); CORRADE_SKIP(Extensions::ARB::draw_elements_base_vertex::string() + std::string(" is not available."));
Buffer vertices; Buffer vertices;
vertices.setData(indexedVertexDataBaseVertex, BufferUsage::StaticDraw); vertices.setData(indexedVertexDataBaseVertex, BufferUsage::StaticDraw);

2
src/Magnum/GL/Texture.cpp

@ -52,7 +52,7 @@ template MAGNUM_GL_EXPORT Vector2i maxTextureSize<2>();
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
template<> MAGNUM_GL_EXPORT Vector3i maxTextureSize<3>() { template<> MAGNUM_GL_EXPORT Vector3i maxTextureSize<3>() {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
if(!Context::current().isExtensionSupported<Extensions::GL::OES::texture_3D>()) if(!Context::current().isExtensionSupported<Extensions::OES::texture_3D>())
return {}; return {};
#endif #endif
return {Vector2i(Implementation::maxTextureSideSize()), Implementation::max3DTextureDepth()}; return {Vector2i(Implementation::maxTextureSideSize()), Implementation::max3DTextureDepth()};

2
src/Magnum/GL/TextureArray.cpp

@ -45,7 +45,7 @@ namespace {
template<UnsignedInt dimensions> VectorTypeFor<dimensions+1, Int> TextureArray<dimensions>::maxSize() { template<UnsignedInt dimensions> VectorTypeFor<dimensions+1, Int> TextureArray<dimensions>::maxSize() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::texture_array>()) if(!Context::current().isExtensionSupported<Extensions::EXT::texture_array>())
return {}; return {};
#endif #endif

10
src/Magnum/GL/TransformFeedback.cpp

@ -42,7 +42,7 @@ namespace Magnum { namespace GL {
Int TransformFeedback::maxInterleavedComponents() { Int TransformFeedback::maxInterleavedComponents() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::transform_feedback>()) if(!Context::current().isExtensionSupported<Extensions::EXT::transform_feedback>())
return 0; return 0;
#endif #endif
@ -56,7 +56,7 @@ Int TransformFeedback::maxInterleavedComponents() {
Int TransformFeedback::maxSeparateAttributes() { Int TransformFeedback::maxSeparateAttributes() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::transform_feedback>()) if(!Context::current().isExtensionSupported<Extensions::EXT::transform_feedback>())
return 0; return 0;
#endif #endif
@ -70,7 +70,7 @@ Int TransformFeedback::maxSeparateAttributes() {
Int TransformFeedback::maxSeparateComponents() { Int TransformFeedback::maxSeparateComponents() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::transform_feedback>()) if(!Context::current().isExtensionSupported<Extensions::EXT::transform_feedback>())
return 0; return 0;
#endif #endif
@ -84,7 +84,7 @@ Int TransformFeedback::maxSeparateComponents() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
Int TransformFeedback::maxBuffers() { Int TransformFeedback::maxBuffers() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::transform_feedback3>()) if(!Context::current().isExtensionSupported<Extensions::ARB::transform_feedback3>())
return maxSeparateAttributes(); return maxSeparateAttributes();
GLint& value = Context::current().state().transformFeedback->maxBuffers; GLint& value = Context::current().state().transformFeedback->maxBuffers;
@ -96,7 +96,7 @@ Int TransformFeedback::maxBuffers() {
} }
Int TransformFeedback::maxVertexStreams() { Int TransformFeedback::maxVertexStreams() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::transform_feedback3>()) if(!Context::current().isExtensionSupported<Extensions::ARB::transform_feedback3>())
return 1; return 1;
GLint& value = Context::current().state().transformFeedback->maxVertexStreams; GLint& value = Context::current().state().transformFeedback->maxVertexStreams;

Loading…
Cancel
Save