From 3f727b4abc761c07c3b62ae849b461c335019a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 9 Jan 2013 01:48:38 +0100 Subject: [PATCH] Doc: fixed a few issues with OpenGL ES extensions. --- src/AbstractImage.h | 8 ++++---- src/AbstractTexture.h | 21 +++++++++++++++++++-- src/DefaultFramebuffer.h | 2 +- src/IndexedMesh.h | 3 ++- src/Mesh.h | 10 ++++++---- src/Renderbuffer.h | 2 +- 6 files changed, 33 insertions(+), 13 deletions(-) diff --git a/src/AbstractImage.h b/src/AbstractImage.h index 8eb821569..0ab1fd61c 100644 --- a/src/AbstractImage.h +++ b/src/AbstractImage.h @@ -111,9 +111,9 @@ class MAGNUM_EXPORT AbstractImage { /** * Floating-point BGRA. - * @requires_es_extension %Extension @es_extension{EXT,read_format_bgra}, - * for framebuffer reading, extension @es_extension{APPLE,texture_format_BGRA8888} - * for texture data. + * @requires_es_extension %Extension @es_extension{EXT,read_format_bgra} + * for framebuffer reading, extension @es_extension{APPLE,texture_format_BGRA8888} or + * @es_extension{EXT,texture_format_BGRA8888} for texture data. */ #ifndef MAGNUM_TARGET_GLES BGRA = GL_BGRA, @@ -268,7 +268,7 @@ class MAGNUM_EXPORT AbstractImage { /** * Each component half float. For framebuffer reading only. * @requires_gl30 %Extension @extension{NV,half_float} / @extension{ARB,half_float_pixel} - * @requires_gles30 %Extension @es_extension{OES,texture_float}, + * @requires_gles30 %Extension @es_extension2{OES,texture_half_float,OES_texture_float}, * for texture data only. */ #ifndef MAGNUM_TARGET_GLES2 diff --git a/src/AbstractTexture.h b/src/AbstractTexture.h index 5dd689f48..7425e1ac8 100644 --- a/src/AbstractTexture.h +++ b/src/AbstractTexture.h @@ -72,7 +72,17 @@ class MAGNUM_EXPORT AbstractTexture { */ enum class Filter: GLint { NearestNeighbor = GL_NEAREST, /**< Nearest neighbor filtering */ - LinearInterpolation = GL_LINEAR /**< Linear interpolation filtering */ + + /** + * Linear interpolation filtering. + * @requires_gles30 %Extension @es_extension{OES,texture_float_linear} / + * @es_extension2{OES,texture_half_float_linear,OES_texture_float_linear} + * for linear interpolation of textures with + * @ref Magnum::AbstractTexture::InternalFormat "InternalFormat::HalfFloat" + * / @ref Magnum::AbstractTexture::InternalFormat "InternalFormat::Float" + * in OpenGL ES 2.0. + */ + LinearInterpolation = GL_LINEAR }; /** @@ -91,6 +101,12 @@ class MAGNUM_EXPORT AbstractTexture { /** * Linear interpolation of nearest mip levels. **Unavailable on * rectangle textures.** + * @requires_gles30 %Extension @es_extension{OES,texture_float_linear} / + * @es_extension2{OES,texture_half_float_linear,OES_texture_float_linear} + * for linear interpolation of textures with + * @ref Magnum::AbstractTexture::InternalFormat "InternalFormat::HalfFloat" + * / @ref Magnum::AbstractTexture::InternalFormat "InternalFormat::Float" + * in OpenGL ES 2.0. */ LinearInterpolation = GL_NEAREST_MIPMAP_LINEAR & ~GL_NEAREST }; @@ -622,6 +638,7 @@ class MAGNUM_EXPORT AbstractTexture { /** * RGB, each component normalized unsigned 10bit. * @requires_es_extension %Extension @es_extension{OES,required_internalformat} + * and @es_extension{EXT,texture_type_2_10_10_10_REV} */ #ifndef MAGNUM_TARGET_GLES RGB10 = GL_RGB10, @@ -904,7 +921,7 @@ class MAGNUM_EXPORT AbstractTexture { /** * Depth component, 32bit. * @requires_es_extension %Extension @es_extension{OES,required_internalformat}, - * @es_extension{OES,depth_texture} and @es_extension{OES,depth24} + * @es_extension{OES,depth_texture} and @es_extension{OES,depth32} */ #ifndef MAGNUM_TARGET_GLES2 DepthComponent32 = GL_DEPTH_COMPONENT32, diff --git a/src/DefaultFramebuffer.h b/src/DefaultFramebuffer.h index 4262fe6a4..3804931d6 100644 --- a/src/DefaultFramebuffer.h +++ b/src/DefaultFramebuffer.h @@ -186,7 +186,7 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer { /** * Read from front framebuffer. - * @requires_es_extension %Extension @es_extension2{NV,read_buffer,GL_NV_read_buffer} + * @requires_es_extension %Extension @es_extension2{NV,read_buffer_front,GL_NV_read_buffer} */ Front = GL_FRONT diff --git a/src/IndexedMesh.h b/src/IndexedMesh.h index d801255e6..eb051811d 100644 --- a/src/IndexedMesh.h +++ b/src/IndexedMesh.h @@ -62,7 +62,8 @@ From user point-of-view the operation is the same as for @section IndexedMesh-performance-optimization Performance optimizations -If @extension{APPLE,vertex_array_object} is supported, next to +If @extension{APPLE,vertex_array_object}, OpenGL ES 3.0 or +@es_extension{OES,vertex_array_object} on OpenGL ES 2.0 is supported, next to @ref Mesh-performance-optimization "optimizations in Mesh itself" the index buffer is bound on object construction instead of binding it in every draw() call. diff --git a/src/Mesh.h b/src/Mesh.h index 1b918a814..d802e41df 100644 --- a/src/Mesh.h +++ b/src/Mesh.h @@ -102,10 +102,11 @@ for more infromation) and call Mesh::draw(). @section Mesh-performance-optimization Performance optimizations -If @extension{APPLE,vertex_array_object} is supported, VAOs are used instead -of binding the buffers and specifying vertex attribute pointers in each -draw() call. The engine tracks currently bound VAO to avoid unnecessary calls -to @fn_gl{BindVertexArray}. +If @extension{APPLE,vertex_array_object}, OpenGL ES 3.0 or +@es_extension{OES,vertex_array_object} on OpenGL ES 2.0 is supported, VAOs are +used instead of binding the buffers and specifying vertex attribute pointers +in each draw() call. The engine tracks currently bound VAO to avoid +unnecessary calls to @fn_gl{BindVertexArray}. If extension @extension{EXT,direct_state_access} and VAOs are available, DSA functions are used for specifying attribute locations to avoid unnecessary @@ -113,6 +114,7 @@ calls to @fn_gl{BindBuffer} and @fn_gl{BindVertexArray}. See documentation of addVertexBuffer(), addInterleavedVertexBuffer(), addVertexBufferStride() for more information. +@see IndexedMesh @todo Support for indirect draw buffer (OpenGL 4.0, @extension{ARB,draw_indirect}) @todo Redo in a way that allows glMultiDrawArrays, glDrawArraysInstanced etc. @todo Allow unbinding all vertex buffers with some function (not as side effect), diff --git a/src/Renderbuffer.h b/src/Renderbuffer.h index 10cc29f95..54b1d3a50 100644 --- a/src/Renderbuffer.h +++ b/src/Renderbuffer.h @@ -117,7 +117,7 @@ class MAGNUM_EXPORT Renderbuffer { /** * RGBA, each component normalized unsigned byte. * @requires_gles30 %Extension @es_extension{ARM,rgba8} or - * @es_extension{OES,required_internalformat} and @es_extension{OES,rgb8_rgba8} + * @es_extension{OES,rgb8_rgba8} */ #ifndef MAGNUM_TARGET_GLES2 RGBA8 = GL_RGBA8,