Browse Source

Separated deprecated API and deprecated GL API in the docs.

New code may not use deprecated API, but for some reasons (support
for old GL versions) might use deprecated GL API.
pull/23/head
Vladimír Vondruš 13 years ago
parent
commit
d380e07ac5
  1. 1
      Doxyfile
  2. 8
      doc/unsupported.dox
  3. 6
      src/AbstractShaderProgram.h
  4. 6
      src/Buffer.h
  5. 4
      src/ColorFormat.h
  6. 24
      src/RenderbufferFormat.h
  7. 36
      src/TextureFormat.h

1
Doxyfile

@ -210,6 +210,7 @@ ALIASES = \
"fn_gl_extension{3}=<a href=\"http://www.opengl.org/registry/specs/\2/\3.txt\">gl\1<b></b>\2()</a>" \ "fn_gl_extension{3}=<a href=\"http://www.opengl.org/registry/specs/\2/\3.txt\">gl\1<b></b>\2()</a>" \
"fn_gles_extension{3}=<a href=\"http://www.khronos.org/registry/gles/extensions/\2/\2_\3.txt\">gl\1<b></b>\2()</a>" \ "fn_gles_extension{3}=<a href=\"http://www.khronos.org/registry/gles/extensions/\2/\2_\3.txt\">gl\1<b></b>\2()</a>" \
"def_gl{1}=`GL_\1`" \ "def_gl{1}=`GL_\1`" \
"deprecated_gl=@xrefitem deprecated-gl \"Deprecated OpenGL API\" \"Deprecated OpenGL API list\"" \
"requires_gl30=@xrefitem requires-gl30 \"Requires OpenGL 3.0\" \"Functionality requiring OpenGL 3.0\"" \ "requires_gl30=@xrefitem requires-gl30 \"Requires OpenGL 3.0\" \"Functionality requiring OpenGL 3.0\"" \
"requires_gl31=@xrefitem requires-gl31 \"Requires OpenGL 3.1\" \"Functionality requiring OpenGL 3.1\"" \ "requires_gl31=@xrefitem requires-gl31 \"Requires OpenGL 3.1\" \"Functionality requiring OpenGL 3.1\"" \
"requires_gl32=@xrefitem requires-gl32 \"Requires OpenGL 3.2\" \"Functionality requiring OpenGL 3.2\"" \ "requires_gl32=@xrefitem requires-gl32 \"Requires OpenGL 3.2\" \"Functionality requiring OpenGL 3.2\"" \

8
doc/unsupported.dox

@ -25,7 +25,7 @@
/** @page unsupported Unsupported OpenGL features /** @page unsupported Unsupported OpenGL features
Some functionality, which is either soon-to-be deprecated or isn't proven to Some functionality, which is either soon-to-be deprecated or isn't proven to
add any performance gains, is not supported in %Magnum. add any performance gains, is not supported in %Magnum. See also @ref deprecated-gl.
@section unsupported-features Unsupported features @section unsupported-features Unsupported features
@ -48,3 +48,9 @@ add any performance gains, is not supported in %Magnum.
doesn't make any full-screen postprocessing easier, as shaders are excluded. doesn't make any full-screen postprocessing easier, as shaders are excluded.
*/ */
/** @page deprecated-gl Deprecated OpenGL API list
See also @ref unsupported.
*/

6
src/AbstractShaderProgram.h

@ -544,7 +544,7 @@ class MAGNUM_EXPORT AbstractShaderProgram {
* *
* Binds attribute to location which is used later for binding vertex * Binds attribute to location which is used later for binding vertex
* buffers. * buffers.
* @deprecated Preferred usage is to specify attribute location * @deprecated_gl Preferred usage is to specify attribute location
* explicitly in the shader instead of using this function. See * explicitly in the shader instead of using this function. See
* @ref AbstractShaderProgram-attribute-location "class documentation" * @ref AbstractShaderProgram-attribute-location "class documentation"
* for more information. * for more information.
@ -562,7 +562,7 @@ class MAGNUM_EXPORT AbstractShaderProgram {
* Binds fragment data to location which is used later for framebuffer * Binds fragment data to location which is used later for framebuffer
* operations. See also Framebuffer::BlendFunction for more * operations. See also Framebuffer::BlendFunction for more
* information about using color input index. * information about using color input index.
* @deprecated Preferred usage is to specify attribute location * @deprecated_gl Preferred usage is to specify attribute location
* explicitly in the shader instead of using this function. See * explicitly in the shader instead of using this function. See
* @ref AbstractShaderProgram-attribute-location "class documentation" * @ref AbstractShaderProgram-attribute-location "class documentation"
* for more information. * for more information.
@ -604,7 +604,7 @@ class MAGNUM_EXPORT AbstractShaderProgram {
* @brief Get uniform location * @brief Get uniform location
* @param name Uniform name * @param name Uniform name
* *
* @deprecated Preferred usage is to specify uniform location * @deprecated_gl Preferred usage is to specify uniform location
* explicitly in the shader instead of using this function. See * explicitly in the shader instead of using this function. See
* @ref AbstractShaderProgram-uniform-location "class documentation" * @ref AbstractShaderProgram-uniform-location "class documentation"
* for more information. * for more information.

6
src/Buffer.h

@ -319,7 +319,7 @@ class MAGNUM_EXPORT Buffer {
/** /**
* @brief Memory mapping access * @brief Memory mapping access
* *
* @deprecated Prefer to use @ref Magnum::Buffer::map(GLintptr, GLsizeiptr, MapFlags) "map(GLintptr, GLsizeiptr, MapFlags)" * @deprecated_gl Prefer to use @ref Magnum::Buffer::map(GLintptr, GLsizeiptr, MapFlags) "map(GLintptr, GLsizeiptr, MapFlags)"
* instead, as it has more complete set of features. * instead, as it has more complete set of features.
* @see map(MapAccess), mapSub() * @see map(MapAccess), mapSub()
* @requires_es_extension %Extension @es_extension{OES,mapbuffer} or * @requires_es_extension %Extension @es_extension{OES,mapbuffer} or
@ -769,7 +769,7 @@ class MAGNUM_EXPORT Buffer {
* If @extension{EXT,direct_state_access} is not available and the * If @extension{EXT,direct_state_access} is not available and the
* buffer is not already bound somewhere, it is bound to hinted target * buffer is not already bound somewhere, it is bound to hinted target
* before the operation. * before the operation.
* @deprecated Prefer to use @ref Magnum::Buffer::map(GLintptr, GLsizeiptr, MapFlags) "map(GLintptr, GLsizeiptr, MapFlags)" * @deprecated_gl Prefer to use @ref Magnum::Buffer::map(GLintptr, GLsizeiptr, MapFlags) "map(GLintptr, GLsizeiptr, MapFlags)"
* instead, as it has more complete set of features. * instead, as it has more complete set of features.
* @see @ref minMapAlignment(), @ref unmap(), @ref setTargetHint(), * @see @ref minMapAlignment(), @ref unmap(), @ref setTargetHint(),
* @fn_gl{BindBuffer} and @fn_gl{MapBuffer} or * @fn_gl{BindBuffer} and @fn_gl{MapBuffer} or
@ -793,7 +793,7 @@ class MAGNUM_EXPORT Buffer {
* *
* If the buffer is not already bound somewhere, it is bound to hinted * If the buffer is not already bound somewhere, it is bound to hinted
* target before the operation. * target before the operation.
* @deprecated Prefer to use @ref Magnum::Buffer::map(GLintptr, GLsizeiptr, MapFlags) "map(GLintptr, GLsizeiptr, MapFlags)" * @deprecated_gl Prefer to use @ref Magnum::Buffer::map(GLintptr, GLsizeiptr, MapFlags) "map(GLintptr, GLsizeiptr, MapFlags)"
* instead, as it has more complete set of features. * instead, as it has more complete set of features.
* @see unmapSub(), setTargetHint(), @fn_gl_extension{MapBufferSubData,CHROMIUM,map_sub} * @see unmapSub(), setTargetHint(), @fn_gl_extension{MapBufferSubData,CHROMIUM,map_sub}
* @requires_gles20 Not available in ES 3.0 or desktop OpenGL. Use * @requires_gles20 Not available in ES 3.0 or desktop OpenGL. Use

4
src/ColorFormat.h

@ -74,7 +74,7 @@ enum class ColorFormat: GLenum {
/** /**
* Floating-point luminance channel. The value is used for all RGB * Floating-point luminance channel. The value is used for all RGB
* channels. * channels.
* @deprecated Included for compatibility reasons only, use * @deprecated_gl Included for compatibility reasons only, use
* @ref Magnum::ColorFormat "ColorFormat::Red" instead. * @ref Magnum::ColorFormat "ColorFormat::Red" instead.
* @requires_gles20 Not available in ES 3.0 or desktop OpenGL. Use * @requires_gles20 Not available in ES 3.0 or desktop OpenGL. Use
* @ref Magnum::ColorFormat "ColorFormat::Red" instead. * @ref Magnum::ColorFormat "ColorFormat::Red" instead.
@ -98,7 +98,7 @@ enum class ColorFormat: GLenum {
/** /**
* Floating-point luminance and alpha channel. First value is used for all * Floating-point luminance and alpha channel. First value is used for all
* RGB channels, second value is used for alpha channel. * RGB channels, second value is used for alpha channel.
* @deprecated Included for compatibility reasons only, use * @deprecated_gl Included for compatibility reasons only, use
* @ref Magnum::ColorFormat "ColorFormat::RG" instead. * @ref Magnum::ColorFormat "ColorFormat::RG" instead.
* @requires_gles20 Not available in ES 3.0 or desktop OpenGL. Use * @requires_gles20 Not available in ES 3.0 or desktop OpenGL. Use
* @ref Magnum::ColorFormat "ColorFormat::RG" instead. * @ref Magnum::ColorFormat "ColorFormat::RG" instead.

24
src/RenderbufferFormat.h

@ -43,8 +43,8 @@ enum class RenderbufferFormat: GLenum {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** /**
* Red component, normalized unsigned, size implementation-dependent. * Red component, normalized unsigned, size implementation-dependent.
* @deprecated Prefer to use the exactly specified version of this format, * @deprecated_gl Prefer to use the exactly specified version of this
* e.g. @ref Magnum::RenderbufferFormat "RenderbufferFormat::R8". * format, e.g. @ref Magnum::RenderbufferFormat "RenderbufferFormat::R8".
* @requires_gl30 %Extension @extension{ARB,texture_rg} * @requires_gl30 %Extension @extension{ARB,texture_rg}
* @requires_gl Use exactly specified format in OpenGL ES instead. * @requires_gl Use exactly specified format in OpenGL ES instead.
*/ */
@ -66,8 +66,8 @@ enum class RenderbufferFormat: GLenum {
/** /**
* Red and green component, normalized unsigned, size * Red and green component, normalized unsigned, size
* implementation-dependent. * implementation-dependent.
* @deprecated Prefer to use the exactly specified version of this format, * @deprecated_gl Prefer to use the exactly specified version of this
* e.g. @ref Magnum::RenderbufferFormat "RenderbufferFormat::RG8". * format, e.g. @ref Magnum::RenderbufferFormat "RenderbufferFormat::RG8".
* @requires_gl30 %Extension @extension{ARB,texture_rg} * @requires_gl30 %Extension @extension{ARB,texture_rg}
* @requires_gl Use exactly specified format in OpenGL ES instead. * @requires_gl Use exactly specified format in OpenGL ES instead.
*/ */
@ -88,8 +88,8 @@ enum class RenderbufferFormat: GLenum {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** /**
* RGBA, normalized unsigned, size implementation-dependent. * RGBA, normalized unsigned, size implementation-dependent.
* @deprecated Prefer to use the exactly specified version of this format, * @deprecated_gl Prefer to use the exactly specified version of this
* e.g. @ref Magnum::RenderbufferFormat "RenderbufferFormat::RGBA8". * format, e.g. @ref Magnum::RenderbufferFormat "RenderbufferFormat::RGBA8".
* @requires_gl Use exactly specified format in OpenGL ES 2.0 instead. * @requires_gl Use exactly specified format in OpenGL ES 2.0 instead.
*/ */
RGBA = GL_RGBA, RGBA = GL_RGBA,
@ -383,8 +383,8 @@ enum class RenderbufferFormat: GLenum {
/** /**
* Depth component, size implementation-dependent. * Depth component, size implementation-dependent.
* @todo is this allowed in core? * @todo is this allowed in core?
* @deprecated Prefer to use exactly specified version of this format, e.g. * @deprecated_gl Prefer to use the exactly specified version of this
* @ref Magnum::RenderbufferFormat "RenderbufferFormat::DepthComponent16". * format, e.g. @ref Magnum::RenderbufferFormat "RenderbufferFormat::DepthComponent16".
* @requires_gl Use exactly specified format in OpenGL ES instead. * @requires_gl Use exactly specified format in OpenGL ES instead.
*/ */
DepthComponent = GL_DEPTH_COMPONENT, DepthComponent = GL_DEPTH_COMPONENT,
@ -428,8 +428,8 @@ enum class RenderbufferFormat: GLenum {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** /**
* Stencil index, size implementation-dependent. * Stencil index, size implementation-dependent.
* @deprecated Prefer to use exactly specified version of this format, e.g. * @deprecated_gl Prefer to use the exactly specified version of this
* @ref Magnum::RenderbufferFormat "RenderbufferFormat::StencilIndex8". * format, e.g. @ref Magnum::RenderbufferFormat "RenderbufferFormat::StencilIndex8".
* @requires_gl Use exactly specified format in OpenGL ES instead. * @requires_gl Use exactly specified format in OpenGL ES instead.
*/ */
StencilIndex = GL_STENCIL_INDEX, StencilIndex = GL_STENCIL_INDEX,
@ -469,8 +469,8 @@ enum class RenderbufferFormat: GLenum {
/** /**
* Depth and stencil component, size implementation-dependent. * Depth and stencil component, size implementation-dependent.
* @deprecated Prefer to use exactly specified version of this format, e.g. * @deprecated_gl Prefer to use the exactly specified version of this
* @ref Magnum::RenderbufferFormat "RenderbufferFormat::Depth24Stencil8". * format, e.g. @ref Magnum::RenderbufferFormat "RenderbufferFormat::Depth24Stencil8".
* @requires_gl Use exactly specified format in OpenGL ES instead. * @requires_gl Use exactly specified format in OpenGL ES instead.
*/ */
DepthStencil = GL_DEPTH_STENCIL, DepthStencil = GL_DEPTH_STENCIL,

36
src/TextureFormat.h

@ -40,8 +40,8 @@ namespace Magnum {
enum class TextureFormat: GLenum { enum class TextureFormat: GLenum {
/** /**
* Red component, normalized unsigned, size implementation-dependent. * Red component, normalized unsigned, size implementation-dependent.
* @deprecated Prefer to use the exactly specified version of this format, * @deprecated_gl Prefer to use the exactly specified version of this
* e.g. @ref Magnum::TextureFormat "TextureFormat::R8". * format, e.g. @ref Magnum::TextureFormat "TextureFormat::R8".
* @requires_gl30 %Extension @extension{ARB,texture_rg} * @requires_gl30 %Extension @extension{ARB,texture_rg}
* @requires_gles30 %Extension @es_extension{EXT,texture_rg} * @requires_gles30 %Extension @es_extension{EXT,texture_rg}
*/ */
@ -64,8 +64,8 @@ enum class TextureFormat: GLenum {
/** /**
* Red and green component, normalized unsigned, size * Red and green component, normalized unsigned, size
* implementation-dependent. * implementation-dependent.
* @deprecated Prefer to use the exactly specified version of this format, * @deprecated_gl Prefer to use the exactly specified version of this
* e.g. @ref Magnum::TextureFormat "TextureFormat::RG8". * format, e.g. @ref Magnum::TextureFormat "TextureFormat::RG8".
* @requires_gl30 %Extension @extension{ARB,texture_rg} * @requires_gl30 %Extension @extension{ARB,texture_rg}
* @requires_gles30 %Extension @es_extension{EXT,texture_rg} * @requires_gles30 %Extension @es_extension{EXT,texture_rg}
*/ */
@ -87,8 +87,8 @@ enum class TextureFormat: GLenum {
/** /**
* RGB, normalized unsigned, size implementation-dependent. * RGB, normalized unsigned, size implementation-dependent.
* @deprecated Prefer to use the exactly specified version of this format, * @deprecated_gl Prefer to use the exactly specified version of this
* e.g. @ref Magnum::TextureFormat "TextureFormat::RGB8". * format, e.g. @ref Magnum::TextureFormat "TextureFormat::RGB8".
*/ */
RGB = GL_RGB, RGB = GL_RGB,
@ -104,8 +104,8 @@ enum class TextureFormat: GLenum {
/** /**
* RGBA, normalized unsigned, size implementation-dependent. * RGBA, normalized unsigned, size implementation-dependent.
* @deprecated Prefer to use the exactly specified version of this format, * @deprecated_gl Prefer to use the exactly specified version of this
* e.g. @ref Magnum::TextureFormat "TextureFormat::RGBA8". * format, e.g. @ref Magnum::TextureFormat "TextureFormat::RGBA8".
*/ */
RGBA = GL_RGBA, RGBA = GL_RGBA,
@ -475,7 +475,7 @@ enum class TextureFormat: GLenum {
/** /**
* Luminance, normalized unsigned, single value used for all RGB channels. * Luminance, normalized unsigned, single value used for all RGB channels.
* Size implementation-dependent. * Size implementation-dependent.
* @deprecated Included for compatibility reasons only, use * @deprecated_gl Included for compatibility reasons only, use
* @ref Magnum::TextureFormat "TextureFormat::R8" instead. * @ref Magnum::TextureFormat "TextureFormat::R8" instead.
* @requires_gles20 Not available in ES 3.0 or desktop OpenGL. Use * @requires_gles20 Not available in ES 3.0 or desktop OpenGL. Use
* @ref Magnum::TextureFormat "TextureFormat::R8" instead. * @ref Magnum::TextureFormat "TextureFormat::R8" instead.
@ -486,7 +486,7 @@ enum class TextureFormat: GLenum {
* Floating-point luminance and alpha channel. First value is used for all * Floating-point luminance and alpha channel. First value is used for all
* RGB channels, second value is used for alpha channel. Size * RGB channels, second value is used for alpha channel. Size
* implementation-dependent. * implementation-dependent.
* @deprecated Included for compatibility reasons only, use * @deprecated_gl Included for compatibility reasons only, use
* @ref Magnum::TextureFormat "TextureFormat::RG8" instead. * @ref Magnum::TextureFormat "TextureFormat::RG8" instead.
* @requires_gles20 Not available in ES 3.0 or desktop OpenGL. Use * @requires_gles20 Not available in ES 3.0 or desktop OpenGL. Use
* @ref Magnum::TextureFormat "TextureFormat::RG8" instead. * @ref Magnum::TextureFormat "TextureFormat::RG8" instead.
@ -564,8 +564,8 @@ enum class TextureFormat: GLenum {
/** /**
* sRGB, normalized unsigned, size implementation-dependent. * sRGB, normalized unsigned, size implementation-dependent.
* @todo is this allowed in core? * @todo is this allowed in core?
* @deprecated Prefer to use the exactly specified version of this format, * @deprecated_gl Prefer to use the exactly specified version of this
* i.e. @ref Magnum::TextureFormat "TextureFormat::SRGB8". * format, i.e. @ref Magnum::TextureFormat "TextureFormat::SRGB8".
* @requires_es_extension %Extension @es_extension{EXT,sRGB} in OpenGL ES * @requires_es_extension %Extension @es_extension{EXT,sRGB} in OpenGL ES
* 2.0, use @ref Magnum::TextureFormat "TextureFormat::SRGB8" in * 2.0, use @ref Magnum::TextureFormat "TextureFormat::SRGB8" in
* OpenGL ES 3.0 instead. * OpenGL ES 3.0 instead.
@ -639,8 +639,8 @@ enum class TextureFormat: GLenum {
/** /**
* sRGBA, normalized unsigned, size implementation-dependent. * sRGBA, normalized unsigned, size implementation-dependent.
* @todo is this allowed in core? * @todo is this allowed in core?
* @deprecated Prefer to use the exactly specified version of this format, * @deprecated_gl Prefer to use the exactly specified version of this
* i.e. @ref Magnum::TextureFormat "TextureFormat::SRGB8Alpha8". * format, i.e. @ref Magnum::TextureFormat "TextureFormat::SRGB8Alpha8".
* @requires_es_extension %Extension @es_extension{EXT,sRGB} in OpenGL ES * @requires_es_extension %Extension @es_extension{EXT,sRGB} in OpenGL ES
* 2.0, use @ref Magnum::TextureFormat "TextureFormat::SRGB8Alpha8" in * 2.0, use @ref Magnum::TextureFormat "TextureFormat::SRGB8Alpha8" in
* OpenGL ES 3.0 instead. * OpenGL ES 3.0 instead.
@ -751,8 +751,8 @@ enum class TextureFormat: GLenum {
/** /**
* Depth component, size implementation-dependent. * Depth component, size implementation-dependent.
* @deprecated Prefer to use exactly specified version of this format, e.g. * @deprecated_gl Prefer to use the exactly specified version of this
* @ref Magnum::TextureFormat "TextureFormat::DepthComponent16". * format, e.g. @ref Magnum::TextureFormat "TextureFormat::DepthComponent16".
* @requires_gles30 %Extension @es_extension{OES,depth_texture} or * @requires_gles30 %Extension @es_extension{OES,depth_texture} or
* @es_extension{ANGLE,depth_texture} * @es_extension{ANGLE,depth_texture}
*/ */
@ -812,8 +812,8 @@ enum class TextureFormat: GLenum {
/** /**
* Depth and stencil component, size implementation-dependent. * Depth and stencil component, size implementation-dependent.
* @deprecated Prefer to use exactly specified version of this format, e.g. * @deprecated_gl Prefer to use exactly specified version of this format,
* @ref Magnum::TextureFormat "TextureFormat::Depth24Stencil8". * e.g. @ref Magnum::TextureFormat "TextureFormat::Depth24Stencil8".
* @requires_gles30 %Extension @es_extension{OES,packed_depth_stencil} * @requires_gles30 %Extension @es_extension{OES,packed_depth_stencil}
*/ */
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2

Loading…
Cancel
Save