@ -87,6 +87,7 @@ const std::vector<Extension>& Extension::extensions(Version version) {
_extension ( GL , ARB , pipeline_statistics_query ) ,
_extension ( GL , ARB , sparse_buffer ) ,
_extension ( GL , ARB , transform_feedback_overflow_query ) ,
_extension ( GL , ARB , ES3_2_compatibility ) ,
_extension ( GL , ATI , texture_mirror_once ) ,
_extension ( GL , EXT , texture_filter_anisotropic ) ,
_extension ( GL , EXT , texture_compression_s3tc ) ,
@ -235,10 +236,12 @@ const std::vector<Extension>& Extension::extensions(Version version) {
static const std : : vector < Extension > extensions {
_extension ( GL , EXT , texture_filter_anisotropic ) ,
_extension ( GL , EXT , disjoint_timer_query ) ,
_extension ( GL , EXT , color_buffer_float ) ,
_extension ( GL , WEBGL , compressed_texture_s3tc ) } ;
# ifdef MAGNUM_TARGET_GLES2
static const std : : vector < Extension > extensionsES300 {
_extension ( GL , ANGLE , instanced_arrays ) ,
_extension ( GL , EXT , color_buffer_half_float ) ,
_extension ( GL , EXT , sRGB ) ,
_extension ( GL , EXT , blend_minmax ) ,
_extension ( GL , EXT , shader_texture_lod ) ,
@ -251,6 +254,7 @@ const std::vector<Extension>& Extension::extensions(Version version) {
_extension ( GL , OES , texture_half_float_linear ) ,
_extension ( GL , OES , fbo_render_mipmap ) ,
_extension ( GL , WEBGL , depth_texture ) ,
_extension ( GL , WEBGL , color_buffer_float ) ,
_extension ( GL , WEBGL , draw_buffers ) } ;
# endif
# else
@ -267,6 +271,9 @@ const std::vector<Extension>& Extension::extensions(Version version) {
_extension ( GL , EXT , multi_draw_arrays ) ,
_extension ( GL , EXT , debug_label ) ,
_extension ( GL , EXT , debug_marker ) ,
_extension ( GL , EXT , separate_shader_objects ) ,
_extension ( GL , EXT , multisampled_render_to_texture ) ,
_extension ( GL , EXT , robustness ) ,
_extension ( GL , EXT , shader_framebuffer_fetch ) ,
_extension ( GL , EXT , disjoint_timer_query ) ,
_extension ( GL , EXT , texture_sRGB_decode ) ,
@ -274,31 +281,9 @@ const std::vector<Extension>& Extension::extensions(Version version) {
_extension ( GL , EXT , texture_compression_s3tc ) ,
# ifndef MAGNUM_TARGET_GLES2
_extension ( GL , EXT , shader_integer_mix ) ,
_extension ( GL , EXT , copy_image ) ,
# endif
_extension ( GL , EXT , draw_buffers_indexed ) ,
# ifndef MAGNUM_TARGET_GLES2
_extension ( GL , EXT , geometry_shader ) ,
_extension ( GL , EXT , gpu_shader5 ) ,
_extension ( GL , EXT , shader_io_blocks ) ,
_extension ( GL , EXT , tessellation_shader ) ,
# endif
_extension ( GL , EXT , texture_border_clamp ) ,
# ifndef MAGNUM_TARGET_GLES2
_extension ( GL , EXT , texture_buffer ) ,
_extension ( GL , EXT , texture_cube_map_array ) ,
_extension ( GL , EXT , primitive_bounding_box ) ,
# endif
_extension ( GL , EXT , separate_shader_objects ) ,
_extension ( GL , EXT , multisampled_render_to_texture ) ,
_extension ( GL , EXT , robustness ) ,
_extension ( GL , KHR , texture_compression_astc_ldr ) ,
_extension ( GL , KHR , texture_compression_astc_hdr ) ,
_extension ( GL , KHR , debug ) ,
_extension ( GL , KHR , blend_equation_advanced ) ,
_extension ( GL , KHR , blend_equation_advanced_coherent ) ,
_extension ( GL , KHR , robustness ) ,
_extension ( GL , KHR , robust_buffer_access_behavior ) ,
_extension ( GL , KHR , context_flush_control ) ,
_extension ( GL , KHR , no_error ) ,
_extension ( GL , NV , read_buffer_front ) ,
@ -313,18 +298,7 @@ const std::vector<Extension>& Extension::extensions(Version version) {
_extension ( GL , OES , depth32 ) ,
_extension ( GL , OES , mapbuffer ) ,
_extension ( GL , OES , stencil1 ) ,
_extension ( GL , OES , stencil4 ) ,
# ifndef MAGNUM_TARGET_GLES2
_extension ( GL , OES , sample_shading ) ,
_extension ( GL , OES , sample_variables ) ,
_extension ( GL , OES , shader_image_atomic ) ,
_extension ( GL , OES , shader_multisample_interpolation ) ,
# endif
_extension ( GL , OES , texture_stencil8 ) ,
# ifndef MAGNUM_TARGET_GLES2
_extension ( GL , OES , texture_storage_multisample_2d_array )
# endif
} ;
_extension ( GL , OES , stencil4 ) } ;
# ifdef MAGNUM_TARGET_GLES2
static const std : : vector < Extension > extensionsES300 {
_extension ( GL , ANGLE , framebuffer_blit ) ,
@ -376,6 +350,41 @@ const std::vector<Extension>& Extension::extensions(Version version) {
_extension ( GL , OES , required_internalformat ) ,
_extension ( GL , OES , surfaceless_context ) } ;
# endif
static const std : : vector < Extension > extensionsES320 {
_extension ( GL , EXT , color_buffer_half_float ) ,
# ifndef MAGNUM_TARGET_GLES2
_extension ( GL , EXT , color_buffer_float ) ,
_extension ( GL , EXT , copy_image ) ,
# endif
_extension ( GL , EXT , draw_buffers_indexed ) ,
# ifndef MAGNUM_TARGET_GLES2
_extension ( GL , EXT , geometry_shader ) ,
_extension ( GL , EXT , gpu_shader5 ) ,
_extension ( GL , EXT , shader_io_blocks ) ,
_extension ( GL , EXT , tessellation_shader ) ,
# endif
_extension ( GL , EXT , texture_border_clamp ) ,
# ifndef MAGNUM_TARGET_GLES2
_extension ( GL , EXT , texture_buffer ) ,
_extension ( GL , EXT , texture_cube_map_array ) ,
_extension ( GL , EXT , primitive_bounding_box ) ,
# endif
_extension ( GL , KHR , texture_compression_astc_ldr ) ,
_extension ( GL , KHR , debug ) ,
_extension ( GL , KHR , blend_equation_advanced ) ,
_extension ( GL , KHR , robustness ) ,
_extension ( GL , KHR , robust_buffer_access_behavior ) ,
# ifndef MAGNUM_TARGET_GLES2
_extension ( GL , OES , sample_shading ) ,
_extension ( GL , OES , sample_variables ) ,
_extension ( GL , OES , shader_image_atomic ) ,
_extension ( GL , OES , shader_multisample_interpolation ) ,
# endif
_extension ( GL , OES , texture_stencil8 ) ,
# ifndef MAGNUM_TARGET_GLES2
_extension ( GL , OES , texture_storage_multisample_2d_array )
# endif
} ;
# endif
# undef _extension
@ -395,7 +404,8 @@ const std::vector<Extension>& Extension::extensions(Version version) {
case Version : : GL450 : return extensions450 ;
case Version : : GLES200 :
case Version : : GLES300 :
case Version : : GLES310 : return empty ;
case Version : : GLES310 :
case Version : : GLES320 : return empty ;
# else
case Version : : GLES200 : return empty ;
case Version : : GLES300 :
@ -406,6 +416,7 @@ const std::vector<Extension>& Extension::extensions(Version version) {
# endif
# ifndef MAGNUM_TARGET_WEBGL
case Version : : GLES310 : return empty ;
case Version : : GLES320 : return extensionsES320 ;
# endif
# endif
}
@ -612,6 +623,7 @@ bool Context::tryCreate() {
Version : : GLES300 ,
# ifndef MAGNUM_TARGET_WEBGL
Version : : GLES310 ,
Version : : GLES320 ,
# endif
# endif
Version : : None
@ -813,6 +825,8 @@ bool Context::isVersionSupported(Version version) const {
return isExtensionSupported < Extensions : : GL : : ARB : : ES3_compatibility > ( ) ;
if ( version = = Version : : GLES310 )
return isExtensionSupported < Extensions : : GL : : ARB : : ES3_1_compatibility > ( ) ;
if ( version = = Version : : GLES320 )
return isExtensionSupported < Extensions : : GL : : ARB : : ES3_2_compatibility > ( ) ;
# endif
return _version > = version ;