Browse Source

GL: expose AMD_sample_positions and NV_sample_locations.

No wrapping yet, just recognize the extensions and load entrypoints.
pull/449/head
Vladimír Vondruš 6 years ago
parent
commit
4b24a27a88
  1. 4
      doc/changelog.dox
  2. 3
      doc/opengl-support.dox
  3. 3
      src/Magnum/GL/Context.cpp
  4. 15
      src/Magnum/GL/Extensions.h
  5. 2
      src/MagnumExternal/OpenGL/GL/extensions.txt
  6. 8
      src/MagnumExternal/OpenGL/GL/flextGL.cpp
  7. 35
      src/MagnumExternal/OpenGL/GL/flextGL.h
  8. 8
      src/MagnumExternal/OpenGL/GL/flextGLPlatform.cpp
  9. 1
      src/MagnumExternal/OpenGL/GLES2/extensions.txt
  10. 23
      src/MagnumExternal/OpenGL/GLES2/flextGL.h
  11. 5
      src/MagnumExternal/OpenGL/GLES2/flextGLPlatform.cpp
  12. 10
      src/MagnumExternal/OpenGL/GLES2/flextGLPlatformIOS.cpp
  13. 5
      src/MagnumExternal/OpenGL/GLES2/flextGLPlatformWindowsDesktop.cpp
  14. 23
      src/MagnumExternal/OpenGL/GLES2/flextGLWindowsDesktop.h
  15. 1
      src/MagnumExternal/OpenGL/GLES3/extensions.txt
  16. 23
      src/MagnumExternal/OpenGL/GLES3/flextGL.h
  17. 5
      src/MagnumExternal/OpenGL/GLES3/flextGLPlatform.cpp
  18. 10
      src/MagnumExternal/OpenGL/GLES3/flextGLPlatformIOS.cpp
  19. 5
      src/MagnumExternal/OpenGL/GLES3/flextGLPlatformWindowsDesktop.cpp
  20. 23
      src/MagnumExternal/OpenGL/GLES3/flextGLWindowsDesktop.h

4
doc/changelog.dox

@ -87,7 +87,9 @@ See also:
@gl_extension{OVR,multiview2} extensions and the WebGL
@webgl_extension{OVR,multiview2} extension. See also
[mosra/magnum#385](https://github.com/mosra/magnum/issues/385).
- @gl_extension{ARB,sample_locations} desktop extension
- @gl_extension{ARB,sample_locations} and
@gl_extension{AMD,sample_positions} desktop extensions;
@gl_extension{NV,sample_locations} desktop and ES extension
- Implemented @gl_extension{EXT,draw_buffers2},
@gl_extension{ARB,draw_buffers_blend} desktop extensions,
@gl_extension{EXT,draw_buffers_indexed} ES extension and

3
doc/opengl-support.dox

@ -309,6 +309,7 @@ Extension | Status
Extension | Status
------------------------------------------- | ------
@gl_extension{AMD,transform_feedback3_lines_triangles} | done (nothing to do)
@gl_extension{AMD,sample_positions} | |
@gl_extension{AMD,vertex_shader_layer} | done (shading language only)
@gl_extension{AMD,shader_trinary_minmax} | done (shading language only)
@gl_extension{AMD,shader_explicit_vertex_parameter} | done (shading language only)
@ -323,6 +324,7 @@ Extension | Status
@gl_extension{EXT,debug_marker} | done
@gl_extension{EXT,sRGB_R8} | done
@gl_extension{GREMEDY,string_marker} | done
@gl_extension{NV,sample_locations} | |
@gl_extension{NV,fragment_shader_barycentric} | done (shading language only)
@gl_extension{OVR,multiview} | |
@gl_extension{OVR,multiview2} | |
@ -487,6 +489,7 @@ Extension | Status
@gl_extension{NV,read_depth_stencil} | done
@gl_extension{NV,texture_border_clamp} | done
@gl_extension{NV,shader_noperspective_interpolation} | done (shading language only)
@gl_extension{NV,sample_locations} | |
@gl_extension{NV,polygon_mode} | done
@gl_extension{OES,depth32} | done
@gl_extension{OES,mapbuffer} | done

3
src/Magnum/GL/Context.cpp

@ -78,6 +78,7 @@ namespace {
#ifndef MAGNUM_TARGET_GLES
constexpr Extension ExtensionList[]{
_extension(AMD,transform_feedback3_lines_triangles),
_extension(AMD,sample_positions),
_extension(AMD,vertex_shader_layer),
_extension(AMD,shader_trinary_minmax),
_extension(AMD,shader_explicit_vertex_parameter),
@ -108,6 +109,7 @@ constexpr Extension ExtensionList[]{
_extension(KHR,blend_equation_advanced),
_extension(KHR,blend_equation_advanced_coherent),
_extension(KHR,texture_compression_astc_sliced_3d),
_extension(NV,sample_locations),
_extension(NV,fragment_shader_barycentric),
_extension(OVR,multiview),
_extension(OVR,multiview2)};
@ -355,6 +357,7 @@ constexpr Extension ExtensionList[]{
#ifndef MAGNUM_TARGET_GLES2
_extension(NV,shader_noperspective_interpolation),
#endif
_extension(NV,sample_locations),
_extension(NV,polygon_mode),
#ifndef MAGNUM_TARGET_GLES2
_extension(NV,fragment_shader_barycentric),

15
src/Magnum/GL/Extensions.h

@ -90,9 +90,10 @@ namespace Extensions {
#ifndef MAGNUM_TARGET_GLES
namespace AMD {
_extension( 0,AMD,transform_feedback3_lines_triangles, GL210, None) // #397
_extension( 1,AMD,vertex_shader_layer, GL210, None) // #417
_extension( 2,AMD,shader_trinary_minmax, GL210, None) // #428
_extension( 3,AMD,shader_explicit_vertex_parameter, GL210, None) // #485
_extension( 1,AMD,sample_positions, GL210, None) // #405
_extension( 2,AMD,vertex_shader_layer, GL210, None) // #417
_extension( 3,AMD,shader_trinary_minmax, GL210, None) // #428
_extension( 4,AMD,shader_explicit_vertex_parameter, GL210, None) // #485
} namespace ARB {
_extension( 10,ARB,texture_rectangle, GL210, GL310) // #38
_extension( 11,ARB,color_buffer_float, GL210, GL300) // #39
@ -259,7 +260,8 @@ namespace AMD {
_extension(176,NV,depth_buffer_float, GL210, GL300) // #334
_extension(177,NV,conditional_render, GL210, GL300) // #346
/* NV_draw_texture not supported */ // #430
_extension(178,NV,fragment_shader_barycentric, GL450, None) // #526
_extension(178,NV,sample_locations, GL210, None) // #472
_extension(179,NV,fragment_shader_barycentric, GL450, None) // #526
} namespace OVR {
_extension(185,OVR,multiview, GL300, None) // #478
_extension(186,OVR,multiview2, GL300, None) // #479
@ -480,9 +482,10 @@ namespace ANDROID {
#ifndef MAGNUM_TARGET_GLES2
_extension( 95,NV,shader_noperspective_interpolation, GLES300, None) // #201
#endif
_extension( 96,NV,polygon_mode, GLES200, None) // #238
_extension( 96,NV,sample_locations, GLES200, None) // #235
_extension( 97,NV,polygon_mode, GLES200, None) // #238
#ifndef MAGNUM_TARGET_GLES2
_extension( 97,NV,fragment_shader_barycentric, GLES320, None) // #316
_extension( 98,NV,fragment_shader_barycentric, GLES320, None) // #316
#endif
} namespace OES {
#ifdef MAGNUM_TARGET_GLES2

2
src/MagnumExternal/OpenGL/GL/extensions.txt vendored

@ -9,6 +9,7 @@ version 4.6 core
extension EXT_texture_sRGB optional
extension AMD_transform_feedback3_lines_triangles optional
extension AMD_sample_positions optional
extension AMD_vertex_shader_layer optional
extension AMD_shader_trinary_minmax optional
extension AMD_shader_explicit_vertex_parameter optional
@ -39,6 +40,7 @@ extension KHR_texture_compression_astc_ldr optional
extension KHR_blend_equation_advanced optional
extension KHR_blend_equation_advanced_coherent optional
# extension KHR_texture_compression_astc_sliced_3d optional
extension NV_sample_locations optional
extension NV_fragment_shader_barycentric optional
extension OVR_multiview optional
extension OVR_multiview2 optional

8
src/MagnumExternal/OpenGL/GL/flextGL.cpp vendored

@ -157,6 +157,9 @@ extern void APIENTRY glTexSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsiz
FlextGL flextGL{
/* GL_AMD_sample_positions */
nullptr,
/* GL_ARB_ES3_2_compatibility */
nullptr,
@ -219,6 +222,11 @@ FlextGL flextGL{
/* GL_KHR_blend_equation_advanced */
nullptr,
/* GL_NV_sample_locations */
nullptr,
nullptr,
nullptr,
/* GL_OVR_multiview */
nullptr,

35
src/MagnumExternal/OpenGL/GL/flextGL.h vendored

@ -1612,6 +1612,10 @@ typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
/* GL_AMD_sample_positions */
#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F
/* GL_ARB_robustness */
#define GL_NO_ERROR 0
@ -1766,6 +1770,17 @@ typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum
#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285
/* GL_NV_sample_locations */
#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E
#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F
#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340
#define GL_SAMPLE_LOCATION_NV 0x8E50
#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341
#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342
#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343
/* GL_OVR_multiview */
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630
@ -1781,6 +1796,10 @@ typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum
why those functions aren't listed as direct prototypes. */
struct FlextGL {
/* GL_AMD_sample_positions */
void(APIENTRY *SetMultisamplefvAMD)(GLenum, GLuint, const GLfloat *);
/* GL_ARB_ES3_2_compatibility */
void(APIENTRY *PrimitiveBoundingBoxARB)(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
@ -1854,6 +1873,12 @@ struct FlextGL {
void(APIENTRY *BlendBarrierKHR)(void);
/* GL_NV_sample_locations */
void(APIENTRY *FramebufferSampleLocationsfvNV)(GLenum, GLuint, GLsizei, const GLfloat *);
void(APIENTRY *NamedFramebufferSampleLocationsfvNV)(GLuint, GLuint, GLsizei, const GLfloat *);
void(APIENTRY *ResolveDepthValuesNV)(void);
/* GL_OVR_multiview */
void(APIENTRY *FramebufferTextureMultiviewOVR)(GLenum, GLenum, GLuint, GLint, GLint, GLsizei);
@ -2575,6 +2600,10 @@ struct FlextGL {
extern FLEXTGL_EXPORT FlextGL flextGL;
/* GL_AMD_sample_positions */
#define glSetMultisamplefvAMD flextGL.SetMultisamplefvAMD
/* GL_ARB_ES3_2_compatibility */
#define glPrimitiveBoundingBoxARB flextGL.PrimitiveBoundingBoxARB
@ -2648,6 +2677,12 @@ extern FLEXTGL_EXPORT FlextGL flextGL;
#define glBlendBarrierKHR flextGL.BlendBarrierKHR
/* GL_NV_sample_locations */
#define glFramebufferSampleLocationsfvNV flextGL.FramebufferSampleLocationsfvNV
#define glNamedFramebufferSampleLocationsfvNV flextGL.NamedFramebufferSampleLocationsfvNV
#define glResolveDepthValuesNV flextGL.ResolveDepthValuesNV
/* GL_OVR_multiview */
#define glFramebufferTextureMultiviewOVR flextGL.FramebufferTextureMultiviewOVR

8
src/MagnumExternal/OpenGL/GL/flextGLPlatform.cpp vendored

@ -118,6 +118,9 @@ void flextGLInit(Magnum::GL::Context& context) {
static_cast<void>(context);
#endif
/* GL_AMD_sample_positions */
flextGL.SetMultisamplefvAMD = reinterpret_cast<void(APIENTRY*)(GLenum, GLuint, const GLfloat *)>(loader.load("glSetMultisamplefvAMD"));
/* GL_ARB_ES3_2_compatibility */
flextGL.PrimitiveBoundingBoxARB = reinterpret_cast<void(APIENTRY*)(GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat)>(loader.load("glPrimitiveBoundingBoxARB"));
@ -180,6 +183,11 @@ void flextGLInit(Magnum::GL::Context& context) {
/* GL_KHR_blend_equation_advanced */
flextGL.BlendBarrierKHR = reinterpret_cast<void(APIENTRY*)(void)>(loader.load("glBlendBarrierKHR"));
/* GL_NV_sample_locations */
flextGL.FramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLenum, GLuint, GLsizei, const GLfloat *)>(loader.load("glFramebufferSampleLocationsfvNV"));
flextGL.NamedFramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLuint, GLuint, GLsizei, const GLfloat *)>(loader.load("glNamedFramebufferSampleLocationsfvNV"));
flextGL.ResolveDepthValuesNV = reinterpret_cast<void(APIENTRY*)(void)>(loader.load("glResolveDepthValuesNV"));
/* GL_OVR_multiview */
flextGL.FramebufferTextureMultiviewOVR = reinterpret_cast<void(APIENTRY*)(GLenum, GLenum, GLuint, GLint, GLint, GLsizei)>(loader.load("glFramebufferTextureMultiviewOVR"));

1
src/MagnumExternal/OpenGL/GLES2/extensions.txt vendored

@ -102,6 +102,7 @@ extension NV_read_depth optional
extension NV_read_stencil optional
extension NV_read_depth_stencil optional
extension NV_texture_border_clamp optional
extension NV_sample_locations optional
extension NV_polygon_mode optional
extension OES_depth32 optional
extension OES_mapbuffer optional

23
src/MagnumExternal/OpenGL/GLES2/flextGL.h vendored

@ -1033,6 +1033,17 @@ typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLen
#define GL_TEXTURE_BORDER_COLOR_NV 0x1004
#define GL_CLAMP_TO_BORDER_NV 0x812D
/* GL_NV_sample_locations */
#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E
#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F
#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340
#define GL_SAMPLE_LOCATION_NV 0x8E50
#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341
#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342
#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343
/* GL_NV_polygon_mode */
#define GL_POLYGON_MODE_NV 0x0B40
@ -1416,6 +1427,12 @@ struct FlextGL {
void(APIENTRY *ReadBufferNV)(GLenum);
/* GL_NV_sample_locations */
void(APIENTRY *FramebufferSampleLocationsfvNV)(GLenum, GLuint, GLsizei, const GLfloat *);
void(APIENTRY *NamedFramebufferSampleLocationsfvNV)(GLuint, GLuint, GLsizei, const GLfloat *);
void(APIENTRY *ResolveDepthValuesNV)(void);
/* GL_OES_mapbuffer */
void(APIENTRY *GetBufferPointervOES)(GLenum, GLenum, void **);
@ -1644,6 +1661,12 @@ extern FLEXTGL_EXPORT FlextGL flextGL;
#define glReadBufferNV flextGL.ReadBufferNV
/* GL_NV_sample_locations */
#define glFramebufferSampleLocationsfvNV flextGL.FramebufferSampleLocationsfvNV
#define glNamedFramebufferSampleLocationsfvNV flextGL.NamedFramebufferSampleLocationsfvNV
#define glResolveDepthValuesNV flextGL.ResolveDepthValuesNV
/* GL_OES_mapbuffer */
#define glGetBufferPointervOES flextGL.GetBufferPointervOES

5
src/MagnumExternal/OpenGL/GLES2/flextGLPlatform.cpp vendored

@ -206,6 +206,11 @@ void flextGLInit(Magnum::GL::Context&) {
/* GL_NV_read_buffer */
flextGL.ReadBufferNV = reinterpret_cast<void(APIENTRY*)(GLenum)>(loader.load("glReadBufferNV"));
/* GL_NV_sample_locations */
flextGL.FramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLenum, GLuint, GLsizei, const GLfloat *)>(loader.load("glFramebufferSampleLocationsfvNV"));
flextGL.NamedFramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLuint, GLuint, GLsizei, const GLfloat *)>(loader.load("glNamedFramebufferSampleLocationsfvNV"));
flextGL.ResolveDepthValuesNV = reinterpret_cast<void(APIENTRY*)(void)>(loader.load("glResolveDepthValuesNV"));
/* GL_OES_mapbuffer */
flextGL.GetBufferPointervOES = reinterpret_cast<void(APIENTRY*)(GLenum, GLenum, void **)>(loader.load("glGetBufferPointervOES"));
flextGL.MapBufferOES = reinterpret_cast<void *(APIENTRY*)(GLenum, GLenum)>(loader.load("glMapBufferOES"));

10
src/MagnumExternal/OpenGL/GLES2/flextGLPlatformIOS.cpp vendored

@ -138,6 +138,9 @@
#undef glVertexAttribDivisorNV
#undef glPolygonModeNV
#undef glReadBufferNV
#undef glFramebufferSampleLocationsfvNV
#undef glNamedFramebufferSampleLocationsfvNV
#undef glResolveDepthValuesNV
#undef glGetBufferPointervOES
#undef glMapBufferOES
#undef glUnmapBufferOES
@ -392,6 +395,13 @@ void flextGLInit(Magnum::GL::Context&) {
flextGL.ReadBufferNV = reinterpret_cast<void(APIENTRY*)(GLenum)>(glReadBufferNV);
#endif
/* GL_NV_sample_locations */
#if GL_NV_sample_locations
flextGL.FramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLenum, GLuint, GLsizei, const GLfloat *)>(glFramebufferSampleLocationsfvNV);
flextGL.NamedFramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLuint, GLuint, GLsizei, const GLfloat *)>(glNamedFramebufferSampleLocationsfvNV);
flextGL.ResolveDepthValuesNV = reinterpret_cast<void(APIENTRY*)(void)>(glResolveDepthValuesNV);
#endif
/* GL_OES_mapbuffer */
#if GL_OES_mapbuffer
flextGL.GetBufferPointervOES = reinterpret_cast<void(APIENTRY*)(GLenum, GLenum, void **)>(glGetBufferPointervOES);

5
src/MagnumExternal/OpenGL/GLES2/flextGLPlatformWindowsDesktop.cpp vendored

@ -305,6 +305,11 @@ void flextGLInit(Magnum::GL::Context&) {
/* GL_NV_read_buffer */
flextGL.ReadBufferNV = reinterpret_cast<void(APIENTRY*)(GLenum)>(loader.load("glReadBufferNV"));
/* GL_NV_sample_locations */
flextGL.FramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLenum, GLuint, GLsizei, const GLfloat *)>(loader.load("glFramebufferSampleLocationsfvNV"));
flextGL.NamedFramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLuint, GLuint, GLsizei, const GLfloat *)>(loader.load("glNamedFramebufferSampleLocationsfvNV"));
flextGL.ResolveDepthValuesNV = reinterpret_cast<void(APIENTRY*)(void)>(loader.load("glResolveDepthValuesNV"));
/* GL_OES_mapbuffer */
flextGL.GetBufferPointervOES = reinterpret_cast<void(APIENTRY*)(GLenum, GLenum, void **)>(loader.load("glGetBufferPointervOES"));
flextGL.MapBufferOES = reinterpret_cast<void *(APIENTRY*)(GLenum, GLenum)>(loader.load("glMapBufferOES"));

23
src/MagnumExternal/OpenGL/GLES2/flextGLWindowsDesktop.h vendored

@ -1028,6 +1028,17 @@ typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLen
#define GL_TEXTURE_BORDER_COLOR_NV 0x1004
#define GL_CLAMP_TO_BORDER_NV 0x812D
/* GL_NV_sample_locations */
#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E
#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F
#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340
#define GL_SAMPLE_LOCATION_NV 0x8E50
#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341
#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342
#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343
/* GL_NV_polygon_mode */
#define GL_POLYGON_MODE_NV 0x0B40
@ -1415,6 +1426,12 @@ struct FlextGL {
void(APIENTRY *ReadBufferNV)(GLenum);
/* GL_NV_sample_locations */
void(APIENTRY *FramebufferSampleLocationsfvNV)(GLenum, GLuint, GLsizei, const GLfloat *);
void(APIENTRY *NamedFramebufferSampleLocationsfvNV)(GLuint, GLuint, GLsizei, const GLfloat *);
void(APIENTRY *ResolveDepthValuesNV)(void);
/* GL_OES_mapbuffer */
void(APIENTRY *GetBufferPointervOES)(GLenum, GLenum, void **);
@ -1743,6 +1760,12 @@ extern FLEXTGL_EXPORT FlextGL flextGL;
#define glReadBufferNV flextGL.ReadBufferNV
/* GL_NV_sample_locations */
#define glFramebufferSampleLocationsfvNV flextGL.FramebufferSampleLocationsfvNV
#define glNamedFramebufferSampleLocationsfvNV flextGL.NamedFramebufferSampleLocationsfvNV
#define glResolveDepthValuesNV flextGL.ResolveDepthValuesNV
/* GL_OES_mapbuffer */
#define glGetBufferPointervOES flextGL.GetBufferPointervOES

1
src/MagnumExternal/OpenGL/GLES3/extensions.txt vendored

@ -75,6 +75,7 @@ extension NV_read_stencil optional
extension NV_read_depth_stencil optional
extension NV_texture_border_clamp optional
extension NV_shader_noperspective_interpolation optional
extension NV_sample_locations optional
extension NV_polygon_mode optional
extension NV_fragment_shader_barycentric optional
extension OES_depth32 optional

23
src/MagnumExternal/OpenGL/GLES3/flextGL.h vendored

@ -1628,6 +1628,17 @@ typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLen
#define GL_TEXTURE_BORDER_COLOR_NV 0x1004
#define GL_CLAMP_TO_BORDER_NV 0x812D
/* GL_NV_sample_locations */
#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E
#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F
#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340
#define GL_SAMPLE_LOCATION_NV 0x8E50
#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341
#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342
#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343
/* GL_NV_polygon_mode */
#define GL_POLYGON_MODE_NV 0x0B40
@ -2207,6 +2218,12 @@ struct FlextGL {
void(APIENTRY *PolygonModeNV)(GLenum, GLenum);
/* GL_NV_sample_locations */
void(APIENTRY *FramebufferSampleLocationsfvNV)(GLenum, GLuint, GLsizei, const GLfloat *);
void(APIENTRY *NamedFramebufferSampleLocationsfvNV)(GLuint, GLuint, GLsizei, const GLfloat *);
void(APIENTRY *ResolveDepthValuesNV)(void);
/* GL_OES_mapbuffer */
void(APIENTRY *GetBufferPointervOES)(GLenum, GLenum, void **);
@ -2513,6 +2530,12 @@ extern FLEXTGL_EXPORT FlextGL flextGL;
#define glPolygonModeNV flextGL.PolygonModeNV
/* GL_NV_sample_locations */
#define glFramebufferSampleLocationsfvNV flextGL.FramebufferSampleLocationsfvNV
#define glNamedFramebufferSampleLocationsfvNV flextGL.NamedFramebufferSampleLocationsfvNV
#define glResolveDepthValuesNV flextGL.ResolveDepthValuesNV
/* GL_OES_mapbuffer */
#define glGetBufferPointervOES flextGL.GetBufferPointervOES

5
src/MagnumExternal/OpenGL/GLES3/flextGLPlatform.cpp vendored

@ -297,6 +297,11 @@ void flextGLInit(Magnum::GL::Context&) {
/* GL_NV_polygon_mode */
flextGL.PolygonModeNV = reinterpret_cast<void(APIENTRY*)(GLenum, GLenum)>(loader.load("glPolygonModeNV"));
/* GL_NV_sample_locations */
flextGL.FramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLenum, GLuint, GLsizei, const GLfloat *)>(loader.load("glFramebufferSampleLocationsfvNV"));
flextGL.NamedFramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLuint, GLuint, GLsizei, const GLfloat *)>(loader.load("glNamedFramebufferSampleLocationsfvNV"));
flextGL.ResolveDepthValuesNV = reinterpret_cast<void(APIENTRY*)(void)>(loader.load("glResolveDepthValuesNV"));
/* GL_OES_mapbuffer */
flextGL.GetBufferPointervOES = reinterpret_cast<void(APIENTRY*)(GLenum, GLenum, void **)>(loader.load("glGetBufferPointervOES"));
flextGL.MapBufferOES = reinterpret_cast<void *(APIENTRY*)(GLenum, GLenum)>(loader.load("glMapBufferOES"));

10
src/MagnumExternal/OpenGL/GLES3/flextGLPlatformIOS.cpp vendored

@ -135,6 +135,9 @@
#undef glGetnUniformuivKHR
#undef glReadnPixelsKHR
#undef glPolygonModeNV
#undef glFramebufferSampleLocationsfvNV
#undef glNamedFramebufferSampleLocationsfvNV
#undef glResolveDepthValuesNV
#undef glGetBufferPointervOES
#undef glMapBufferOES
#undef glUnmapBufferOES
@ -332,6 +335,13 @@ void flextGLInit(Magnum::GL::Context&) {
flextGL.PolygonModeNV = reinterpret_cast<void(APIENTRY*)(GLenum, GLenum)>(glPolygonModeNV);
#endif
/* GL_NV_sample_locations */
#if GL_NV_sample_locations
flextGL.FramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLenum, GLuint, GLsizei, const GLfloat *)>(glFramebufferSampleLocationsfvNV);
flextGL.NamedFramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLuint, GLuint, GLsizei, const GLfloat *)>(glNamedFramebufferSampleLocationsfvNV);
flextGL.ResolveDepthValuesNV = reinterpret_cast<void(APIENTRY*)(void)>(glResolveDepthValuesNV);
#endif
/* GL_OES_mapbuffer */
#if GL_OES_mapbuffer
flextGL.GetBufferPointervOES = reinterpret_cast<void(APIENTRY*)(GLenum, GLenum, void **)>(glGetBufferPointervOES);

5
src/MagnumExternal/OpenGL/GLES3/flextGLPlatformWindowsDesktop.cpp vendored

@ -499,6 +499,11 @@ void flextGLInit(Magnum::GL::Context&) {
/* GL_NV_polygon_mode */
flextGL.PolygonModeNV = reinterpret_cast<void(APIENTRY*)(GLenum, GLenum)>(loader.load("glPolygonModeNV"));
/* GL_NV_sample_locations */
flextGL.FramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLenum, GLuint, GLsizei, const GLfloat *)>(loader.load("glFramebufferSampleLocationsfvNV"));
flextGL.NamedFramebufferSampleLocationsfvNV = reinterpret_cast<void(APIENTRY*)(GLuint, GLuint, GLsizei, const GLfloat *)>(loader.load("glNamedFramebufferSampleLocationsfvNV"));
flextGL.ResolveDepthValuesNV = reinterpret_cast<void(APIENTRY*)(void)>(loader.load("glResolveDepthValuesNV"));
/* GL_OES_mapbuffer */
flextGL.GetBufferPointervOES = reinterpret_cast<void(APIENTRY*)(GLenum, GLenum, void **)>(loader.load("glGetBufferPointervOES"));
flextGL.MapBufferOES = reinterpret_cast<void *(APIENTRY*)(GLenum, GLenum)>(loader.load("glMapBufferOES"));

23
src/MagnumExternal/OpenGL/GLES3/flextGLWindowsDesktop.h vendored

@ -1620,6 +1620,17 @@ typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLen
#define GL_TEXTURE_BORDER_COLOR_NV 0x1004
#define GL_CLAMP_TO_BORDER_NV 0x812D
/* GL_NV_sample_locations */
#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E
#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F
#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340
#define GL_SAMPLE_LOCATION_NV 0x8E50
#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341
#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342
#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343
/* GL_NV_polygon_mode */
#define GL_POLYGON_MODE_NV 0x0B40
@ -2210,6 +2221,12 @@ struct FlextGL {
void(APIENTRY *PolygonModeNV)(GLenum, GLenum);
/* GL_NV_sample_locations */
void(APIENTRY *FramebufferSampleLocationsfvNV)(GLenum, GLuint, GLsizei, const GLfloat *);
void(APIENTRY *NamedFramebufferSampleLocationsfvNV)(GLuint, GLuint, GLsizei, const GLfloat *);
void(APIENTRY *ResolveDepthValuesNV)(void);
/* GL_OES_mapbuffer */
void(APIENTRY *GetBufferPointervOES)(GLenum, GLenum, void **);
@ -2720,6 +2737,12 @@ extern FLEXTGL_EXPORT FlextGL flextGL;
#define glPolygonModeNV flextGL.PolygonModeNV
/* GL_NV_sample_locations */
#define glFramebufferSampleLocationsfvNV flextGL.FramebufferSampleLocationsfvNV
#define glNamedFramebufferSampleLocationsfvNV flextGL.NamedFramebufferSampleLocationsfvNV
#define glResolveDepthValuesNV flextGL.ResolveDepthValuesNV
/* GL_OES_mapbuffer */
#define glGetBufferPointervOES flextGL.GetBufferPointervOES

Loading…
Cancel
Save