diff --git a/doc/opengl-support.dox b/doc/opengl-support.dox index 2e90d25e8..cf33b9bb1 100644 --- a/doc/opengl-support.dox +++ b/doc/opengl-support.dox @@ -323,6 +323,7 @@ Extension | Status @es_extension{NV,shadow_samplers_cube} | done (shading language only) @es_extension{OES,depth24} | done @es_extension{OES,element_index_uint} | done +@es_extension{OES,fbo_render_mipmap} | done @es_extension{OES,rgb8_rgba8} | done (desktop-compatible subset) @es_extension{OES,texture_3D} | done @es_extension2{OES,texture_half_float_linear,OES_texture_float_linear} | done @@ -427,6 +428,7 @@ Extension | Status @webgl_extension{OES,element_index_uint} | done @webgl_extension{OES,texture_float_linear} | done @webgl_extension{OES,texture_half_float_linear} | done +@webgl_extension{OES,fbo_render_mipmap} | done @webgl_extension{WEBGL,depth_texture} | done @webgl_extension{WEBGL,draw_buffers} | done diff --git a/src/Magnum/Context.cpp b/src/Magnum/Context.cpp index b8bf0590e..b922a3991 100644 --- a/src/Magnum/Context.cpp +++ b/src/Magnum/Context.cpp @@ -241,6 +241,7 @@ const std::vector& Extension::extensions(Version version) { _extension(GL,OES,element_index_uint), _extension(GL,OES,texture_float_linear), _extension(GL,OES,texture_half_float_linear), + _extension(GL,OES,fbo_render_mipmap), _extension(GL,WEBGL,compressed_texture_s3tc), _extension(GL,WEBGL,depth_texture), _extension(GL,WEBGL,draw_buffers)}; @@ -355,6 +356,7 @@ const std::vector& Extension::extensions(Version version) { _extension(GL,NV,shadow_samplers_cube), _extension(GL,OES,depth24), _extension(GL,OES,element_index_uint), + _extension(GL,OES,fbo_render_mipmap), _extension(GL,OES,rgb8_rgba8), _extension(GL,OES,texture_3D), _extension(GL,OES,texture_half_float_linear), diff --git a/src/Magnum/Extensions.h b/src/Magnum/Extensions.h index a9ef8042f..c674846c8 100644 --- a/src/Magnum/Extensions.h +++ b/src/Magnum/Extensions.h @@ -265,6 +265,7 @@ namespace GL { _extension(GL,OES,element_index_uint, GLES200, GLES300) // #10 _extension(GL,OES,texture_float_linear, GLES200, GLES300) // #20 _extension(GL,OES,texture_half_float_linear, GLES200, GLES300) // #21 + _extension(GL,OES,fbo_render_mipmap, GLES200, GLES300) // #28 #endif } namespace WEBGL { #ifdef MAGNUM_TARGET_GLES2 @@ -407,6 +408,7 @@ namespace GL { _extension(GL,OES,depth32, GLES200, None) // #25 #ifdef MAGNUM_TARGET_GLES2 _extension(GL,OES,element_index_uint, GLES200, GLES300) // #26 + _extension(GL,OES,fbo_render_mipmap, GLES200, GLES300) // #27 #endif _extension(GL,OES,mapbuffer, GLES200, None) // #29 #ifdef MAGNUM_TARGET_GLES2 diff --git a/src/Magnum/Framebuffer.h b/src/Magnum/Framebuffer.h index 196fa63d3..7a0580c0b 100644 --- a/src/Magnum/Framebuffer.h +++ b/src/Magnum/Framebuffer.h @@ -621,6 +621,10 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje * @fn_gl_extension{NamedFramebufferTexture2D,EXT,direct_state_access}, * eventually @fn_gl{BindFramebuffer} and * @fn_gl2{FramebufferTexture2D,FramebufferTexture} + * @requires_gles30 Extension @es_extension{OES,fbo_render_mipmap} to + * render to @p level different than `0` in OpenGL ES 2.0. + * @requires_webgl20 Extension @webgl_extension{OES,fbo_render_mipmap} + * to render to @p level different than `0` in WebGL 1.0. */ Framebuffer& attachTexture(BufferAttachment attachment, Texture2D& texture, Int level); @@ -659,6 +663,10 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje * @fn_gl2{NamedFramebufferTextureLayer,FramebufferTextureLayer}, * @fn_gl_extension{NamedFramebufferTexture2D,EXT,direct_state_access}, * eventually @fn_gl{BindFramebuffer} and @fn_gl2{FramebufferTexture2D,FramebufferTexture} + * @requires_gles30 Extension @es_extension{OES,fbo_render_mipmap} to + * render to @p level different than `0` in OpenGL ES 2.0. + * @requires_webgl20 Extension @webgl_extension{OES,fbo_render_mipmap} + * to render to @p level different than `0` in WebGL 1.0. */ Framebuffer& attachCubeMapTexture(BufferAttachment attachment, CubeMapTexture& texture, CubeMapCoordinate coordinate, Int level); @@ -682,6 +690,8 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje * OpenGL ES 2.0 * @requires_gles30 Extension @es_extension{OES,texture_3D} in OpenGL * ES 2.0. + * @requires_gles30 Extension @es_extension{OES,fbo_render_mipmap} to + * render to @p level different than `0` in OpenGL ES 2.0. * @requires_webgl20 Only 2D textures are available in WebGL 1.0. */ Framebuffer& attachTextureLayer(BufferAttachment attachment, Texture3D& texture, Int level, Int layer); diff --git a/src/MagnumExternal/OpenGL/GLES2/Emscripten/extensions.txt b/src/MagnumExternal/OpenGL/GLES2/Emscripten/extensions.txt index 8a4eb5925..b1a229f11 100644 --- a/src/MagnumExternal/OpenGL/GLES2/Emscripten/extensions.txt +++ b/src/MagnumExternal/OpenGL/GLES2/Emscripten/extensions.txt @@ -13,6 +13,7 @@ extension OES_texture_half_float optional extension OES_texture_float optional extension OES_standard_derivatives optional extension OES_vertex_array_object optional +extension OES_fbo_render_mipmap optional # These are used as a base for WEBGL_* extensions extension ANGLE_depth_texture optional extension EXT_draw_buffers optional diff --git a/src/MagnumExternal/OpenGL/GLES2/extensions.txt b/src/MagnumExternal/OpenGL/GLES2/extensions.txt index 9abbd3b66..81b986dcb 100644 --- a/src/MagnumExternal/OpenGL/GLES2/extensions.txt +++ b/src/MagnumExternal/OpenGL/GLES2/extensions.txt @@ -35,6 +35,7 @@ extension NV_shadow_samplers_array optional extension NV_shadow_samplers_cube optional extension OES_depth24 optional extension OES_element_index_uint optional +extension OES_fbo_render_mipmap optional extension OES_rgb8_rgba8 optional extension OES_texture_3D optional extension OES_texture_half_float_linear optional diff --git a/src/MagnumExternal/OpenGL/GLES2/flextGLNaCl.h b/src/MagnumExternal/OpenGL/GLES2/flextGLNaCl.h index bdcf3e2ae..6f447311a 100644 --- a/src/MagnumExternal/OpenGL/GLES2/flextGLNaCl.h +++ b/src/MagnumExternal/OpenGL/GLES2/flextGLNaCl.h @@ -1896,6 +1896,11 @@ GL_APICALL void GL_APIENTRY GLES2ReadBufferNV(GLenum); #define GL_OES_element_index_uint 1 #endif +/* GL_OES_fbo_render_mipmap */ +#ifndef GL_OES_fbo_render_mipmap +#define GL_OES_fbo_render_mipmap 1 +#endif + /* GL_OES_mapbuffer */ #ifndef GL_OES_mapbuffer #define GL_OES_mapbuffer 1