Browse Source

Split the OpenGL layer out, pt 4: new Magnum::GL namespace.

At the moment just the GL library itself w/o the tests, and without
backwards compatibility aliases. The following types were left in the
root namespace, despite being in the GL/ directory, as they will get
moved back soon:

 * Image, CompressedImage and their dimensional typedefs
 * ImageView, CompressedImageView and their dimensional typedefs
 * PixelStorage

Not PixelFormat etc., that one will stay in the GL namespace and a
completely new PixelFormat enum will be provided in the root namespace.
pull/233/head
Vladimír Vondruš 8 years ago
parent
commit
9dcaf23389
  1. 8
      doc/building.dox
  2. 4
      doc/changelog.dox
  3. 2
      doc/cmake.dox
  4. 2
      doc/developers.dox
  5. 4
      doc/method-chaining.dox
  6. 32
      doc/namespaces.dox
  7. 436
      doc/opengl-mapping.dox
  8. 2
      doc/opengl-workarounds.dox
  9. 26
      doc/opengl-wrapping.dox
  10. 2
      doc/platforms-android.dox
  11. 6
      doc/platforms-gl.dox
  12. 9
      doc/platforms-html5.dox
  13. 8
      doc/platforms-macos.dox
  14. 27
      doc/portability.dox
  15. 4
      doc/shaders.dox
  16. 54
      doc/troubleshooting.dox
  17. 4
      src/Magnum/DebugTools/Test/CompareImageTest.cpp
  18. 12
      src/Magnum/GL/AbstractFramebuffer.cpp
  19. 8
      src/Magnum/GL/AbstractFramebuffer.h
  20. 4
      src/Magnum/GL/AbstractObject.cpp
  21. 6
      src/Magnum/GL/AbstractObject.h
  22. 4
      src/Magnum/GL/AbstractQuery.cpp
  23. 6
      src/Magnum/GL/AbstractQuery.h
  24. 8
      src/Magnum/GL/AbstractShaderProgram.cpp
  25. 46
      src/Magnum/GL/AbstractShaderProgram.h
  26. 54
      src/Magnum/GL/AbstractTexture.cpp
  27. 10
      src/Magnum/GL/AbstractTexture.h
  28. 76
      src/Magnum/GL/Attribute.cpp
  29. 17
      src/Magnum/GL/Attribute.h
  30. 12
      src/Magnum/GL/Buffer.cpp
  31. 20
      src/Magnum/GL/Buffer.h
  32. 12
      src/Magnum/GL/BufferImage.cpp
  33. 10
      src/Magnum/GL/BufferImage.h
  34. 4
      src/Magnum/GL/BufferTexture.cpp
  35. 12
      src/Magnum/GL/BufferTexture.h
  36. 6
      src/Magnum/GL/BufferTextureFormat.h
  37. 34
      src/Magnum/GL/Context.cpp
  38. 24
      src/Magnum/GL/Context.h
  39. 30
      src/Magnum/GL/CubeMapTexture.cpp
  40. 8
      src/Magnum/GL/CubeMapTexture.h
  41. 4
      src/Magnum/GL/CubeMapTextureArray.cpp
  42. 8
      src/Magnum/GL/CubeMapTextureArray.h
  43. 32
      src/Magnum/GL/DebugOutput.cpp
  44. 30
      src/Magnum/GL/DebugOutput.h
  45. 8
      src/Magnum/GL/DefaultFramebuffer.cpp
  46. 14
      src/Magnum/GL/DefaultFramebuffer.h
  47. 6
      src/Magnum/GL/Extensions.h
  48. 8
      src/Magnum/GL/Framebuffer.cpp
  49. 16
      src/Magnum/GL/Framebuffer.h
  50. 29
      src/Magnum/GL/GL.h
  51. 6
      src/Magnum/GL/ImageFormat.h
  52. 4
      src/Magnum/GL/Implementation/BufferState.cpp
  53. 4
      src/Magnum/GL/Implementation/BufferState.h
  54. 4
      src/Magnum/GL/Implementation/ContextState.cpp
  55. 4
      src/Magnum/GL/Implementation/ContextState.h
  56. 4
      src/Magnum/GL/Implementation/DebugState.cpp
  57. 4
      src/Magnum/GL/Implementation/DebugState.h
  58. 4
      src/Magnum/GL/Implementation/FramebufferState.cpp
  59. 4
      src/Magnum/GL/Implementation/FramebufferState.h
  60. 4
      src/Magnum/GL/Implementation/MeshState.cpp
  61. 4
      src/Magnum/GL/Implementation/MeshState.h
  62. 4
      src/Magnum/GL/Implementation/QueryState.cpp
  63. 4
      src/Magnum/GL/Implementation/QueryState.h
  64. 4
      src/Magnum/GL/Implementation/RendererState.cpp
  65. 4
      src/Magnum/GL/Implementation/RendererState.h
  66. 4
      src/Magnum/GL/Implementation/ShaderProgramState.cpp
  67. 4
      src/Magnum/GL/Implementation/ShaderProgramState.h
  68. 4
      src/Magnum/GL/Implementation/ShaderState.cpp
  69. 4
      src/Magnum/GL/Implementation/ShaderState.h
  70. 4
      src/Magnum/GL/Implementation/State.cpp
  71. 4
      src/Magnum/GL/Implementation/State.h
  72. 4
      src/Magnum/GL/Implementation/TextureState.cpp
  73. 4
      src/Magnum/GL/Implementation/TextureState.h
  74. 4
      src/Magnum/GL/Implementation/TransformFeedbackState.cpp
  75. 4
      src/Magnum/GL/Implementation/TransformFeedbackState.h
  76. 4
      src/Magnum/GL/Implementation/driverSpecific.cpp
  77. 4
      src/Magnum/GL/Implementation/maxTextureSize.cpp
  78. 4
      src/Magnum/GL/Implementation/maxTextureSize.h
  79. 42
      src/Magnum/GL/Mesh.cpp
  80. 50
      src/Magnum/GL/Mesh.h
  81. 12
      src/Magnum/GL/MeshView.cpp
  82. 6
      src/Magnum/GL/MeshView.h
  83. 4
      src/Magnum/GL/MultisampleTexture.cpp
  84. 8
      src/Magnum/GL/MultisampleTexture.h
  85. 4
      src/Magnum/GL/OpenGL.cpp
  86. 4
      src/Magnum/GL/OpenGLTester.cpp
  87. 16
      src/Magnum/GL/OpenGLTester.h
  88. 16
      src/Magnum/GL/PixelFormat.cpp
  89. 12
      src/Magnum/GL/PixelFormat.h
  90. 4
      src/Magnum/GL/PrimitiveQuery.cpp
  91. 6
      src/Magnum/GL/PrimitiveQuery.h
  92. 4
      src/Magnum/GL/RectangleTexture.cpp
  93. 8
      src/Magnum/GL/RectangleTexture.h
  94. 4
      src/Magnum/GL/Renderbuffer.cpp
  95. 8
      src/Magnum/GL/Renderbuffer.h
  96. 6
      src/Magnum/GL/RenderbufferFormat.h
  97. 16
      src/Magnum/GL/Renderer.cpp
  98. 12
      src/Magnum/GL/Renderer.h
  99. 6
      src/Magnum/GL/SampleQuery.h
  100. 28
      src/Magnum/GL/Sampler.cpp
  101. Some files were not shown because too many files have changed in this diff Show More

8
doc/building.dox

@ -509,9 +509,9 @@ more information):
There are also extensions to @ref Corrade::TestSuite::Tester for testing GPU There are also extensions to @ref Corrade::TestSuite::Tester for testing GPU
code: code:
- `WITH_OPENGLTESTER` --- The @ref OpenGLTester class. Enables also building - `WITH_OPENGLTESTER` --- The @ref GL::OpenGLTester class. Enables also
of the GL library and one of the windowless application libraries based on building of the GL library and one of the windowless application libraries
the target platform. based on the target platform.
Magnum also contains a set of dependency-less plugins for importing essential Magnum also contains a set of dependency-less plugins for importing essential
file formats. Additional plugins are provided in a separate plugin repository, file formats. Additional plugins are provided in a separate plugin repository,
@ -574,7 +574,7 @@ will be taken relative to executable location, which is useful for making
relocatable installations. relocatable installations.
Note that each [namespace](namespaces.html) documentation, all @ref Platform Note that each [namespace](namespaces.html) documentation, all @ref Platform
library documentation and the @ref OpenGLTester class documentation contain library documentation and the @ref GL::OpenGLTester class documentation contain
more detailed information about dependencies, availability on particular more detailed information about dependencies, availability on particular
platform and also guide how to enable given library for building and how to use platform and also guide how to enable given library for building and how to use
it with CMake. it with CMake.

4
doc/changelog.dox

@ -124,6 +124,10 @@ See also:
@subsection changelog-latest-deprecated Deprecated APIs @subsection changelog-latest-deprecated Deprecated APIs
- All GL-related headers and APIs from the root @ref Magnum/ directory and
@ref Magnum namespace were moved to @ref Magnum/GL directory and
@ref Magnum::GL namespace. See their documentation for information about
particular files, classes, enums, typedefs, values and functions.
- `Audio::Buffer::Format` is deprecated, use `Audio::BufferFormat` instead - `Audio::Buffer::Format` is deprecated, use `Audio::BufferFormat` instead
- `setData()` functions in the @ref Image and @ref CompressedImage classes - `setData()` functions in the @ref Image and @ref CompressedImage classes
are deprecated because they don't offer anything extra over simple are deprecated because they don't offer anything extra over simple

2
doc/cmake.dox

@ -131,7 +131,7 @@ information):
There are also extensions to @ref Corrade::TestSuite::Tester for testing GPU There are also extensions to @ref Corrade::TestSuite::Tester for testing GPU
code: code:
- `OpenGLTester` --- @ref OpenGLTester class - `OpenGLTester` --- @ref GL::OpenGLTester class
The library also contains a set of plugins for importing essential file The library also contains a set of plugins for importing essential file
formats. Additional plugins are provided in separate plugin repository, see formats. Additional plugins are provided in separate plugin repository, see

2
doc/developers.dox

@ -486,7 +486,7 @@ in inverse --- but usually @ref developers-deprecation "deprecate first".
11. Add new version enum value: 11. Add new version enum value:
- to `src/Magnum/Version.h` - to `src/Magnum/Version.h`
- to debug output in `src/Magnum/Version.cpp` - to debug output in `src/Magnum/Version.cpp`
- to @ref Extension::extensions() in `src/Magnum/Context.cpp` - to @ref GL::Extension::extensions() in `src/Magnum/Context.cpp`
- to @cpp Context::tryCreate() @ce in `src/Magnum/Context.cpp` - to @cpp Context::tryCreate() @ce in `src/Magnum/Context.cpp`
- to specify GLSL version in `src/Magnum/Shader.cpp` - to specify GLSL version in `src/Magnum/Shader.cpp`
- to the list in `src/Magnum/Platform/magnum-info.cpp` - to the list in `src/Magnum/Platform/magnum-info.cpp`

4
doc/method-chaining.dox

@ -56,8 +56,8 @@ configured in one run, reducing count of bind calls from 9 to 3.
@snippet MagnumGL.cpp method-chaining-texture-chained @snippet MagnumGL.cpp method-chaining-texture-chained
Method chaining is not used on non-configuring functions, such as Method chaining is not used on non-configuring functions, such as
@ref Framebuffer::clear() or @ref Mesh::draw(), as these won't be commonly used @ref GL::Framebuffer::clear() or @ref GL::Mesh::draw(), as these won't be
in conjunction with other functions anyway. commonly used in conjunction with other functions anyway.
Method chaining is also used in @ref SceneGraph and other libraries and in some Method chaining is also used in @ref SceneGraph and other libraries and in some
cases it allows you to just "configure and forget" without even saving the cases it allows you to just "configure and forget" without even saving the

32
doc/namespaces.dox

@ -24,16 +24,16 @@
*/ */
/** @dir magnum/src/Magnum /** @dir magnum/src/Magnum
* @brief Namespace @ref Magnum (part of @ref building "Magnum library"), @ref Magnum::Extensions * @brief Namespace @ref Magnum (part of @ref building "Magnum library")
*/ */
/** @namespace Magnum /** @namespace Magnum
@brief Root namespace @brief Root namespace
Contains classes for interacting with OpenGL. Contains classes for interacting with OpenGL.
All of this library except @ref OpenGLTester is built as part of Magnum by This library is built as part of Magnum by default. To use this library with
default. To use this library with CMake, you need to request the `Magnum` CMake, you need to find the `Magnum` package and link to the `Magnum::Magnum`
package and link to the `Magnum::Magnum` target: target:
@code{.cmake} @code{.cmake}
find_package(Magnum REQUIRED) find_package(Magnum REQUIRED)
@ -237,6 +237,30 @@ target_link_libraries(your-app Magnum::DebugTools)
See @ref building, @ref cmake and @ref debug-tools for more information. See @ref building, @ref cmake and @ref debug-tools for more information.
*/ */
/** @dir Magnum/GL
* @brief Namespace @ref Magnum::GL
*/
/** @namespace Magnum::GL
@brief OpenGL wrapping layer
C++11 wrappers around OpenGL objects with state tracking and transparent
extension support.
All of this library except @ref GL::OpenGLTester is built if `WITH_GL` is
enabled when building Magnum. To use this library with CMake, you need to
request the `GL` component of the `Magnum` package and link to the `Magnum::GL`
target:
@code{.cmake}
find_package(Magnum REQUIRED GL)
# ...
target_link_libraries(your-app Magnum::GL)
@endcode
See @ref building, @ref cmake and @ref opengl for more information.
*/
/** @dir Magnum/MeshTools /** @dir Magnum/MeshTools
* @brief Namespace @ref Magnum::MeshTools * @brief Namespace @ref Magnum::MeshTools
*/ */

436
doc/opengl-mapping.dox

@ -51,8 +51,8 @@ Legend:
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{ActiveShaderProgram} | not needed as @fn_gl{ProgramUniform} calls are used @fn_gl{ActiveShaderProgram} | not needed as @fn_gl{ProgramUniform} calls are used
@fn_gl{ActiveTexture} | @ref AbstractTexture::bind() @fn_gl{ActiveTexture} | @ref GL::AbstractTexture::bind()
@fn_gl{AttachShader} | @ref AbstractShaderProgram::attachShader() @fn_gl{AttachShader} | @ref GL::AbstractShaderProgram::attachShader()
@subsection opengl-mapping-functions-b B @subsection opengl-mapping-functions-b B
@ -60,33 +60,33 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{BeginConditionalRender}, `glEndConditionalRender()` | @ref SampleQuery::beginConditionalRender(), \n @ref SampleQuery::endConditionalRender() @fn_gl{BeginConditionalRender}, `glEndConditionalRender()` | @ref GL::SampleQuery::beginConditionalRender(), \n @ref GL::SampleQuery::endConditionalRender()
@fn_gl{BeginQuery}, `glEndQuery()` | @ref PrimitiveQuery::begin(), \n @ref SampleQuery::begin(), \n @ref TimeQuery::begin(), \n @ref AbstractQuery::end() @fn_gl{BeginQuery}, `glEndQuery()` | @ref GL::PrimitiveQuery::begin(), \n @ref GL::SampleQuery::begin(), \n @ref GL::TimeQuery::begin(), \n @ref GL::AbstractQuery::end()
@fn_gl{BeginQueryIndexed}, `glEndQueryIndexed()` | @ref PrimitiveQuery::begin(UnsignedInt), \n @ref PrimitiveQuery::end() @fn_gl{BeginQueryIndexed}, `glEndQueryIndexed()` | @ref GL::PrimitiveQuery::begin(UnsignedInt), \n @ref GL::PrimitiveQuery::end()
@fn_gl{BeginTransformFeedback}, `glEndTransformFeedback()` | @ref TransformFeedback::begin(), @ref TransformFeedback::end() @fn_gl{BeginTransformFeedback}, `glEndTransformFeedback()` | @ref GL::TransformFeedback::begin(), @ref GL::TransformFeedback::end()
@fn_gl{BindAttribLocation} | @ref AbstractShaderProgram::bindAttributeLocation() @fn_gl{BindAttribLocation} | @ref GL::AbstractShaderProgram::bindAttributeLocation()
@fn_gl{BindBuffer} | not needed, handled internally in @ref Buffer and elsewhere @fn_gl{BindBuffer} | not needed, handled internally in @ref GL::Buffer and elsewhere
@fn_gl{BindBufferBase}, \n @fn_gl{BindBuffersBase}, \n @fn_gl{BindBufferRange}, \n @fn_gl{BindBuffersRange} | @ref Buffer::bind(), \n @ref Buffer::unbind(), \n @ref TransformFeedback::attachBuffer(), \n @ref TransformFeedback::attachBuffers() @fn_gl{BindBufferBase}, \n @fn_gl{BindBuffersBase}, \n @fn_gl{BindBufferRange}, \n @fn_gl{BindBuffersRange} | @ref GL::Buffer::bind(), \n @ref GL::Buffer::unbind(), \n @ref GL::TransformFeedback::attachBuffer(), \n @ref GL::TransformFeedback::attachBuffers()
@fn_gl{BindFragDataLocation} | @ref AbstractShaderProgram::bindFragmentDataLocation() @fn_gl{BindFragDataLocation} | @ref GL::AbstractShaderProgram::bindFragmentDataLocation()
@fn_gl{BindFragDataLocationIndexed} | @ref AbstractShaderProgram::bindFragmentDataLocationIndexed() @fn_gl{BindFragDataLocationIndexed} | @ref GL::AbstractShaderProgram::bindFragmentDataLocationIndexed()
@fn_gl{BindFramebuffer} | @ref Framebuffer::bind() @fn_gl{BindFramebuffer} | @ref GL::Framebuffer::bind()
@fn_gl{BindImageTexture}, \n @fn_gl{BindImageTextures} | @ref AbstractTexture::unbindImage(), \n @ref AbstractTexture::unbindImages(), \n @ref AbstractTexture::bindImages(), \n @ref Texture::bindImage(), \n @ref Texture::bindImageLayered(), \n @ref TextureArray::bindImage(), \n @ref TextureArray::bindImageLayered(), \n @ref CubeMapTexture::bindImage(), \n @ref CubeMapTexture::bindImageLayered(), \n @ref CubeMapTextureArray::bindImage(), \n @ref CubeMapTextureArray::bindImageLayered(), \n @ref MultisampleTexture::bindImage(), \n @ref MultisampleTexture::bindImageLayered(), \n @ref RectangleTexture::bindImage(), \n @ref BufferTexture::bindImage() @fn_gl{BindImageTexture}, \n @fn_gl{BindImageTextures} | @ref GL::AbstractTexture::unbindImage(), \n @ref GL::AbstractTexture::unbindImages(), \n @ref GL::AbstractTexture::bindImages(), \n @ref GL::Texture::bindImage(), \n @ref GL::Texture::bindImageLayered(), \n @ref GL::TextureArray::bindImage(), \n @ref GL::TextureArray::bindImageLayered(), \n @ref GL::CubeMapTexture::bindImage(), \n @ref GL::CubeMapTexture::bindImageLayered(), \n @ref GL::CubeMapTextureArray::bindImage(), \n @ref GL::CubeMapTextureArray::bindImageLayered(), \n @ref GL::MultisampleTexture::bindImage(), \n @ref GL::MultisampleTexture::bindImageLayered(), \n @ref GL::RectangleTexture::bindImage(), \n @ref GL::BufferTexture::bindImage()
@fn_gl{BindProgramPipeline} | | @fn_gl{BindProgramPipeline} | |
@fn_gl{BindRenderbuffer} | not needed, handled internally in @ref Renderbuffer @fn_gl{BindRenderbuffer} | not needed, handled internally in @ref GL::Renderbuffer
@fn_gl{BindSampler}, \n @fn_gl{BindSamplers} | | @fn_gl{BindSampler}, \n @fn_gl{BindSamplers} | |
@fn_gl{BindTexture}, \n @fn_gl{BindTextureUnit}, \n @fn_gl{BindTextures}, \n @fn_gl_extension{BindMultiTexture,EXT,direct_state_access} | @ref AbstractTexture::bind() @fn_gl{BindTexture}, \n @fn_gl{BindTextureUnit}, \n @fn_gl{BindTextures}, \n @fn_gl_extension{BindMultiTexture,EXT,direct_state_access} | @ref GL::AbstractTexture::bind()
@fn_gl{BindTransformFeedback} | not needed, handled internally in @ref TransformFeedback @fn_gl{BindTransformFeedback} | not needed, handled internally in @ref GL::TransformFeedback
@fn_gl{BindVertexArray} | not needed, handled internally in @ref Mesh @fn_gl{BindVertexArray} | not needed, handled internally in @ref GL::Mesh
@fn_gl{BindVertexBuffer}, \n `glVertexArrayVertexBuffer()`, \n @fn_gl_extension{VertexArrayBindVertexBuffer,EXT,direct_state_access} \n @fn_gl{BindVertexBuffers}, \n `glVertexArrayVertexBuffers()` | | @fn_gl{BindVertexBuffer}, \n `glVertexArrayVertexBuffer()`, \n @fn_gl_extension{VertexArrayBindVertexBuffer,EXT,direct_state_access} \n @fn_gl{BindVertexBuffers}, \n `glVertexArrayVertexBuffers()` | |
@fn_gl_extension{BlendBarrier,KHR,blend_equation_advanced} | @ref Renderer::blendBarrier() @fn_gl_extension{BlendBarrier,KHR,blend_equation_advanced} | @ref GL::Renderer::blendBarrier()
@fn_gl{BlendColor} | @ref Renderer::setBlendColor() @fn_gl{BlendColor} | @ref GL::Renderer::setBlendColor()
@fn_gl{BlendEquation}, \n @fn_gl{BlendEquationSeparate} | @ref Renderer::setBlendEquation() @fn_gl{BlendEquation}, \n @fn_gl{BlendEquationSeparate} | @ref GL::Renderer::setBlendEquation()
@fn_gl{BlendFunc}, \n @fn_gl{BlendFuncSeparate} | @ref Renderer::setBlendFunction() @fn_gl{BlendFunc}, \n @fn_gl{BlendFuncSeparate} | @ref GL::Renderer::setBlendFunction()
@fn_gl{BlitFramebuffer}, \n `glBlitNamedFramebuffer()` | @ref AbstractFramebuffer::blit() @fn_gl{BlitFramebuffer}, \n `glBlitNamedFramebuffer()` | @ref GL::AbstractFramebuffer::blit()
@fn_gl{BufferData}, \n `glNamedBufferData()`, \n @fn_gl_extension{NamedBufferData,EXT,direct_state_access} | @ref Buffer::setData() @fn_gl{BufferData}, \n `glNamedBufferData()`, \n @fn_gl_extension{NamedBufferData,EXT,direct_state_access} | @ref GL::Buffer::setData()
@fn_gl_extension{BufferPageCommitment,ARB,sparse_buffer}, \n `glNamedBufferPageCommitmentEXT()`, \n `glNamedBufferPageCommitmentARB()` | | @fn_gl_extension{BufferPageCommitment,ARB,sparse_buffer}, \n `glNamedBufferPageCommitmentEXT()`, \n `glNamedBufferPageCommitmentARB()` | |
@fn_gl{BufferStorage}, \n `glNamedBufferStorage()`, \n @fn_gl_extension{NamedBufferStorage,EXT,direct_state_access} | | @fn_gl{BufferStorage}, \n `glNamedBufferStorage()`, \n @fn_gl_extension{NamedBufferStorage,EXT,direct_state_access} | |
@fn_gl{BufferSubData}, \n `glNamedBufferSubData()`, \n @fn_gl_extension{NamedBufferSubData,EXT,direct_state_access} | @ref Buffer::setSubData() @fn_gl{BufferSubData}, \n `glNamedBufferSubData()`, \n @fn_gl_extension{NamedBufferSubData,EXT,direct_state_access} | @ref GL::Buffer::setSubData()
@subsection opengl-mapping-functions-c C @subsection opengl-mapping-functions-c C
@ -94,31 +94,31 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{CheckFramebufferStatus}, \n `glCheckNamedFramebufferStatus()`, \n @fn_gl_extension{CheckNamedFramebufferStatus,EXT,direct_state_access} | @ref DefaultFramebuffer::checkStatus(), \n @ref Framebuffer::checkStatus() @fn_gl{CheckFramebufferStatus}, \n `glCheckNamedFramebufferStatus()`, \n @fn_gl_extension{CheckNamedFramebufferStatus,EXT,direct_state_access} | @ref GL::DefaultFramebuffer::checkStatus(), \n @ref GL::Framebuffer::checkStatus()
@fn_gl{ClampColor} | | @fn_gl{ClampColor} | |
@fn_gl{Clear} | @ref AbstractFramebuffer::clear() @fn_gl{Clear} | @ref GL::AbstractFramebuffer::clear()
@fn_gl{ClearBuffer}, \n `glClearNamedFramebuffer()` | @ref AbstractFramebuffer::clearDepth(), @ref AbstractFramebuffer::clearStencil(), @ref AbstractFramebuffer::clearDepthStencil(), @ref DefaultFramebuffer::clearColor(), @ref Framebuffer::clearColor() @fn_gl{ClearBuffer}, \n `glClearNamedFramebuffer()` | @ref GL::AbstractFramebuffer::clearDepth(), @ref GL::AbstractFramebuffer::clearStencil(), @ref GL::AbstractFramebuffer::clearDepthStencil(), @ref GL::DefaultFramebuffer::clearColor(), @ref GL::Framebuffer::clearColor()
@fn_gl{ClearBufferData}, \n `glClearNamedBufferData()`, \n @fn_gl_extension{ClearNamedBufferData,EXT,direct_state_access} | | @fn_gl{ClearBufferData}, \n `glClearNamedBufferData()`, \n @fn_gl_extension{ClearNamedBufferData,EXT,direct_state_access} | |
@fn_gl{ClearBufferSubData}, \n `glClearNamedBufferSubData()`, \n @fn_gl_extension{ClearNamedBufferSubData,EXT,direct_state_access} | | @fn_gl{ClearBufferSubData}, \n `glClearNamedBufferSubData()`, \n @fn_gl_extension{ClearNamedBufferSubData,EXT,direct_state_access} | |
@fn_gl{ClearColor} | @ref Renderer::setClearColor() @fn_gl{ClearColor} | @ref GL::Renderer::setClearColor()
@fn_gl{ClearDepth} | @ref Renderer::setClearDepth() @fn_gl{ClearDepth} | @ref GL::Renderer::setClearDepth()
@fn_gl{ClearStencil} | @ref Renderer::setClearStencil() @fn_gl{ClearStencil} | @ref GL::Renderer::setClearStencil()
@fn_gl{ClearTexImage} | | @fn_gl{ClearTexImage} | |
@fn_gl{ClearTexSubImage} | | @fn_gl{ClearTexSubImage} | |
@fn_gl{ClientWaitSync} | | @fn_gl{ClientWaitSync} | |
@fn_gl{ClipControl} | | @fn_gl{ClipControl} | |
@fn_gl{ColorMask} | @ref Renderer::setColorMask() @fn_gl{ColorMask} | @ref GL::Renderer::setColorMask()
@fn_gl{CompileShader} | @ref Shader::compile() @fn_gl{CompileShader} | @ref GL::Shader::compile()
@fn_gl{CompressedTexImage1D}, \n @fn_gl{CompressedTexImage2D}, \n @fn_gl{CompressedTexImage3D} | @ref Texture::setCompressedImage(), \n @ref TextureArray::setCompressedImage(), \n @ref CubeMapTexture::setCompressedImage(), \n @ref CubeMapTextureArray::setCompressedImage(), \n @ref RectangleTexture::setCompressedImage() @fn_gl{CompressedTexImage1D}, \n @fn_gl{CompressedTexImage2D}, \n @fn_gl{CompressedTexImage3D} | @ref GL::Texture::setCompressedImage(), \n @ref GL::TextureArray::setCompressedImage(), \n @ref GL::CubeMapTexture::setCompressedImage(), \n @ref GL::CubeMapTextureArray::setCompressedImage(), \n @ref GL::RectangleTexture::setCompressedImage()
@fn_gl{CompressedTexSubImage1D}, \n `glCompressedTextureSubImage1D()`, \n @fn_gl_extension{CompressedTextureSubImage1D,EXT,direct_state_access}, \n @fn_gl{CompressedTexSubImage2D}, \n `glCompressedTextureSubImage2D()`, \n @fn_gl_extension{CompressedTextureSubImage2D,EXT,direct_state_access}, \n @fn_gl{CompressedTexSubImage3D}, \n `glCompressedTextureSubImage3D()`, \n @fn_gl_extension{CompressedTextureSubImage3D,EXT,direct_state_access} | @ref Texture::setCompressedSubImage(), \n @ref TextureArray::setCompressedSubImage(), \n @ref CubeMapTexture::setCompressedSubImage(), \n @ref CubeMapTextureArray::setCompressedSubImage(), \n @ref RectangleTexture::setCompressedSubImage() @fn_gl{CompressedTexSubImage1D}, \n `glCompressedTextureSubImage1D()`, \n @fn_gl_extension{CompressedTextureSubImage1D,EXT,direct_state_access}, \n @fn_gl{CompressedTexSubImage2D}, \n `glCompressedTextureSubImage2D()`, \n @fn_gl_extension{CompressedTextureSubImage2D,EXT,direct_state_access}, \n @fn_gl{CompressedTexSubImage3D}, \n `glCompressedTextureSubImage3D()`, \n @fn_gl_extension{CompressedTextureSubImage3D,EXT,direct_state_access} | @ref GL::Texture::setCompressedSubImage(), \n @ref GL::TextureArray::setCompressedSubImage(), \n @ref GL::CubeMapTexture::setCompressedSubImage(), \n @ref GL::CubeMapTextureArray::setCompressedSubImage(), \n @ref GL::RectangleTexture::setCompressedSubImage()
@fn_gl{CopyBufferSubData}, \n `glCopyNamedBufferSubData()`, \n @fn_gl_extension{NamedCopyBufferSubData,EXT,direct_state_access} | @ref Buffer::copy() @fn_gl{CopyBufferSubData}, \n `glCopyNamedBufferSubData()`, \n @fn_gl_extension{NamedCopyBufferSubData,EXT,direct_state_access} | @ref GL::Buffer::copy()
@fn_gl{CopyImageSubData} | | @fn_gl{CopyImageSubData} | |
@fn_gl{CopyTexImage1D}, \n @fn_gl{CopyTexImage2D} | @ref Framebuffer::copyImage() @fn_gl{CopyTexImage1D}, \n @fn_gl{CopyTexImage2D} | @ref GL::Framebuffer::copyImage()
@fn_gl{CopyTexSubImage1D}, \n `glCopyTextureSubImage1D()`, \n @fn_gl_extension{CopyTextureSubImage1D,EXT,direct_state_access}, \n @fn_gl{CopyTexSubImage2D}, \n `glCopyTextureSubImage2D()`, \n @fn_gl_extension{CopyTextureSubImage2D,EXT,direct_state_access}, \n @fn_gl{CopyTexSubImage3D}, \n `glCopyTextureSubImage3D()`, \n @fn_gl_extension{CopyTextureSubImage3D,EXT,direct_state_access} | @ref Framebuffer::copySubImage() @fn_gl{CopyTexSubImage1D}, \n `glCopyTextureSubImage1D()`, \n @fn_gl_extension{CopyTextureSubImage1D,EXT,direct_state_access}, \n @fn_gl{CopyTexSubImage2D}, \n `glCopyTextureSubImage2D()`, \n @fn_gl_extension{CopyTextureSubImage2D,EXT,direct_state_access}, \n @fn_gl{CopyTexSubImage3D}, \n `glCopyTextureSubImage3D()`, \n @fn_gl_extension{CopyTextureSubImage3D,EXT,direct_state_access} | @ref GL::Framebuffer::copySubImage()
@fn_gl{CreateProgram}, @fn_gl{DeleteProgram} | @ref AbstractShaderProgram constructor and destructor @fn_gl{CreateProgram}, @fn_gl{DeleteProgram} | @ref GL::AbstractShaderProgram constructor and destructor
@fn_gl{CreateShader}, @fn_gl{DeleteShader} | @ref Shader constructor and destructor @fn_gl{CreateShader}, @fn_gl{DeleteShader} | @ref GL::Shader constructor and destructor
@fn_gl{CreateShaderProgram} | | @fn_gl{CreateShaderProgram} | |
@fn_gl{CullFace} | @ref Renderer::setFaceCullingMode() @fn_gl{CullFace} | @ref GL::Renderer::setFaceCullingMode()
@subsection opengl-mapping-functions-d D @subsection opengl-mapping-functions-d D
@ -126,22 +126,22 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{DebugMessageCallback} | @ref DebugOutput::setCallback() @fn_gl{DebugMessageCallback} | @ref GL::DebugOutput::setCallback()
@fn_gl{DebugMessageControl} | @ref DebugOutput::setEnabled() @fn_gl{DebugMessageControl} | @ref GL::DebugOutput::setEnabled()
@fn_gl{DebugMessageInsert}, \n @fn_gl_extension{InsertEventMarker,EXT,debug_marker}, \n @fn_gl_extension{StringMarker,GREMEDY,string_marker} | @ref DebugMessage::insert() @fn_gl{DebugMessageInsert}, \n @fn_gl_extension{InsertEventMarker,EXT,debug_marker}, \n @fn_gl_extension{StringMarker,GREMEDY,string_marker} | @ref GL::DebugMessage::insert()
@fn_gl{DepthFunc} | @ref Renderer::setDepthFunction() @fn_gl{DepthFunc} | @ref GL::Renderer::setDepthFunction()
@fn_gl{DepthMask} | @ref Renderer::setDepthMask() @fn_gl{DepthMask} | @ref GL::Renderer::setDepthMask()
@fn_gl{DepthRange} | | @fn_gl{DepthRange} | |
@fn_gl{DepthRangeArray} | | @fn_gl{DepthRangeArray} | |
@fn_gl{DepthRangeIndexed} | | @fn_gl{DepthRangeIndexed} | |
@fn_gl{DetachShader} | | @fn_gl{DetachShader} | |
@fn_gl{DispatchCompute} | @ref AbstractShaderProgram::dispatchCompute() @fn_gl{DispatchCompute} | @ref GL::AbstractShaderProgram::dispatchCompute()
@fn_gl_extension{DispatchComputeGroupSize,ARB,compute_variable_group_size} | | @fn_gl_extension{DispatchComputeGroupSize,ARB,compute_variable_group_size} | |
@fn_gl{DispatchComputeIndirect} | | @fn_gl{DispatchComputeIndirect} | |
@fn_gl{DrawArrays}, \n @fn_gl{DrawArraysInstanced}, \n @fn_gl{DrawArraysInstancedBaseInstance}, \n @fn_gl{DrawElements}, \n @fn_gl{DrawRangeElements}, \n @fn_gl{DrawElementsBaseVertex}, \n @fn_gl{DrawRangeElementsBaseVertex}, \n @fn_gl{DrawElementsInstanced}, \n @fn_gl{DrawElementsInstancedBaseInstance}, \n @fn_gl{DrawElementsInstancedBaseVertex}, \n @fn_gl{DrawElementsInstancedBaseVertexBaseInstance} | @ref Mesh::draw(AbstractShaderProgram&), \n @ref MeshView::draw(AbstractShaderProgram&) @fn_gl{DrawArrays}, \n @fn_gl{DrawArraysInstanced}, \n @fn_gl{DrawArraysInstancedBaseInstance}, \n @fn_gl{DrawElements}, \n @fn_gl{DrawRangeElements}, \n @fn_gl{DrawElementsBaseVertex}, \n @fn_gl{DrawRangeElementsBaseVertex}, \n @fn_gl{DrawElementsInstanced}, \n @fn_gl{DrawElementsInstancedBaseInstance}, \n @fn_gl{DrawElementsInstancedBaseVertex}, \n @fn_gl{DrawElementsInstancedBaseVertexBaseInstance} | @ref GL::Mesh::draw(AbstractShaderProgram&), \n @ref GL::MeshView::draw(AbstractShaderProgram&)
@fn_gl{DrawArraysIndirect}, \n @fn_gl{DrawElementsIndirect}, \n @fn_gl{MultiDrawArraysIndirect}, \n @fn_gl{MultiDrawElementsIndirect} | | @fn_gl{DrawArraysIndirect}, \n @fn_gl{DrawElementsIndirect}, \n @fn_gl{MultiDrawArraysIndirect}, \n @fn_gl{MultiDrawElementsIndirect} | |
@fn_gl{DrawBuffer}, \n `glNamedFramebufferDrawBuffer()`, \n @fn_gl_extension{FramebufferDrawBuffer,EXT,direct_state_access}, \n @fn_gl{DrawBuffers}, \n `glNamedFramebufferDrawBuffers()`, \n @fn_gl_extension{FramebufferDrawBuffers,EXT,direct_state_access} | @ref DefaultFramebuffer::mapForDraw(), \n @ref Framebuffer::mapForDraw() @fn_gl{DrawBuffer}, \n `glNamedFramebufferDrawBuffer()`, \n @fn_gl_extension{FramebufferDrawBuffer,EXT,direct_state_access}, \n @fn_gl{DrawBuffers}, \n `glNamedFramebufferDrawBuffers()`, \n @fn_gl_extension{FramebufferDrawBuffers,EXT,direct_state_access} | @ref GL::DefaultFramebuffer::mapForDraw(), \n @ref GL::Framebuffer::mapForDraw()
@fn_gl{DrawTransformFeedback}, \n @fn_gl{DrawTransformFeedbackInstanced}, \n @fn_gl{DrawTransformFeedbackStream}, \n @fn_gl{DrawTransformFeedbackStreamInstanced} | @ref Mesh::draw(AbstractShaderProgram&, TransformFeedback&, UnsignedInt), \n @ref MeshView::draw(AbstractShaderProgram&, TransformFeedback&, UnsignedInt) @fn_gl{DrawTransformFeedback}, \n @fn_gl{DrawTransformFeedbackInstanced}, \n @fn_gl{DrawTransformFeedbackStream}, \n @fn_gl{DrawTransformFeedbackStreamInstanced} | @ref GL::Mesh::draw(AbstractShaderProgram&, TransformFeedback&, UnsignedInt), \n @ref GL::MeshView::draw(AbstractShaderProgram&, TransformFeedback&, UnsignedInt)
@subsection opengl-mapping-functions-e E @subsection opengl-mapping-functions-e E
@ -149,8 +149,8 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{Enable}, `glDisable()` | @ref Renderer::setFeature() @fn_gl{Enable}, `glDisable()` | @ref GL::Renderer::setFeature()
@fn_gl{EnableVertexAttribArray}, \n `glEnableVertexArrayAttrib()`, \n @fn_gl_extension{EnableVertexArrayAttrib,EXT,direct_state_access}, \n `glDisableVertexAttribArray()`, \n `glDisableVertexArrayAttrib()`, \n `glDisableVertexArrayAttribEXT()` | @ref Mesh::addVertexBuffer() @fn_gl{EnableVertexAttribArray}, \n `glEnableVertexArrayAttrib()`, \n @fn_gl_extension{EnableVertexArrayAttrib,EXT,direct_state_access}, \n `glDisableVertexAttribArray()`, \n `glDisableVertexArrayAttrib()`, \n `glDisableVertexArrayAttribEXT()` | @ref GL::Mesh::addVertexBuffer()
@subsection opengl-mapping-functions-f F @subsection opengl-mapping-functions-f F
@ -159,16 +159,16 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{FenceSync}, @fn_gl{DeleteSync} | | @fn_gl{FenceSync}, @fn_gl{DeleteSync} | |
@fn_gl{Finish} | @ref Renderer::finish() @fn_gl{Finish} | @ref GL::Renderer::finish()
@fn_gl{Flush} | @ref Renderer::flush() @fn_gl{Flush} | @ref GL::Renderer::flush()
@fn_gl{FlushMappedBufferRange}, \n `glFlushMappedNamedBufferRange()`, \n @fn_gl_extension{FlushMappedNamedBufferRange,EXT,direct_state_access} | @ref Buffer::flushMappedRange() @fn_gl{FlushMappedBufferRange}, \n `glFlushMappedNamedBufferRange()`, \n @fn_gl_extension{FlushMappedNamedBufferRange,EXT,direct_state_access} | @ref GL::Buffer::flushMappedRange()
@fn_gl2{FramebufferParameter,FramebufferParameteri}, \n `glNamedFramebufferParameter()`, \n @fn_gl_extension{NamedFramebufferParameter,EXT,direct_state_access} | | @fn_gl2{FramebufferParameter,FramebufferParameteri}, \n `glNamedFramebufferParameter()`, \n @fn_gl_extension{NamedFramebufferParameter,EXT,direct_state_access} | |
@fn_gl{FramebufferRenderbuffer}, \n `glNamedFramebufferRenderbuffer()`, \n @fn_gl_extension{NamedFramebufferRenderbuffer,EXT,direct_state_access} | @ref Framebuffer::attachRenderbuffer(), \n @ref Framebuffer::detach() @fn_gl{FramebufferRenderbuffer}, \n `glNamedFramebufferRenderbuffer()`, \n @fn_gl_extension{NamedFramebufferRenderbuffer,EXT,direct_state_access} | @ref GL::Framebuffer::attachRenderbuffer(), \n @ref GL::Framebuffer::detach()
@fn_gl{FramebufferTexture}, \n `glNamedFramebufferTexture()`, \n @fn_gl_extension{NamedFramebufferTexture,EXT,direct_state_access} | @ref Framebuffer::attachLayeredTexture() @fn_gl{FramebufferTexture}, \n `glNamedFramebufferTexture()`, \n @fn_gl_extension{NamedFramebufferTexture,EXT,direct_state_access} | @ref GL::Framebuffer::attachLayeredTexture()
@fn_gl2{FramebufferTexture1D,FramebufferTexture}, \n @fn_gl_extension{NamedFramebufferTexture1D,EXT,direct_state_access}, \n `glFramebufferTexture2D()`, \n `glNamedFramebufferTexture2DEXT()` | @ref Framebuffer::attachTexture(), \n @ref Framebuffer::attachCubeMapTexture() @fn_gl2{FramebufferTexture1D,FramebufferTexture}, \n @fn_gl_extension{NamedFramebufferTexture1D,EXT,direct_state_access}, \n `glFramebufferTexture2D()`, \n `glNamedFramebufferTexture2DEXT()` | @ref GL::Framebuffer::attachTexture(), \n @ref GL::Framebuffer::attachCubeMapTexture()
@fn_gl2{FramebufferTexture3D,FramebufferTexture} | not used, @fn_gl{FramebufferTextureLayer} has more complete features @fn_gl2{FramebufferTexture3D,FramebufferTexture} | not used, @fn_gl{FramebufferTextureLayer} has more complete features
@fn_gl{FramebufferTextureLayer}, \n `glNamedFramebufferTextureLayer()`, \n @fn_gl_extension{NamedFramebufferTextureLayer,EXT,direct_state_access} | @ref Framebuffer::attachTextureLayer(), \n @ref Framebuffer::attachCubeMapTexture() @fn_gl{FramebufferTextureLayer}, \n `glNamedFramebufferTextureLayer()`, \n @fn_gl_extension{NamedFramebufferTextureLayer,EXT,direct_state_access} | @ref GL::Framebuffer::attachTextureLayer(), \n @ref GL::Framebuffer::attachCubeMapTexture()
@fn_gl{FrontFace} | @ref Renderer::setFrontFace() @fn_gl{FrontFace} | @ref GL::Renderer::setFrontFace()
@subsection opengl-mapping-functions-g G @subsection opengl-mapping-functions-g G
@ -176,37 +176,37 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{GenBuffers}, \n @fn_gl{CreateBuffers}, \n @fn_gl{DeleteBuffers} | @ref Buffer constructor and destructor @fn_gl{GenBuffers}, \n @fn_gl{CreateBuffers}, \n @fn_gl{DeleteBuffers} | @ref GL::Buffer constructor and destructor
@fn_gl{GenFramebuffers}, \n @fn_gl{CreateFramebuffers}, \n @fn_gl{DeleteFramebuffers} | @ref Framebuffer constructor and destructor @fn_gl{GenFramebuffers}, \n @fn_gl{CreateFramebuffers}, \n @fn_gl{DeleteFramebuffers} | @ref GL::Framebuffer constructor and destructor
@fn_gl{GenProgramPipelines}, \n @fn_gl{CreateProgramPipelines}, \n @fn_gl{DeleteProgramPipelines} | | @fn_gl{GenProgramPipelines}, \n @fn_gl{CreateProgramPipelines}, \n @fn_gl{DeleteProgramPipelines} | |
@fn_gl{GenQueries}, \n @fn_gl{CreateQueries}, \n @fn_gl{DeleteQueries} | @ref AbstractQuery constructor and destructor @fn_gl{GenQueries}, \n @fn_gl{CreateQueries}, \n @fn_gl{DeleteQueries} | @ref GL::AbstractQuery constructor and destructor
@fn_gl{GenRenderbuffers}, \n @fn_gl{CreateRenderbuffers}, \n @fn_gl{DeleteRenderbuffers} | @ref Renderbuffer constructor and destructor @fn_gl{GenRenderbuffers}, \n @fn_gl{CreateRenderbuffers}, \n @fn_gl{DeleteRenderbuffers} | @ref GL::Renderbuffer constructor and destructor
@fn_gl{GenSamplers}, \n @fn_gl{CreateSamplers}, \n @fn_gl{DeleteSamplers} | | @fn_gl{GenSamplers}, \n @fn_gl{CreateSamplers}, \n @fn_gl{DeleteSamplers} | |
@fn_gl{GenTextures}, \n @fn_gl{CreateTextures}, \n @fn_gl{DeleteTextures} | @ref AbstractTexture constructor and destructor @fn_gl{GenTextures}, \n @fn_gl{CreateTextures}, \n @fn_gl{DeleteTextures} | @ref GL::AbstractTexture constructor and destructor
@fn_gl{GenTransformFeedbacks}, \n @fn_gl{CreateTransformFeedbacks}, \n @fn_gl{DeleteTransformFeedbacks} | | @fn_gl{GenTransformFeedbacks}, \n @fn_gl{CreateTransformFeedbacks}, \n @fn_gl{DeleteTransformFeedbacks} | |
@fn_gl{GenVertexArrays}, \n @fn_gl{CreateVertexArrays}, \n @fn_gl{DeleteVertexArrays} | @ref Mesh constructor and destructor @fn_gl{GenVertexArrays}, \n @fn_gl{CreateVertexArrays}, \n @fn_gl{DeleteVertexArrays} | @ref GL::Mesh constructor and destructor
@fn_gl{GenerateMipmap}, \n `glGenerateTextureMipmap()`, \n @fn_gl_extension{GenerateTextureMipmap,EXT,direct_state_access} | @ref Texture::generateMipmap(), \n @ref TextureArray::generateMipmap(), \n @ref CubeMapTexture::generateMipmap(), \n @ref CubeMapTextureArray::generateMipmap() @fn_gl{GenerateMipmap}, \n `glGenerateTextureMipmap()`, \n @fn_gl_extension{GenerateTextureMipmap,EXT,direct_state_access} | @ref GL::Texture::generateMipmap(), \n @ref GL::TextureArray::generateMipmap(), \n @ref GL::CubeMapTexture::generateMipmap(), \n @ref GL::CubeMapTextureArray::generateMipmap()
@fn_gl{Get} | see @ref opengl-mapping-state "table below" @fn_gl{Get} | see @ref opengl-mapping-state "table below"
@fn_gl2{GetActiveAtomicCounterBuffer,GetActiveAtomicCounterBufferiv} | not queryable @fn_gl2{GetActiveAtomicCounterBuffer,GetActiveAtomicCounterBufferiv} | not queryable
@fn_gl{GetActiveAttrib}, \n @fn_gl{GetActiveSubroutineName}, \n @fn_gl{GetActiveSubroutineUniform}, \n @fn_gl{GetActiveSubroutineUniformName}, \n @fn_gl{GetActiveUniform}, \n @fn_gl{GetActiveUniformBlock}, \n @fn_gl{GetActiveUniformBlockName}, \n @fn_gl{GetActiveUniformName}, \n @fn_gl{GetActiveUniforms} | not queryable @fn_gl{GetActiveAttrib}, \n @fn_gl{GetActiveSubroutineName}, \n @fn_gl{GetActiveSubroutineUniform}, \n @fn_gl{GetActiveSubroutineUniformName}, \n @fn_gl{GetActiveUniform}, \n @fn_gl{GetActiveUniformBlock}, \n @fn_gl{GetActiveUniformBlockName}, \n @fn_gl{GetActiveUniformName}, \n @fn_gl{GetActiveUniforms} | not queryable
@fn_gl{GetAttachedShaders} | not queryable, @ref AbstractShaderProgram::attachShader() setter only @fn_gl{GetAttachedShaders} | not queryable, @ref GL::AbstractShaderProgram::attachShader() setter only
@fn_gl{GetAttribLocation} | not queryable, @ref AbstractShaderProgram::bindAttributeLocation() setter only @fn_gl{GetAttribLocation} | not queryable, @ref GL::AbstractShaderProgram::bindAttributeLocation() setter only
@fn_gl{GetBufferParameter}, \n `glGetNamedBufferParameter()`, \n @fn_gl_extension{GetNamedBufferParameter,EXT,direct_state_access} | @ref Buffer::size() @fn_gl{GetBufferParameter}, \n `glGetNamedBufferParameter()`, \n @fn_gl_extension{GetNamedBufferParameter,EXT,direct_state_access} | @ref GL::Buffer::size()
@fn_gl2{GetBufferPointer,GetBufferPointerv}, \n `glGetNamedBufferPointer()`, \n @fn_gl_extension{GetNamedBufferPointer,EXT,direct_state_access} | not queryable, @ref Buffer::map() setter only @fn_gl2{GetBufferPointer,GetBufferPointerv}, \n `glGetNamedBufferPointer()`, \n @fn_gl_extension{GetNamedBufferPointer,EXT,direct_state_access} | not queryable, @ref GL::Buffer::map() setter only
@fn_gl{GetBufferSubData}, \n `glGetNamedBufferSubData()`, \n @fn_gl_extension{GetNamedBufferSubData,EXT,direct_state_access} | @ref Buffer::data(), \n @ref Buffer::subData() @fn_gl{GetBufferSubData}, \n `glGetNamedBufferSubData()`, \n @fn_gl_extension{GetNamedBufferSubData,EXT,direct_state_access} | @ref GL::Buffer::data(), \n @ref GL::Buffer::subData()
@fn_gl{GetCompressedTexImage}, \n `glGetnCompressedTexImage()`, \n @fn_gl_extension{GetnCompressedTexImage,ARB,robustness}, \n `glGetCompressedTextureImage()`, \n @fn_gl_extension{GetCompressedTextureImage,EXT,direct_state_access} | @ref Texture::compressedImage(), \n @ref TextureArray::compressedImage(), \n @ref CubeMapTexture::compressedImage(), \n @ref CubeMapTextureArray::compressedImage(), \n @ref RectangleTexture::compressedImage() @fn_gl{GetCompressedTexImage}, \n `glGetnCompressedTexImage()`, \n @fn_gl_extension{GetnCompressedTexImage,ARB,robustness}, \n `glGetCompressedTextureImage()`, \n @fn_gl_extension{GetCompressedTextureImage,EXT,direct_state_access} | @ref GL::Texture::compressedImage(), \n @ref GL::TextureArray::compressedImage(), \n @ref GL::CubeMapTexture::compressedImage(), \n @ref GL::CubeMapTextureArray::compressedImage(), \n @ref GL::RectangleTexture::compressedImage()
@fn_gl{GetCompressedTextureSubImage} | @ref Texture::compressedSubImage(), \n @ref TextureArray::compressedSubImage(), \n @ref CubeMapTexture::compressedImage(), \n @ref CubeMapTexture::compressedSubImage(), \n @ref CubeMapTextureArray::compressedSubImage(), \n @ref RectangleTexture::compressedSubImage() @fn_gl{GetCompressedTextureSubImage} | @ref GL::Texture::compressedSubImage(), \n @ref GL::TextureArray::compressedSubImage(), \n @ref GL::CubeMapTexture::compressedImage(), \n @ref GL::CubeMapTexture::compressedSubImage(), \n @ref GL::CubeMapTextureArray::compressedSubImage(), \n @ref GL::RectangleTexture::compressedSubImage()
@fn_gl{GetDebugMessageLog} | | @fn_gl{GetDebugMessageLog} | |
@fn_gl{GetError} | @ref Renderer::error() @fn_gl{GetError} | @ref GL::Renderer::error()
@fn_gl{GetFragDataIndex}, @fn_gl{GetFragDataLocation} | not queryable, @ref AbstractShaderProgram::bindFragmentDataLocation() and \n @ref AbstractShaderProgram::bindFragmentDataLocationIndexed() setters only @fn_gl{GetFragDataIndex}, @fn_gl{GetFragDataLocation} | not queryable, @ref GL::AbstractShaderProgram::bindFragmentDataLocation() and \n @ref GL::AbstractShaderProgram::bindFragmentDataLocationIndexed() setters only
@fn_gl{GetFramebufferAttachmentParameter}, \n `glGetNamedFramebufferAttachmentParameter()`, \n @fn_gl_extension{GetNamedFramebufferAttachmentParameter,EXT,direct_state_access} | not queryable, @ref Framebuffer setters only @fn_gl{GetFramebufferAttachmentParameter}, \n `glGetNamedFramebufferAttachmentParameter()`, \n @fn_gl_extension{GetNamedFramebufferAttachmentParameter,EXT,direct_state_access} | not queryable, @ref GL::Framebuffer setters only
@fn_gl{GetFramebufferParameter}, \n `glGetNamedFramebufferParameter()`, \n @fn_gl_extension{GetNamedFramebufferParameter,EXT,direct_state_access} | not queryable, @ref DefaultFramebuffer and \n @ref Framebuffer setters only @fn_gl{GetFramebufferParameter}, \n `glGetNamedFramebufferParameter()`, \n @fn_gl_extension{GetNamedFramebufferParameter,EXT,direct_state_access} | not queryable, @ref GL::DefaultFramebuffer and \n @ref GL::Framebuffer setters only
@fn_gl{GetGraphicsResetStatus}, \n @fn_gl_extension{GetGraphicsResetStatus,ARB,robustness} | @ref Renderer::graphicsResetStatus() @fn_gl{GetGraphicsResetStatus}, \n @fn_gl_extension{GetGraphicsResetStatus,ARB,robustness} | @ref GL::Renderer::graphicsResetStatus()
@fn_gl_extension{GetImageHandle,ARB,bindless_texture} | | @fn_gl_extension{GetImageHandle,ARB,bindless_texture} | |
@fn_gl{GetInternalformat} | | @fn_gl{GetInternalformat} | |
@fn_gl{GetMultisample} | | @fn_gl{GetMultisample} | |
@fn_gl{GetObjectLabel}, \n @fn_gl{GetObjectPtrLabel} | @ref AbstractShaderProgram::label(), \n @ref AbstractQuery::label(), \n @ref AbstractTexture::label(), \n @ref Buffer::label(), \n @ref Framebuffer::label(), \n @ref Mesh::label(), \n @ref Renderbuffer::label(), \n @ref Shader::label() @fn_gl{GetObjectLabel}, \n @fn_gl{GetObjectPtrLabel} | @ref GL::AbstractShaderProgram::label(), \n @ref GL::AbstractQuery::label(), \n @ref GL::AbstractTexture::label(), \n @ref GL::Buffer::label(), \n @ref GL::Framebuffer::label(), \n @ref GL::Mesh::label(), \n @ref GL::Renderbuffer::label(), \n @ref GL::Shader::label()
@fn_gl{GetProgram}, \n @fn_gl{GetProgramInfoLog} | @ref AbstractShaderProgram::link(), \n @ref AbstractShaderProgram::validate() @fn_gl{GetProgram}, \n @fn_gl{GetProgramInfoLog} | @ref GL::AbstractShaderProgram::link(), \n @ref GL::AbstractShaderProgram::validate()
@fn_gl{GetProgramBinary} | | @fn_gl{GetProgramBinary} | |
@fn_gl{GetProgramInterface} | | @fn_gl{GetProgramInterface} | |
@fn_gl{GetProgramPipeline} | | @fn_gl{GetProgramPipeline} | |
@ -218,32 +218,32 @@ OpenGL function | Matching API
@fn_gl{GetProgramResourceName} | | @fn_gl{GetProgramResourceName} | |
@fn_gl{GetProgramStage} | | @fn_gl{GetProgramStage} | |
@fn_gl{GetQueryIndexed} | | @fn_gl{GetQueryIndexed} | |
@fn_gl{GetQueryObject} | @ref AbstractQuery::result() @fn_gl{GetQueryObject} | @ref GL::AbstractQuery::result()
@fn_gl{GetQueryBufferObject} | | @fn_gl{GetQueryBufferObject} | |
@fn_gl2{GetQuery,GetQueryiv} | | @fn_gl2{GetQuery,GetQueryiv} | |
@fn_gl{GetRenderbufferParameter}, \n `glGetNamedRenderbufferParameter()`, \n @fn_gl_extension{GetNamedRenderbufferParameter,EXT,direct_state_access} | not queryable, @ref Renderbuffer::setStorage() and \n @ref Renderbuffer::setStorageMultisample() setter only @fn_gl{GetRenderbufferParameter}, \n `glGetNamedRenderbufferParameter()`, \n @fn_gl_extension{GetNamedRenderbufferParameter,EXT,direct_state_access} | not queryable, @ref GL::Renderbuffer::setStorage() and \n @ref GL::Renderbuffer::setStorageMultisample() setter only
@fn_gl{GetSamplerParameter} | | @fn_gl{GetSamplerParameter} | |
@fn_gl{GetShader}, \n @fn_gl{GetShaderInfoLog} | @ref Shader::compile() @fn_gl{GetShader}, \n @fn_gl{GetShaderInfoLog} | @ref GL::Shader::compile()
@fn_gl{GetShaderPrecisionFormat} | | @fn_gl{GetShaderPrecisionFormat} | |
@fn_gl{GetShaderSource} | not queryable but tracked in @ref Shader::sources() @fn_gl{GetShaderSource} | not queryable but tracked in @ref GL::Shader::sources()
@fn_gl{GetString} | @ref Context::supportedExtensions(), \n @ref Context::rendererString(), \n @ref Context::shadingLanguageVersionString(), \n @ref Context::vendorString(), \n @ref Context::versionString() @fn_gl{GetString} | @ref GL::Context::supportedExtensions(), \n @ref GL::Context::rendererString(), \n @ref GL::Context::shadingLanguageVersionString(), \n @ref GL::Context::vendorString(), \n @ref GL::Context::versionString()
@fn_gl{GetSubroutineIndex} | | @fn_gl{GetSubroutineIndex} | |
@fn_gl{GetSubroutineUniformLocation} | | @fn_gl{GetSubroutineUniformLocation} | |
@fn_gl{GetSync} | | @fn_gl{GetSync} | |
@fn_gl{GetTexImage}, \n `glGetnTexImage()`, \n @fn_gl_extension{GetnTexImage,ARB,robustness}, \n `glGetTextureImage()`, \n @fn_gl_extension{GetTextureImage,EXT,direct_state_access} | @ref Texture::image(), \n @ref TextureArray::image(), \n @ref CubeMapTexture::image(), \n @ref CubeMapTextureArray::image(), \n @ref RectangleTexture::image() @fn_gl{GetTexImage}, \n `glGetnTexImage()`, \n @fn_gl_extension{GetnTexImage,ARB,robustness}, \n `glGetTextureImage()`, \n @fn_gl_extension{GetTextureImage,EXT,direct_state_access} | @ref GL::Texture::image(), \n @ref GL::TextureArray::image(), \n @ref GL::CubeMapTexture::image(), \n @ref GL::CubeMapTextureArray::image(), \n @ref GL::RectangleTexture::image()
@fn_gl{GetTexLevelParameter}, \n `glGetTextureLevelParameter()`, \n @fn_gl_extension{GetTextureLevelParameter,EXT,direct_state_access} | @ref Texture::imageSize(), \n @ref TextureArray::imageSize(), \n @ref CubeMapTexture::imageSize(), \n @ref CubeMapTextureArray::imageSize(), \n @ref RectangleTexture::imageSize() @fn_gl{GetTexLevelParameter}, \n `glGetTextureLevelParameter()`, \n @fn_gl_extension{GetTextureLevelParameter,EXT,direct_state_access} | @ref GL::Texture::imageSize(), \n @ref GL::TextureArray::imageSize(), \n @ref GL::CubeMapTexture::imageSize(), \n @ref GL::CubeMapTextureArray::imageSize(), \n @ref GL::RectangleTexture::imageSize()
@fn_gl{GetTexParameter}, \n `glGetTextureParameter()`, \n @fn_gl_extension{GetTextureParameter,EXT,direct_state_access} | | @fn_gl{GetTexParameter}, \n `glGetTextureParameter()`, \n @fn_gl_extension{GetTextureParameter,EXT,direct_state_access} | |
@fn_gl_extension{GetTextureHandle,ARB,bindless_texture} | | @fn_gl_extension{GetTextureHandle,ARB,bindless_texture} | |
@fn_gl_extension{GetTextureSamplerHandle,ARB,bindless_texture} | | @fn_gl_extension{GetTextureSamplerHandle,ARB,bindless_texture} | |
@fn_gl{GetTextureSubImage} | @ref Texture::subImage(), \n @ref TextureArray::subImage(), \n @ref CubeMapTexture::image(), \n @ref CubeMapTexture::subImage(), \n @ref CubeMapTextureArray::subImage(), \n @ref RectangleTexture::subImage() @fn_gl{GetTextureSubImage} | @ref GL::Texture::subImage(), \n @ref GL::TextureArray::subImage(), \n @ref GL::CubeMapTexture::image(), \n @ref GL::CubeMapTexture::subImage(), \n @ref GL::CubeMapTextureArray::subImage(), \n @ref GL::RectangleTexture::subImage()
@fn_gl{GetTransformFeedback} | not queryable, @ref TransformFeedback::attachBuffer() and @ref TransformFeedback::attachBuffers() setters only @fn_gl{GetTransformFeedback} | not queryable, @ref GL::TransformFeedback::attachBuffer() and @ref GL::TransformFeedback::attachBuffers() setters only
@fn_gl{GetTransformFeedbackVarying} | not queryable, @ref AbstractShaderProgram::setTransformFeedbackOutputs() setter only @fn_gl{GetTransformFeedbackVarying} | not queryable, @ref GL::AbstractShaderProgram::setTransformFeedbackOutputs() setter only
@fn_gl{GetUniform}, \n `glGetnUniform()`, \n @fn_gl_extension{GetnUniform,ARB,robustness} | not queryable, @ref AbstractShaderProgram::setUniform() setter only @fn_gl{GetUniform}, \n `glGetnUniform()`, \n @fn_gl_extension{GetnUniform,ARB,robustness} | not queryable, @ref GL::AbstractShaderProgram::setUniform() setter only
@fn_gl{GetUniformBlockIndex} | @ref AbstractShaderProgram::uniformBlockIndex() @fn_gl{GetUniformBlockIndex} | @ref GL::AbstractShaderProgram::uniformBlockIndex()
@fn_gl{GetUniformIndices} | | @fn_gl{GetUniformIndices} | |
@fn_gl{GetUniformLocation} | @ref AbstractShaderProgram::uniformLocation() @fn_gl{GetUniformLocation} | @ref GL::AbstractShaderProgram::uniformLocation()
@fn_gl{GetUniformSubroutine} | | @fn_gl{GetUniformSubroutine} | |
@fn_gl{GetVertexAttrib}, \n @fn_gl{GetVertexArray}, \n @fn_gl_extension{GetVertexArray,EXT,direct_state_access} | not queryable, @ref Mesh::addVertexBuffer() setter only @fn_gl{GetVertexAttrib}, \n @fn_gl{GetVertexArray}, \n @fn_gl_extension{GetVertexArray,EXT,direct_state_access} | not queryable, @ref GL::Mesh::addVertexBuffer() setter only
@subsection opengl-mapping-functions-h H @subsection opengl-mapping-functions-h H
@ -251,7 +251,7 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{Hint} | @ref Renderer::setHint() @fn_gl{Hint} | @ref GL::Renderer::setHint()
@subsection opengl-mapping-functions-i I @subsection opengl-mapping-functions-i I
@ -259,14 +259,14 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{InvalidateBufferData} | @ref Buffer::invalidateData() @fn_gl{InvalidateBufferData} | @ref GL::Buffer::invalidateData()
@fn_gl{InvalidateBufferSubData} | @ref Buffer::invalidateSubData() @fn_gl{InvalidateBufferSubData} | @ref GL::Buffer::invalidateSubData()
@fn_gl{InvalidateFramebuffer}, \n `glInvalidateNamedFramebufferData()`, \n @fn_gl_extension{DiscardFramebuffer,EXT,discard_framebuffer} | @ref DefaultFramebuffer::invalidate(), \n @ref Framebuffer::invalidate() @fn_gl{InvalidateFramebuffer}, \n `glInvalidateNamedFramebufferData()`, \n @fn_gl_extension{DiscardFramebuffer,EXT,discard_framebuffer} | @ref GL::DefaultFramebuffer::invalidate(), \n @ref GL::Framebuffer::invalidate()
@fn_gl{InvalidateSubFramebuffer}, \n `glInvalidateNamedFramebufferSubData()` | @ref DefaultFramebuffer::invalidate(), \n @ref Framebuffer::invalidate() @fn_gl{InvalidateSubFramebuffer}, \n `glInvalidateNamedFramebufferSubData()` | @ref GL::DefaultFramebuffer::invalidate(), \n @ref GL::Framebuffer::invalidate()
@fn_gl{InvalidateTexImage} | @ref Texture::invalidateImage(), \n @ref TextureArray::invalidateImage(), \n @ref CubeMapTexture::invalidateImage(), \n @ref CubeMapTextureArray::invalidateImage(), \n @ref RectangleTexture::invalidateImage(), \n @ref MultisampleTexture::invalidateImage() @fn_gl{InvalidateTexImage} | @ref GL::Texture::invalidateImage(), \n @ref GL::TextureArray::invalidateImage(), \n @ref GL::CubeMapTexture::invalidateImage(), \n @ref GL::CubeMapTextureArray::invalidateImage(), \n @ref GL::RectangleTexture::invalidateImage(), \n @ref GL::MultisampleTexture::invalidateImage()
@fn_gl{InvalidateTexSubImage} | @ref Texture::invalidateSubImage(), \n @ref TextureArray::invalidateSubImage(), \n @ref CubeMapTexture::invalidateSubImage(), \n @ref CubeMapTextureArray::invalidateSubImage(), \n @ref RectangleTexture::invalidateSubImage(), \n @ref MultisampleTexture::invalidateSubImage() @fn_gl{InvalidateTexSubImage} | @ref GL::Texture::invalidateSubImage(), \n @ref GL::TextureArray::invalidateSubImage(), \n @ref GL::CubeMapTexture::invalidateSubImage(), \n @ref GL::CubeMapTextureArray::invalidateSubImage(), \n @ref GL::RectangleTexture::invalidateSubImage(), \n @ref GL::MultisampleTexture::invalidateSubImage()
@fn_gl{IsBuffer}, \n @fn_gl{IsFramebuffer}, \n @fn_gl{IsProgram}, \n @fn_gl{IsProgramPipeline}, \n @fn_gl{IsQuery}, \n @fn_gl{IsRenderbuffer}, \n @fn_gl{IsSampler}, \n @fn_gl{IsShader}, \n @fn_gl{IsSync}, \n @fn_gl{IsTexture}, \n @fn_gl{IsTransformFeedback}, \n @fn_gl{IsVertexArray} | not needed, objects are strongly typed @fn_gl{IsBuffer}, \n @fn_gl{IsFramebuffer}, \n @fn_gl{IsProgram}, \n @fn_gl{IsProgramPipeline}, \n @fn_gl{IsQuery}, \n @fn_gl{IsRenderbuffer}, \n @fn_gl{IsSampler}, \n @fn_gl{IsShader}, \n @fn_gl{IsSync}, \n @fn_gl{IsTexture}, \n @fn_gl{IsTransformFeedback}, \n @fn_gl{IsVertexArray} | not needed, objects are strongly typed
@fn_gl{IsEnabled} | not queryable, @ref Renderer::setFeature() setter only @fn_gl{IsEnabled} | not queryable, @ref GL::Renderer::setFeature() setter only
@fn_gl_extension{IsImageHandleResident,ARB,bindless_texture} | | @fn_gl_extension{IsImageHandleResident,ARB,bindless_texture} | |
@fn_gl_extension{IsTextureHandleResident,ARB,bindless_texture} | | @fn_gl_extension{IsTextureHandleResident,ARB,bindless_texture} | |
@ -276,9 +276,9 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{LineWidth} | @ref Renderer::setLineWidth() @fn_gl{LineWidth} | @ref GL::Renderer::setLineWidth()
@fn_gl{LinkProgram} | @ref AbstractShaderProgram::link() @fn_gl{LinkProgram} | @ref GL::AbstractShaderProgram::link()
@fn_gl{LogicOp} | @ref Renderer::setLogicOperation() @fn_gl{LogicOp} | @ref GL::Renderer::setLogicOperation()
@subsection opengl-mapping-functions-m M @subsection opengl-mapping-functions-m M
@ -290,10 +290,10 @@ OpenGL function | Matching API
@fn_gl_extension{MakeImageHandleNonResident,ARB,bindless_texture} | | @fn_gl_extension{MakeImageHandleNonResident,ARB,bindless_texture} | |
@fn_gl_extension{MakeTextureHandleResident,ARB,bindless_texture} | | @fn_gl_extension{MakeTextureHandleResident,ARB,bindless_texture} | |
@fn_gl_extension{MakeTextureHandleNonResident,ARB,bindless_texture} | | @fn_gl_extension{MakeTextureHandleNonResident,ARB,bindless_texture} | |
@fn_gl{MapBuffer}, \n `glMapNamedBuffer()`, \n @fn_gl_extension{MapNamedBuffer,EXT,direct_state_access}, \n @fn_gl{MapBufferRange}, \n `glMapNamedBufferRange()`, \n @fn_gl_extension{MapNamedBufferRange,EXT,direct_state_access}, \n @fn_gl{UnmapBuffer}, \n `glUnmapNamedBuffer()`, \n @fn_gl_extension{UnmapNamedBuffer,EXT,direct_state_access} | @ref Buffer::map(), @ref Buffer::unmap() @fn_gl{MapBuffer}, \n `glMapNamedBuffer()`, \n @fn_gl_extension{MapNamedBuffer,EXT,direct_state_access}, \n @fn_gl{MapBufferRange}, \n `glMapNamedBufferRange()`, \n @fn_gl_extension{MapNamedBufferRange,EXT,direct_state_access}, \n @fn_gl{UnmapBuffer}, \n `glUnmapNamedBuffer()`, \n @fn_gl_extension{UnmapNamedBuffer,EXT,direct_state_access} | @ref GL::Buffer::map(), @ref GL::Buffer::unmap()
@fn_gl{MemoryBarrier}, \n `glMemoryBarrierByRegion()` | @ref Renderer::setMemoryBarrier(), \n @ref Renderer::setMemoryBarrierByRegion() @fn_gl{MemoryBarrier}, \n `glMemoryBarrierByRegion()` | @ref GL::Renderer::setMemoryBarrier(), \n @ref GL::Renderer::setMemoryBarrierByRegion()
@fn_gl{MinSampleShading} | | @fn_gl{MinSampleShading} | |
@fn_gl{MultiDrawArrays}, \n @fn_gl{MultiDrawElements}, \n @fn_gl{MultiDrawElementsBaseVertex} | @ref MeshView::draw(AbstractShaderProgram&, std::initializer_list<std::reference_wrapper<MeshView>>) @fn_gl{MultiDrawArrays}, \n @fn_gl{MultiDrawElements}, \n @fn_gl{MultiDrawElementsBaseVertex} | @ref GL::MeshView::draw(AbstractShaderProgram&, std::initializer_list<std::reference_wrapper<MeshView>>)
@fn_gl{MultiDrawArraysIndirectCount}, \n @fn_gl{MultiDrawElementsIndirectCount} | | @fn_gl{MultiDrawArraysIndirectCount}, \n @fn_gl{MultiDrawElementsIndirectCount} | |
@subsection opengl-mapping-functions-o O @subsection opengl-mapping-functions-o O
@ -302,7 +302,7 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{ObjectLabel}, \n @fn_gl{ObjectPtrLabel}, \n @fn_gl_extension{LabelObject,EXT,debug_label} | @ref AbstractShaderProgram::setLabel(), \n @ref AbstractQuery::setLabel(), \n @ref AbstractTexture::setLabel(), \n @ref Buffer::setLabel(), \n @ref Framebuffer::setLabel(), \n @ref Mesh::setLabel(), \n @ref Renderbuffer::setLabel(), \n @ref Shader::setLabel() @fn_gl{ObjectLabel}, \n @fn_gl{ObjectPtrLabel}, \n @fn_gl_extension{LabelObject,EXT,debug_label} | @ref GL::AbstractShaderProgram::setLabel(), \n @ref GL::AbstractQuery::setLabel(), \n @ref GL::AbstractTexture::setLabel(), \n @ref GL::Buffer::setLabel(), \n @ref GL::Framebuffer::setLabel(), \n @ref GL::Mesh::setLabel(), \n @ref GL::Renderbuffer::setLabel(), \n @ref GL::Shader::setLabel()
@subsection opengl-mapping-functions-p P @subsection opengl-mapping-functions-p P
@ -311,20 +311,20 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{PatchParameter} | | @fn_gl{PatchParameter} | |
@fn_gl{PauseTransformFeedback}, @fn_gl{ResumeTransformFeedback} | @ref TransformFeedback::pause(), @ref TransformFeedback::resume() @fn_gl{PauseTransformFeedback}, @fn_gl{ResumeTransformFeedback} | @ref GL::TransformFeedback::pause(), @ref GL::TransformFeedback::resume()
@fn_gl{PixelStore} | @ref Texture::setImage(), \n @ref TextureArray::setImage(), \n @ref CubeMapTexture::setImage(), \n @ref CubeMapTextureArray::setImage(), \n @ref RectangleTexture::setImage(), \n @ref Texture::setSubImage(), \n @ref TextureArray::setSubImage(), \n @ref CubeMapTexture::setSubImage(), \n @ref CubeMapTextureArray::setSubImage(), \n @ref RectangleTexture::setSubImage(), \n @ref Texture::image(), @ref TextureArray::image(), \n @ref CubeMapTexture::image(), \n @ref CubeMapTextureArray::image(), \n @ref RectangleTexture::image(), \n @ref Texture::subImage(), \n @ref TextureArray::subImage(), \n @ref CubeMapTexture::subImage(), \n @ref CubeMapTextureArray::subImage(), \n @ref RectangleTexture::subImage(), \n @ref Texture::setCompressedImage(), \n @ref TextureArray::setCompressedImage(), \n @ref CubeMapTexture::setCompressedImage(), \n @ref CubeMapTextureArray::setCompressedImage(), \n @ref Texture::setCompressedSubImage(), \n @ref TextureArray::setCompressedSubImage(), \n @ref CubeMapTexture::setCompressedSubImage(), \n @ref CubeMapTextureArray::setCompressedSubImage(), \n @ref RectangleTexture::setCompressedSubImage(), \n @ref Texture::compressedImage(), \n @ref TextureArray::compressedImage(), \n @ref CubeMapTexture::compressedImage(), \n @ref CubeMapTextureArray::compressedImage(), \n @ref RectangleTexture::compressedImage(), \n @ref DefaultFramebuffer::read(), \n @ref Framebuffer::read() @fn_gl{PixelStore} | @ref GL::Texture::setImage(), \n @ref GL::TextureArray::setImage(), \n @ref GL::CubeMapTexture::setImage(), \n @ref GL::CubeMapTextureArray::setImage(), \n @ref GL::RectangleTexture::setImage(), \n @ref GL::Texture::setSubImage(), \n @ref GL::TextureArray::setSubImage(), \n @ref GL::CubeMapTexture::setSubImage(), \n @ref GL::CubeMapTextureArray::setSubImage(), \n @ref GL::RectangleTexture::setSubImage(), \n @ref GL::Texture::image(), @ref GL::TextureArray::image(), \n @ref GL::CubeMapTexture::image(), \n @ref GL::CubeMapTextureArray::image(), \n @ref GL::RectangleTexture::image(), \n @ref GL::Texture::subImage(), \n @ref GL::TextureArray::subImage(), \n @ref GL::CubeMapTexture::subImage(), \n @ref GL::CubeMapTextureArray::subImage(), \n @ref GL::RectangleTexture::subImage(), \n @ref GL::Texture::setCompressedImage(), \n @ref GL::TextureArray::setCompressedImage(), \n @ref GL::CubeMapTexture::setCompressedImage(), \n @ref GL::CubeMapTextureArray::setCompressedImage(), \n @ref GL::Texture::setCompressedSubImage(), \n @ref GL::TextureArray::setCompressedSubImage(), \n @ref GL::CubeMapTexture::setCompressedSubImage(), \n @ref GL::CubeMapTextureArray::setCompressedSubImage(), \n @ref GL::RectangleTexture::setCompressedSubImage(), \n @ref GL::Texture::compressedImage(), \n @ref GL::TextureArray::compressedImage(), \n @ref GL::CubeMapTexture::compressedImage(), \n @ref GL::CubeMapTextureArray::compressedImage(), \n @ref GL::RectangleTexture::compressedImage(), \n @ref GL::DefaultFramebuffer::read(), \n @ref GL::Framebuffer::read()
@fn_gl{PointParameter} | | @fn_gl{PointParameter} | |
@fn_gl{PointSize} | @ref Renderer::setPointSize() @fn_gl{PointSize} | @ref GL::Renderer::setPointSize()
@fn_gl{PolygonMode} | @ref Renderer::setPolygonMode() @fn_gl{PolygonMode} | @ref GL::Renderer::setPolygonMode()
@fn_gl{PolygonOffset} | @ref Renderer::setPolygonOffset() @fn_gl{PolygonOffset} | @ref GL::Renderer::setPolygonOffset()
@fn_gl{PolygonOffsetClamp} | | @fn_gl{PolygonOffsetClamp} | |
@fn_gl_extension{PrimitiveBoundingBox,EXT,primitive_bounding_box}, \n @fn_gl_extension{PrimitiveBoundingBox,ARB,primitive_bounding_box} | | @fn_gl_extension{PrimitiveBoundingBox,EXT,primitive_bounding_box}, \n @fn_gl_extension{PrimitiveBoundingBox,ARB,primitive_bounding_box} | |
@fn_gl{PrimitiveRestartIndex} | | @fn_gl{PrimitiveRestartIndex} | |
@fn_gl{ProgramBinary} | | @fn_gl{ProgramBinary} | |
@fn_gl{ProgramParameter} | @ref AbstractShaderProgram::setRetrievableBinary(), \n @ref AbstractShaderProgram::setSeparable() @fn_gl{ProgramParameter} | @ref GL::AbstractShaderProgram::setRetrievableBinary(), \n @ref GL::AbstractShaderProgram::setSeparable()
@fn_gl{ProvokingVertex} | @ref Renderer::setProvokingVertex() @fn_gl{ProvokingVertex} | @ref GL::Renderer::setProvokingVertex()
@fn_gl{PushDebugGroup}, \n @fn_gl_extension{PushGroupMarker,EXT,debug_marker} | @ref DebugGroup::push() @fn_gl{PushDebugGroup}, \n @fn_gl_extension{PushGroupMarker,EXT,debug_marker} | @ref GL::DebugGroup::push()
@fn_gl{PopDebugGroup}, \n @fn_gl_extension{PopGroupMarker,EXT,debug_marker} | @ref DebugGroup::pop() @fn_gl{PopDebugGroup}, \n @fn_gl_extension{PopGroupMarker,EXT,debug_marker} | @ref GL::DebugGroup::pop()
@subsection opengl-mapping-functions-q Q @subsection opengl-mapping-functions-q Q
@ -332,7 +332,7 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{QueryCounter} | @ref TimeQuery::timestamp() @fn_gl{QueryCounter} | @ref GL::TimeQuery::timestamp()
@subsection opengl-mapping-functions-r R @subsection opengl-mapping-functions-r R
@ -340,11 +340,11 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{ReadBuffer}, \n `glNamedFramebufferReadBuffer()`, \n @fn_gl_extension{FramebufferReadBuffer,EXT,direct_state_access} | @ref DefaultFramebuffer::mapForRead(), \n @ref Framebuffer::mapForRead() @fn_gl{ReadBuffer}, \n `glNamedFramebufferReadBuffer()`, \n @fn_gl_extension{FramebufferReadBuffer,EXT,direct_state_access} | @ref GL::DefaultFramebuffer::mapForRead(), \n @ref GL::Framebuffer::mapForRead()
@fn_gl{ReadPixels}, \n `glReadnPixels()`, \n @fn_gl_extension{ReadnPixels,ARB,robustness} | @ref DefaultFramebuffer::read(), \n @ref Framebuffer::read() @fn_gl{ReadPixels}, \n `glReadnPixels()`, \n @fn_gl_extension{ReadnPixels,ARB,robustness} | @ref GL::DefaultFramebuffer::read(), \n @ref GL::Framebuffer::read()
@fn_gl{ReleaseShaderCompiler} | | @fn_gl{ReleaseShaderCompiler} | |
@fn_gl{RenderbufferStorage}, \n `glNamedRenderbufferStorage()`, \n @fn_gl_extension{NamedRenderbufferStorage,EXT,direct_state_access} | @ref Renderbuffer::setStorage() @fn_gl{RenderbufferStorage}, \n `glNamedRenderbufferStorage()`, \n @fn_gl_extension{NamedRenderbufferStorage,EXT,direct_state_access} | @ref GL::Renderbuffer::setStorage()
@fn_gl{RenderbufferStorageMultisample}, \n `glNamedRenderbufferStorageMultisample()`, \n @fn_gl_extension{NamedRenderbufferStorageMultisample,EXT,direct_state_access} | @ref Renderbuffer::setStorageMultisample() @fn_gl{RenderbufferStorageMultisample}, \n `glNamedRenderbufferStorageMultisample()`, \n @fn_gl_extension{NamedRenderbufferStorageMultisample,EXT,direct_state_access} | @ref GL::Renderbuffer::setStorageMultisample()
@subsection opengl-mapping-functions-s S @subsection opengl-mapping-functions-s S
@ -355,16 +355,16 @@ OpenGL function | Matching API
@fn_gl{SampleCoverage} | | @fn_gl{SampleCoverage} | |
@fn_gl{SampleMaski} | | @fn_gl{SampleMaski} | |
@fn_gl{SamplerParameter} | | @fn_gl{SamplerParameter} | |
@fn_gl{Scissor} | @ref Renderer::setScissor() @fn_gl{Scissor} | @ref GL::Renderer::setScissor()
@fn_gl{ScissorArray} | | @fn_gl{ScissorArray} | |
@fn_gl{ScissorIndexed} | | @fn_gl{ScissorIndexed} | |
@fn_gl{ShaderBinary} | | @fn_gl{ShaderBinary} | |
@fn_gl{ShaderSource} | @ref Shader::addFile(), \n @ref Shader::addSource() @fn_gl{ShaderSource} | @ref GL::Shader::addFile(), \n @ref GL::Shader::addSource()
@fn_gl{ShaderStorageBlockBinding} | | @fn_gl{ShaderStorageBlockBinding} | |
@fn_gl{SpecializeShader} | | @fn_gl{SpecializeShader} | |
@fn_gl{StencilFunc}, \n @fn_gl{StencilFuncSeparate} | @ref Renderer::setStencilFunction() @fn_gl{StencilFunc}, \n @fn_gl{StencilFuncSeparate} | @ref GL::Renderer::setStencilFunction()
@fn_gl{StencilMask}, \n @fn_gl{StencilMaskSeparate} | @ref Renderer::setStencilMask() @fn_gl{StencilMask}, \n @fn_gl{StencilMaskSeparate} | @ref GL::Renderer::setStencilMask()
@fn_gl{StencilOp}, \n @fn_gl{StencilOpSeparate} | @ref Renderer::setStencilOperation() @fn_gl{StencilOp}, \n @fn_gl{StencilOpSeparate} | @ref GL::Renderer::setStencilOperation()
@subsection opengl-mapping-functions-t T @subsection opengl-mapping-functions-t T
@ -372,18 +372,18 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{TexBuffer}, \n `glTextureBuffer()`, \n @fn_gl_extension{TextureBuffer,EXT,direct_state_access}, \n @fn_gl{TexBufferRange}, \n `glTextureBufferRange()`, \n @fn_gl_extension{TextureBufferRange,EXT,direct_state_access} | @ref BufferTexture::setBuffer() @fn_gl{TexBuffer}, \n `glTextureBuffer()`, \n @fn_gl_extension{TextureBuffer,EXT,direct_state_access}, \n @fn_gl{TexBufferRange}, \n `glTextureBufferRange()`, \n @fn_gl_extension{TextureBufferRange,EXT,direct_state_access} | @ref GL::BufferTexture::setBuffer()
@fn_gl{TexImage1D}, \n @fn_gl{TexImage2D}, \n @fn_gl{TexImage3D} | @ref Texture::setImage(), \n @ref TextureArray::setImage(), \n @ref CubeMapTexture::setImage(), \n @ref CubeMapTextureArray::setImage(), \n @ref RectangleTexture::setImage() @fn_gl{TexImage1D}, \n @fn_gl{TexImage2D}, \n @fn_gl{TexImage3D} | @ref GL::Texture::setImage(), \n @ref GL::TextureArray::setImage(), \n @ref GL::CubeMapTexture::setImage(), \n @ref GL::CubeMapTextureArray::setImage(), \n @ref GL::RectangleTexture::setImage()
@fn_gl{TexImage2DMultisample}, \n @fn_gl{TexImage3DMultisample} | @ref MultisampleTexture::setStorage() @fn_gl{TexImage2DMultisample}, \n @fn_gl{TexImage3DMultisample} | @ref GL::MultisampleTexture::setStorage()
@fn_gl_extension{TexPageCommitment,ARB,sparse_texture} | | @fn_gl_extension{TexPageCommitment,ARB,sparse_texture} | |
@fn_gl{TexParameter}, \n `glTextureParameter()`, \n @fn_gl_extension{TextureParameter,EXT,direct_state_access} | @ref Texture::setBaseLevel() "*Texture::setBaseLevel()", \n @ref Texture::setMaxLevel() "*Texture::setMaxLevel()", \n @ref Texture::setMinificationFilter() "*Texture::setMinificationFilter()", \n @ref Texture::setMagnificationFilter() "*Texture::setMagnificationFilter()", \n @ref Texture::setMinLod() "*Texture::setMinLod()", \n @ref Texture::setMaxLod() "*Texture::setMaxLod()", \n @ref Texture::setLodBias() "*Texture::setLodBias()", \n @ref Texture::setWrapping() "*Texture::setWrapping()", \n @ref Texture::setBorderColor() "*Texture::setBorderColor()", \n @ref Texture::setMaxAnisotropy() "*Texture::setMaxAnisotropy()", \n @ref Texture::setSRGBDecode() "*Texture::setSRGBDecode()", \n @ref Texture::setSwizzle() "*Texture::setSwizzle()", \n @ref Texture::setCompareMode() "*Texture::setCompareMode()", \n @ref Texture::setCompareFunction() "*Texture::setCompareFunction()", \n @ref Texture::setDepthStencilMode() "*Texture::setDepthStencilMode()" @fn_gl{TexParameter}, \n `glTextureParameter()`, \n @fn_gl_extension{TextureParameter,EXT,direct_state_access} | @ref GL::Texture::setBaseLevel() "*Texture::setBaseLevel()", \n @ref GL::Texture::setMaxLevel() "*Texture::setMaxLevel()", \n @ref GL::Texture::setMinificationFilter() "*Texture::setMinificationFilter()", \n @ref GL::Texture::setMagnificationFilter() "*Texture::setMagnificationFilter()", \n @ref GL::Texture::setMinLod() "*Texture::setMinLod()", \n @ref GL::Texture::setMaxLod() "*Texture::setMaxLod()", \n @ref GL::Texture::setLodBias() "*Texture::setLodBias()", \n @ref GL::Texture::setWrapping() "*Texture::setWrapping()", \n @ref GL::Texture::setBorderColor() "*Texture::setBorderColor()", \n @ref GL::Texture::setMaxAnisotropy() "*Texture::setMaxAnisotropy()", \n @ref GL::Texture::setSRGBDecode() "*Texture::setSRGBDecode()", \n @ref GL::Texture::setSwizzle() "*Texture::setSwizzle()", \n @ref GL::Texture::setCompareMode() "*Texture::setCompareMode()", \n @ref GL::Texture::setCompareFunction() "*Texture::setCompareFunction()", \n @ref GL::Texture::setDepthStencilMode() "*Texture::setDepthStencilMode()"
@fn_gl{TexStorage1D}, \n `glTextureStorage1D()`, \n @fn_gl_extension{TextureStorage1D,EXT,direct_state_access}, \n @fn_gl{TexStorage2D}, \n `glTextureStorage2D()`, \n @fn_gl_extension{TextureStorage2D,EXT,direct_state_access}, \n @fn_gl{TexStorage3D}, \n `glTextureStorage3D()`, \n @fn_gl_extension{TextureStorage3D,EXT,direct_state_access} | @ref Texture::setStorage(), \n @ref TextureArray::setStorage(), \n @ref CubeMapTexture::setStorage(), \n @ref CubeMapTextureArray::setStorage(), \n @ref RectangleTexture::setStorage() @fn_gl{TexStorage1D}, \n `glTextureStorage1D()`, \n @fn_gl_extension{TextureStorage1D,EXT,direct_state_access}, \n @fn_gl{TexStorage2D}, \n `glTextureStorage2D()`, \n @fn_gl_extension{TextureStorage2D,EXT,direct_state_access}, \n @fn_gl{TexStorage3D}, \n `glTextureStorage3D()`, \n @fn_gl_extension{TextureStorage3D,EXT,direct_state_access} | @ref GL::Texture::setStorage(), \n @ref GL::TextureArray::setStorage(), \n @ref GL::CubeMapTexture::setStorage(), \n @ref GL::CubeMapTextureArray::setStorage(), \n @ref GL::RectangleTexture::setStorage()
@fn_gl{TexStorage2DMultisample}, \n `glTextureStorage2DMultisample()`, \n @fn_gl_extension{TextureStorage2DMultisample,EXT,direct_state_access}, \n @fn_gl{TexStorage3DMultisample}, \n `glTextureStorage3DMultisample()`, \n @fn_gl_extension{TextureStorage3DMultisample,EXT,direct_state_access} | @ref MultisampleTexture::setStorage() @fn_gl{TexStorage2DMultisample}, \n `glTextureStorage2DMultisample()`, \n @fn_gl_extension{TextureStorage2DMultisample,EXT,direct_state_access}, \n @fn_gl{TexStorage3DMultisample}, \n `glTextureStorage3DMultisample()`, \n @fn_gl_extension{TextureStorage3DMultisample,EXT,direct_state_access} | @ref GL::MultisampleTexture::setStorage()
@fn_gl{TexSubImage1D}, \n `glTextureSubImage1D()`, \n @fn_gl_extension{TextureSubImage1D,EXT,direct_state_access}, \n @fn_gl{TexSubImage2D}, \n `glTextureSubImage2D()`, \n @fn_gl_extension{TextureSubImage2D,EXT,direct_state_access}, \n @fn_gl{TexSubImage3D}, \n `glTextureSubImage3D()`, \n @fn_gl_extension{TextureSubImage3D,EXT,direct_state_access} | @ref Texture::setSubImage(), \n @ref TextureArray::setSubImage(), \n @ref CubeMapTexture::setSubImage(), \n @ref CubeMapTextureArray::setSubImage(), \n @ref RectangleTexture::setSubImage() @fn_gl{TexSubImage1D}, \n `glTextureSubImage1D()`, \n @fn_gl_extension{TextureSubImage1D,EXT,direct_state_access}, \n @fn_gl{TexSubImage2D}, \n `glTextureSubImage2D()`, \n @fn_gl_extension{TextureSubImage2D,EXT,direct_state_access}, \n @fn_gl{TexSubImage3D}, \n `glTextureSubImage3D()`, \n @fn_gl_extension{TextureSubImage3D,EXT,direct_state_access} | @ref GL::Texture::setSubImage(), \n @ref GL::TextureArray::setSubImage(), \n @ref GL::CubeMapTexture::setSubImage(), \n @ref GL::CubeMapTextureArray::setSubImage(), \n @ref GL::RectangleTexture::setSubImage()
@fn_gl{TextureBarrier} | @ref Renderer::setTextureBarrier() @fn_gl{TextureBarrier} | @ref GL::Renderer::setTextureBarrier()
@fn_gl{TextureView} | | @fn_gl{TextureView} | |
@fn_gl{TransformFeedbackBufferBase}, \n @fn_gl{TransformFeedbackBufferRange} | @ref TransformFeedback::attachBuffer(), \n @ref TransformFeedback::attachBuffers() @fn_gl{TransformFeedbackBufferBase}, \n @fn_gl{TransformFeedbackBufferRange} | @ref GL::TransformFeedback::attachBuffer(), \n @ref GL::TransformFeedback::attachBuffers()
@fn_gl{TransformFeedbackVaryings} | @ref AbstractShaderProgram::setTransformFeedbackOutputs() @fn_gl{TransformFeedbackVaryings} | @ref GL::AbstractShaderProgram::setTransformFeedbackOutputs()
@subsection opengl-mapping-functions-u U @subsection opengl-mapping-functions-u U
@ -391,11 +391,11 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{Uniform}, \n @fn_gl{ProgramUniform}, \n @fn_gl_extension{ProgramUniform,EXT,direct_state_access} | @ref AbstractShaderProgram::setUniform() @fn_gl{Uniform}, \n @fn_gl{ProgramUniform}, \n @fn_gl_extension{ProgramUniform,EXT,direct_state_access} | @ref GL::AbstractShaderProgram::setUniform()
@fn_gl_extension{UniformHandle,ARB,bindless_texture}, \n @fn_gl_extension{ProgramUniformHandle,ARB,bindless_texture} | | @fn_gl_extension{UniformHandle,ARB,bindless_texture}, \n @fn_gl_extension{ProgramUniformHandle,ARB,bindless_texture} | |
@fn_gl{UniformBlockBinding} | @ref AbstractShaderProgram::setUniformBlockBinding() @fn_gl{UniformBlockBinding} | @ref GL::AbstractShaderProgram::setUniformBlockBinding()
@fn_gl{UniformSubroutines} | | @fn_gl{UniformSubroutines} | |
@fn_gl{UseProgram} | @ref Mesh::draw(), @ref MeshView::draw() @fn_gl{UseProgram} | @ref GL::Mesh::draw(), @ref GL::MeshView::draw()
@fn_gl{UseProgramStages} | | @fn_gl{UseProgramStages} | |
@subsection opengl-mapping-functions-v V @subsection opengl-mapping-functions-v V
@ -404,16 +404,16 @@ OpenGL function | Matching API
OpenGL function | Matching API OpenGL function | Matching API
--------------------------------------- | ------------ --------------------------------------- | ------------
@fn_gl{ValidateProgram} | @ref AbstractShaderProgram::validate() @fn_gl{ValidateProgram} | @ref GL::AbstractShaderProgram::validate()
@fn_gl{ValidateProgramPipeline} | | @fn_gl{ValidateProgramPipeline} | |
@fn_gl{VertexArrayElementBuffer} | | @fn_gl{VertexArrayElementBuffer} | |
@fn_gl{VertexAttrib} | not supported (@ref opengl-unsupported "details") @fn_gl{VertexAttrib} | not supported (@ref opengl-unsupported "details")
@fn_gl{VertexAttribBinding}, \n `glVertexArrayAttribBinding()`, \n @fn_gl_extension{VertexArrayVertexAttribBinding,EXT,direct_state_access} | | @fn_gl{VertexAttribBinding}, \n `glVertexArrayAttribBinding()`, \n @fn_gl_extension{VertexArrayVertexAttribBinding,EXT,direct_state_access} | |
@fn_gl{VertexAttribDivisor}, \n @fn_gl_extension{VertexArrayVertexAttribDivisor,EXT,direct_state_access} | @ref Mesh::addVertexBufferInstanced() @fn_gl{VertexAttribDivisor}, \n @fn_gl_extension{VertexArrayVertexAttribDivisor,EXT,direct_state_access} | @ref GL::Mesh::addVertexBufferInstanced()
@fn_gl{VertexAttribFormat}, \n `glVertexArrayAttribFormat()`, \n @fn_gl_extension{VertexArrayVertexAttribFormat,EXT,direct_state_access} | | @fn_gl{VertexAttribFormat}, \n `glVertexArrayAttribFormat()`, \n @fn_gl_extension{VertexArrayVertexAttribFormat,EXT,direct_state_access} | |
@fn_gl{VertexAttribPointer}, \n @fn_gl_extension{VertexArrayVertexAttribOffset,EXT,direct_state_access} | @ref Mesh::addVertexBuffer() @fn_gl{VertexAttribPointer}, \n @fn_gl_extension{VertexArrayVertexAttribOffset,EXT,direct_state_access} | @ref GL::Mesh::addVertexBuffer()
@fn_gl{VertexBindingDivisor}, \n `glVertexArrayBindingDivisor()`, \n @fn_gl_extension{VertexArrayVertexBindingDivisor,EXT,direct_state_access} | | @fn_gl{VertexBindingDivisor}, \n `glVertexArrayBindingDivisor()`, \n @fn_gl_extension{VertexArrayVertexBindingDivisor,EXT,direct_state_access} | |
@fn_gl{Viewport} | @ref DefaultFramebuffer::setViewport(), \n @ref Framebuffer::setViewport() @fn_gl{Viewport} | @ref GL::DefaultFramebuffer::setViewport(), \n @ref GL::Framebuffer::setViewport()
@fn_gl{ViewportArray} | | @fn_gl{ViewportArray} | |
@fn_gl{ViewportIndexed} | | @fn_gl{ViewportIndexed} | |
@ -436,20 +436,20 @@ glGet() parameter | Matching API
@def_gl{ACTIVE_TEXTURE}, \n @def_gl{TEXTURE_BINDING_1D_ARRAY}, \n @def_gl{TEXTURE_BINDING_1D}, \n @def_gl{TEXTURE_BINDING_2D_ARRAY}, \n @def_gl{TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY}, \n @def_gl{TEXTURE_BINDING_2D_MULTISAMPLE}, \n @def_gl{TEXTURE_BINDING_2D} , \n @def_gl{TEXTURE_BINDING_3D}, \n @def_gl{TEXTURE_BINDING_BUFFER}, \n @def_gl{TEXTURE_BINDING_BUFFER}, \n @def_gl{TEXTURE_BINDING_CUBE_MAP}, \n @def_gl{TEXTURE_BINDING_RECTANGLE} | not queryable but tracked internally @def_gl{ACTIVE_TEXTURE}, \n @def_gl{TEXTURE_BINDING_1D_ARRAY}, \n @def_gl{TEXTURE_BINDING_1D}, \n @def_gl{TEXTURE_BINDING_2D_ARRAY}, \n @def_gl{TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY}, \n @def_gl{TEXTURE_BINDING_2D_MULTISAMPLE}, \n @def_gl{TEXTURE_BINDING_2D} , \n @def_gl{TEXTURE_BINDING_3D}, \n @def_gl{TEXTURE_BINDING_BUFFER}, \n @def_gl{TEXTURE_BINDING_BUFFER}, \n @def_gl{TEXTURE_BINDING_CUBE_MAP}, \n @def_gl{TEXTURE_BINDING_RECTANGLE} | not queryable but tracked internally
@def_gl{ALIASED_LINE_WIDTH_RANGE} | | @def_gl{ALIASED_LINE_WIDTH_RANGE} | |
@def_gl{ARRAY_BUFFER_BINDING}, \n @def_gl{DISPATCH_INDIRECT_BUFFER_BINDING}, \n @def_gl{ELEMENT_ARRAY_BUFFER_BINDING}, \n @def_gl{PIXEL_PACK_BUFFER_BINDING}, \n @def_gl{PIXEL_UNPACK_BUFFER_BINDING} | not queryable but tracked internally @def_gl{ARRAY_BUFFER_BINDING}, \n @def_gl{DISPATCH_INDIRECT_BUFFER_BINDING}, \n @def_gl{ELEMENT_ARRAY_BUFFER_BINDING}, \n @def_gl{PIXEL_PACK_BUFFER_BINDING}, \n @def_gl{PIXEL_UNPACK_BUFFER_BINDING} | not queryable but tracked internally
@def_gl{BLEND_COLOR} | not queryable, @ref Renderer::setBlendColor() setter only @def_gl{BLEND_COLOR} | not queryable, @ref GL::Renderer::setBlendColor() setter only
@def_gl{BLEND_DST_ALPHA}, \n @def_gl{BLEND_DST_RGB}, \n @def_gl{BLEND_SRC_ALPHA}, \n @def_gl{BLEND_SRC_RGB} | not queryable, @ref Renderer::setBlendFunction() setter only @def_gl{BLEND_DST_ALPHA}, \n @def_gl{BLEND_DST_RGB}, \n @def_gl{BLEND_SRC_ALPHA}, \n @def_gl{BLEND_SRC_RGB} | not queryable, @ref GL::Renderer::setBlendFunction() setter only
@def_gl{BLEND_EQUATION_ALPHA}, \n @def_gl{BLEND_EQUATION_RGB} | not queryable, @ref Renderer::setBlendEquation() setter only @def_gl{BLEND_EQUATION_ALPHA}, \n @def_gl{BLEND_EQUATION_RGB} | not queryable, @ref GL::Renderer::setBlendEquation() setter only
@def_gl{BLEND}, \n @def_gl{COLOR_LOGIC_OP}, \n @def_gl{CULL_FACE}, \n @def_gl{DEBUG_OUTPUT}, \n @def_gl{DEBUG_OUTPUT_SYNCHRONOUS}, \n @def_gl{DEPTH_CLAMP}, \n @def_gl{DEPTH_TEST}, \n @def_gl{DITHER}, \n @def_gl{MULTISAMPLE}, \n @def_gl{POLYGON_OFFSET_FILL}, \n @def_gl{POLYGON_OFFSET_LINE}, \n @def_gl{POLYGON_OFFSET_POINT}, \n @def_gl{PROGRAM_POINT_SIZE}, \n @def_gl{SCISSOR}, \n @def_gl{TEXTURE_CUBE_MAP_SEAMLESS}, \n @def_gl{STENCIL_TEST} | not queryable, @ref Renderer::setFeature() setter only @def_gl{BLEND}, \n @def_gl{COLOR_LOGIC_OP}, \n @def_gl{CULL_FACE}, \n @def_gl{DEBUG_OUTPUT}, \n @def_gl{DEBUG_OUTPUT_SYNCHRONOUS}, \n @def_gl{DEPTH_CLAMP}, \n @def_gl{DEPTH_TEST}, \n @def_gl{DITHER}, \n @def_gl{MULTISAMPLE}, \n @def_gl{POLYGON_OFFSET_FILL}, \n @def_gl{POLYGON_OFFSET_LINE}, \n @def_gl{POLYGON_OFFSET_POINT}, \n @def_gl{PROGRAM_POINT_SIZE}, \n @def_gl{SCISSOR}, \n @def_gl{TEXTURE_CUBE_MAP_SEAMLESS}, \n @def_gl{STENCIL_TEST} | not queryable, @ref GL::Renderer::setFeature() setter only
@def_gl{COLOR_CLEAR_VALUE}, \n @def_gl{DEPTH_CLEAR_VALUE}, \n @def_gl{STENCIL_CLEAR_VALUE} | not queryable, @ref Renderer::setClearColor(), \n @ref Renderer::setClearDepth() and \n @ref Renderer::setClearStencil() setters only @def_gl{COLOR_CLEAR_VALUE}, \n @def_gl{DEPTH_CLEAR_VALUE}, \n @def_gl{STENCIL_CLEAR_VALUE} | not queryable, @ref GL::Renderer::setClearColor(), \n @ref GL::Renderer::setClearDepth() and \n @ref GL::Renderer::setClearStencil() setters only
@def_gl{COLOR_WRITEMASK}, \n @def_gl{DEPTH_WRITEMASK}, \n @def_gl{STENCIL_BACK_WRITEMASK}, \n @def_gl{STENCIL_WRITEMASK} | not queryable, @ref Renderer::setColorMask(), \n @ref Renderer::setDepthMask() and \n @ref Renderer::setStencilMask() setters only @def_gl{COLOR_WRITEMASK}, \n @def_gl{DEPTH_WRITEMASK}, \n @def_gl{STENCIL_BACK_WRITEMASK}, \n @def_gl{STENCIL_WRITEMASK} | not queryable, @ref GL::Renderer::setColorMask(), \n @ref GL::Renderer::setDepthMask() and \n @ref GL::Renderer::setStencilMask() setters only
@def_gl{CONTEXT_FLAGS} | @ref Context::flags() @def_gl{CONTEXT_FLAGS} | @ref GL::Context::flags()
@def_gl{CONTEXT_PROFILE_MASK} | @ref Context::isCoreProfile() @def_gl{CONTEXT_PROFILE_MASK} | @ref GL::Context::isCoreProfile()
@def_gl{CURRENT_PROGRAM} | not queryable but tracked internally @def_gl{CURRENT_PROGRAM} | not queryable but tracked internally
@def_gl{DEBUG_GROUP_STACK_DEPTH} | | @def_gl{DEBUG_GROUP_STACK_DEPTH} | |
@def_gl{DEPTH_FUNC} | not queryable, @ref Renderer::setDepthFunction() setter only @def_gl{DEPTH_FUNC} | not queryable, @ref GL::Renderer::setDepthFunction() setter only
@def_gl{DEPTH_RANGE} | not queryable @def_gl{DEPTH_RANGE} | not queryable
@def_gl{DOUBLEBUFFER}, \n @def_gl{STEREO} | | @def_gl{DOUBLEBUFFER}, \n @def_gl{STEREO} | |
@def_gl{DRAW_BUFFERi}, \n @def_gl{DRAW_BUFFER}, \n @def_gl{READ_BUFFER} | not queryable, @ref DefaultFramebuffer::mapForDraw(), \n @ref DefaultFramebuffer::mapForRead(), \n @ref Framebuffer::mapForDraw() and \n @ref Framebuffer::mapForRead() setters only @def_gl{DRAW_BUFFERi}, \n @def_gl{DRAW_BUFFER}, \n @def_gl{READ_BUFFER} | not queryable, @ref GL::DefaultFramebuffer::mapForDraw(), \n @ref GL::DefaultFramebuffer::mapForRead(), \n @ref GL::Framebuffer::mapForDraw() and \n @ref GL::Framebuffer::mapForRead() setters only
@def_gl{DRAW_FRAMEBUFFER_BINDING}, \n @def_gl{READ_FRAMEBUFFER_BINDING} | not queryable but tracked internally @def_gl{DRAW_FRAMEBUFFER_BINDING}, \n @def_gl{READ_FRAMEBUFFER_BINDING} | not queryable but tracked internally
@def_gl{FRAGMENT_SHADER_DERIVATIVE_HINT}, \n @def_gl{LINE_SMOOTH_HINT}, \n @def_gl{POLYGON_SMOOTH_HINT}, \n @def_gl{TEXTURE_COMPRESSION_HINT} | not queryable @def_gl{FRAGMENT_SHADER_DERIVATIVE_HINT}, \n @def_gl{LINE_SMOOTH_HINT}, \n @def_gl{POLYGON_SMOOTH_HINT}, \n @def_gl{TEXTURE_COMPRESSION_HINT} | not queryable
@def_gl{IMPLEMENTATION_COLOR_READ_FORMAT} | | @def_gl{IMPLEMENTATION_COLOR_READ_FORMAT} | |
@ -457,121 +457,121 @@ glGet() parameter | Matching API
@def_gl{LAYER_PROVOKING_VERTEX} | | @def_gl{LAYER_PROVOKING_VERTEX} | |
@def_gl{LINE_SMOOTH}, \n @def_gl{POLYGON_SMOOTH} | not supported (@ref opengl-unsupported "details") @def_gl{LINE_SMOOTH}, \n @def_gl{POLYGON_SMOOTH} | not supported (@ref opengl-unsupported "details")
@def_gl{LINE_WIDTH_GRANULARITY}, \n @def_gl{LINE_WIDTH_RANGE} | | @def_gl{LINE_WIDTH_GRANULARITY}, \n @def_gl{LINE_WIDTH_RANGE} | |
@def_gl{LINE_WIDTH} | not queryable, @ref Renderer::setLineWidth() setter only @def_gl{LINE_WIDTH} | not queryable, @ref GL::Renderer::setLineWidth() setter only
@def_gl{LOGIC_OP_MODE} | not queryable, @ref Renderer::setLogicOperation() setter only @def_gl{LOGIC_OP_MODE} | not queryable, @ref GL::Renderer::setLogicOperation() setter only
@def_gl{MAJOR_VERSION}, \n @def_gl{MINOR_VERSION} | @ref Context::version() @def_gl{MAJOR_VERSION}, \n @def_gl{MINOR_VERSION} | @ref GL::Context::version()
`GL_MAX_*_ATOMIC_COUNTER_BUFFERS`, \n @def_gl{MAX_COMBINED_ATOMIC_COUNTER_BUFFERS} | @ref Shader::maxAtomicCounterBuffers(), \n @ref Shader::maxCombinedAtomicCounterBuffers() `GL_MAX_*_ATOMIC_COUNTER_BUFFERS`, \n @def_gl{MAX_COMBINED_ATOMIC_COUNTER_BUFFERS} | @ref GL::Shader::maxAtomicCounterBuffers(), \n @ref GL::Shader::maxCombinedAtomicCounterBuffers()
`GL_MAX_*_ATOMIC_COUNTERS`, \n @def_gl{MAX_COMBINED_ATOMIC_COUNTERS} | @ref Shader::maxAtomicCounters(), \n @ref Shader::maxCombinedAtomicCounters() `GL_MAX_*_ATOMIC_COUNTERS`, \n @def_gl{MAX_COMBINED_ATOMIC_COUNTERS} | @ref GL::Shader::maxAtomicCounters(), \n @ref GL::Shader::maxCombinedAtomicCounters()
`GL_MAX_*_IMAGE_UNIFORMS`, \n @def_gl{MAX_COMBINED_IMAGE_UNIFORMS} | @ref Shader::maxImageUniforms(), \n @ref Shader::maxCombinedImageUniforms() `GL_MAX_*_IMAGE_UNIFORMS`, \n @def_gl{MAX_COMBINED_IMAGE_UNIFORMS} | @ref GL::Shader::maxImageUniforms(), \n @ref GL::Shader::maxCombinedImageUniforms()
`GL_MAX_*_SHADER_STORAGE_BLOCKS`, \n @def_gl{MAX_COMBINED_SHADER_STORAGE_BLOCKS} | @ref Shader::maxShaderStorageBlocks(), \n @ref Shader::maxCombinedShaderStorageBlocks() `GL_MAX_*_SHADER_STORAGE_BLOCKS`, \n @def_gl{MAX_COMBINED_SHADER_STORAGE_BLOCKS} | @ref GL::Shader::maxShaderStorageBlocks(), \n @ref GL::Shader::maxCombinedShaderStorageBlocks()
`GL_MAX_*_TEXTURE_IMAGE_UNITS`, \n @def_gl{MAX_TEXTURE_IMAGE_UNITS}, \n @def_gl{MAX_COMBINED_TEXTURE_IMAGE_UNITS} | @ref Shader::maxTextureImageUnits(), \n @ref Shader::maxCombinedTextureImageUnits() `GL_MAX_*_TEXTURE_IMAGE_UNITS`, \n @def_gl{MAX_TEXTURE_IMAGE_UNITS}, \n @def_gl{MAX_COMBINED_TEXTURE_IMAGE_UNITS} | @ref GL::Shader::maxTextureImageUnits(), \n @ref GL::Shader::maxCombinedTextureImageUnits()
`GL_MAX_*_UNIFORM_BLOCKS`, \n @def_gl{MAX_COMBINED_UNIFORM_BLOCKS} | @ref Shader::maxUniformBlocks(), \n @ref Shader::maxCombinedUniformBlocks() `GL_MAX_*_UNIFORM_BLOCKS`, \n @def_gl{MAX_COMBINED_UNIFORM_BLOCKS} | @ref GL::Shader::maxUniformBlocks(), \n @ref GL::Shader::maxCombinedUniformBlocks()
`GL_MAX_*_UNIFORM_COMPONENTS`, \n @def_gl{MAX_VERTEX_UNIFORM_VECTORS}, \n @def_gl{MAX_FRAGMENT_UNIFORM_VECTORS} | @ref Shader::maxUniformComponents() `GL_MAX_*_UNIFORM_COMPONENTS`, \n @def_gl{MAX_VERTEX_UNIFORM_VECTORS}, \n @def_gl{MAX_FRAGMENT_UNIFORM_VECTORS} | @ref GL::Shader::maxUniformComponents()
`GL_MAX_COMBINED_*_UNIFORM_COMPONENTS` | @ref Shader::maxCombinedUniformComponents() `GL_MAX_COMBINED_*_UNIFORM_COMPONENTS` | @ref GL::Shader::maxCombinedUniformComponents()
@def_gl{MAX_3D_TEXTURE_SIZE}, \n @def_gl{MAX_ARRAY_TEXTURE_LAYERS}, \n @def_gl{MAX_CUBE_MAP_TEXTURE_SIZE}, \n @def_gl{MAX_RECTANGLE_TEXTURE_SIZE}, \n @def_gl{MAX_TEXTURE_SIZE} | @ref Texture::maxSize(), \n @ref TextureArray::maxSize(), \n @ref CubeMapTexture::maxSize(), \n @ref CubeMapTextureArray::maxSize(), \n @ref RectangleTexture::maxSize(), \n @ref BufferTexture::maxSize(), \n @ref MultisampleTexture::maxSize() @def_gl{MAX_3D_TEXTURE_SIZE}, \n @def_gl{MAX_ARRAY_TEXTURE_LAYERS}, \n @def_gl{MAX_CUBE_MAP_TEXTURE_SIZE}, \n @def_gl{MAX_RECTANGLE_TEXTURE_SIZE}, \n @def_gl{MAX_TEXTURE_SIZE} | @ref GL::Texture::maxSize(), \n @ref GL::TextureArray::maxSize(), \n @ref GL::CubeMapTexture::maxSize(), \n @ref GL::CubeMapTextureArray::maxSize(), \n @ref GL::RectangleTexture::maxSize(), \n @ref GL::BufferTexture::maxSize(), \n @ref GL::MultisampleTexture::maxSize()
@def_gl{MAX_ATOMIC_COUNTER_BUFFER_SIZE} | @ref AbstractShaderProgram::maxAtomicCounterBufferSize() @def_gl{MAX_ATOMIC_COUNTER_BUFFER_SIZE} | @ref GL::AbstractShaderProgram::maxAtomicCounterBufferSize()
@def_gl{MAX_ATOMIC_COUNTER_BUFFER_BINDINGS} | @ref Buffer::maxAtomicCounterBindings() @def_gl{MAX_ATOMIC_COUNTER_BUFFER_BINDINGS} | @ref GL::Buffer::maxAtomicCounterBindings()
@def_gl{MAX_CLIP_DISTANCES} | | @def_gl{MAX_CLIP_DISTANCES} | |
@def_gl{MAX_COLOR_ATTACHMENTS} | @ref Framebuffer::maxColorAttachments() @def_gl{MAX_COLOR_ATTACHMENTS} | @ref GL::Framebuffer::maxColorAttachments()
@def_gl{MAX_COLOR_TEXTURE_SAMPLES}, \n @def_gl{MAX_DEPTH_TEXTURE_SAMPLES}, \n @def_gl{MAX_INTEGER_SAMPLES} | @ref AbstractTexture::maxColorSamples(), \n @ref AbstractTexture::maxDepthSamples(), \n @ref AbstractTexture::maxIntegerSamples() @def_gl{MAX_COLOR_TEXTURE_SAMPLES}, \n @def_gl{MAX_DEPTH_TEXTURE_SAMPLES}, \n @def_gl{MAX_INTEGER_SAMPLES} | @ref GL::AbstractTexture::maxColorSamples(), \n @ref GL::AbstractTexture::maxDepthSamples(), \n @ref GL::AbstractTexture::maxIntegerSamples()
@def_gl{MAX_COMBINED_CLIP_AND_CULL_DISTANCES} | | @def_gl{MAX_COMBINED_CLIP_AND_CULL_DISTANCES} | |
@def_gl{MAX_COMBINED_SHADER_OUTPUT_RESOURCES} | @ref AbstractShaderProgram::maxCombinedShaderOutputResources() @def_gl{MAX_COMBINED_SHADER_OUTPUT_RESOURCES} | @ref GL::AbstractShaderProgram::maxCombinedShaderOutputResources()
@def_gl_extension{MAX_COMPUTE_FIXED_GROUP_INVOCATIONS,ARB,compute_variable_group_size} | | @def_gl_extension{MAX_COMPUTE_FIXED_GROUP_INVOCATIONS,ARB,compute_variable_group_size} | |
@def_gl_extension{MAX_COMPUTE_FIXED_GROUP_SIZE,ARB,compute_variable_group_size} | | @def_gl_extension{MAX_COMPUTE_FIXED_GROUP_SIZE,ARB,compute_variable_group_size} | |
@def_gl{MAX_COMPUTE_SHARED_MEMORY_SIZE} | @ref AbstractShaderProgram::maxComputeSharedMemorySize() @def_gl{MAX_COMPUTE_SHARED_MEMORY_SIZE} | @ref GL::AbstractShaderProgram::maxComputeSharedMemorySize()
@def_gl_extension{MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS,ARB,compute_variable_group_size} | | @def_gl_extension{MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS,ARB,compute_variable_group_size} | |
@def_gl_extension{MAX_COMPUTE_VARIABLE_GROUP_SIZE,ARB,compute_variable_group_size} | | @def_gl_extension{MAX_COMPUTE_VARIABLE_GROUP_SIZE,ARB,compute_variable_group_size} | |
@def_gl{MAX_COMPUTE_WORK_GROUP_COUNT} | @ref AbstractShaderProgram::maxComputeWorkGroupCount() @def_gl{MAX_COMPUTE_WORK_GROUP_COUNT} | @ref GL::AbstractShaderProgram::maxComputeWorkGroupCount()
@def_gl{MAX_COMPUTE_WORK_GROUP_INVOCATIONS} | @ref AbstractShaderProgram::maxComputeWorkGroupInvocations() @def_gl{MAX_COMPUTE_WORK_GROUP_INVOCATIONS} | @ref GL::AbstractShaderProgram::maxComputeWorkGroupInvocations()
@def_gl{MAX_COMPUTE_WORK_GROUP_SIZE} | @ref AbstractShaderProgram::maxComputeWorkGroupSize() @def_gl{MAX_COMPUTE_WORK_GROUP_SIZE} | @ref GL::AbstractShaderProgram::maxComputeWorkGroupSize()
@def_gl{MAX_CULL_DISTANCES} | | @def_gl{MAX_CULL_DISTANCES} | |
@def_gl{MAX_DEBUG_LOGGED_MESSAGES} | @ref DebugOutput::maxLoggedMessages() @def_gl{MAX_DEBUG_LOGGED_MESSAGES} | @ref GL::DebugOutput::maxLoggedMessages()
@def_gl{MAX_DEBUG_MESSAGE_LENGTH} | @ref DebugOutput::maxMessageLength() @def_gl{MAX_DEBUG_MESSAGE_LENGTH} | @ref GL::DebugOutput::maxMessageLength()
@def_gl{MAX_DEBUG_GROUP_STACK_DEPTH} | @ref DebugGroup::maxStackDepth() @def_gl{MAX_DEBUG_GROUP_STACK_DEPTH} | @ref GL::DebugGroup::maxStackDepth()
@def_gl{MAX_DRAW_BUFFERS} | @ref AbstractFramebuffer::maxDrawBuffers() @def_gl{MAX_DRAW_BUFFERS} | @ref GL::AbstractFramebuffer::maxDrawBuffers()
@def_gl{MAX_DUAL_SOURCE_DRAW_BUFFERS} | @ref AbstractFramebuffer::maxDualSourceDrawBuffers() @def_gl{MAX_DUAL_SOURCE_DRAW_BUFFERS} | @ref GL::AbstractFramebuffer::maxDualSourceDrawBuffers()
@def_gl{MAX_ELEMENT_INDEX} | @ref Mesh::maxElementIndex() @def_gl{MAX_ELEMENT_INDEX} | @ref GL::Mesh::maxElementIndex()
@def_gl{MAX_ELEMENTS_INDICES} | @ref Mesh::maxElementsIndices() @def_gl{MAX_ELEMENTS_INDICES} | @ref GL::Mesh::maxElementsIndices()
@def_gl{MAX_ELEMENTS_VERTICES} | @ref Mesh::maxElementsVertices() @def_gl{MAX_ELEMENTS_VERTICES} | @ref GL::Mesh::maxElementsVertices()
@def_gl{MAX_FRAMEBUFFER_HEIGHT} | | @def_gl{MAX_FRAMEBUFFER_HEIGHT} | |
@def_gl{MAX_FRAMEBUFFER_LAYERS} | | @def_gl{MAX_FRAMEBUFFER_LAYERS} | |
@def_gl{MAX_FRAMEBUFFER_SAMPLES} | | @def_gl{MAX_FRAMEBUFFER_SAMPLES} | |
@def_gl{MAX_FRAMEBUFFER_WIDTH} | | @def_gl{MAX_FRAMEBUFFER_WIDTH} | |
@def_gl{MAX_FRAGMENT_INPUT_COMPONENTS}, \n @def_gl{MAX_GEOMETRY_INPUT_COMPONENTS}, \n @def_gl{MAX_GEOMETRY_OUTPUT_COMPONENTS}, \n @def_gl{MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS}, \n @def_gl{MAX_TESS_CONTROL_INPUT_COMPONENTS}, \n @def_gl{MAX_TESS_CONTROL_OUTPUT_COMPONENTS}, \n @def_gl{MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS}, \n @def_gl{MAX_TESS_EVALUATION_INPUT_COMPONENTS}, \n @def_gl{MAX_TESS_EVALUATION_OUTPUT_COMPONENTS}, \n @def_gl{MAX_VERTEX_OUTPUT_COMPONENTS}, \n @def_gl{MAX_VARYING_VECTORS} | @ref Shader::maxFragmentInputComponents(), \n @ref Shader::maxGeometryInputComponents(), \n @ref Shader::maxGeometryOutputComponents(), \n @ref Shader::maxGeometryTotalOutputComponents(), \n @ref Shader::maxTessellationControlInputComponents(), \n @ref Shader::maxTessellationControlOutputComponents(), \n @ref Shader::maxTessellationControlTotalOutputComponents(), \n @ref Shader::maxTessellationEvaluationInputComponents(), \n @ref Shader::maxTessellationEvaluationOutputComponents(), \n @ref Shader::maxVertexOutputComponents() @def_gl{MAX_FRAGMENT_INPUT_COMPONENTS}, \n @def_gl{MAX_GEOMETRY_INPUT_COMPONENTS}, \n @def_gl{MAX_GEOMETRY_OUTPUT_COMPONENTS}, \n @def_gl{MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS}, \n @def_gl{MAX_TESS_CONTROL_INPUT_COMPONENTS}, \n @def_gl{MAX_TESS_CONTROL_OUTPUT_COMPONENTS}, \n @def_gl{MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS}, \n @def_gl{MAX_TESS_EVALUATION_INPUT_COMPONENTS}, \n @def_gl{MAX_TESS_EVALUATION_OUTPUT_COMPONENTS}, \n @def_gl{MAX_VERTEX_OUTPUT_COMPONENTS}, \n @def_gl{MAX_VARYING_VECTORS} | @ref GL::Shader::maxFragmentInputComponents(), \n @ref GL::Shader::maxGeometryInputComponents(), \n @ref GL::Shader::maxGeometryOutputComponents(), \n @ref GL::Shader::maxGeometryTotalOutputComponents(), \n @ref GL::Shader::maxTessellationControlInputComponents(), \n @ref GL::Shader::maxTessellationControlOutputComponents(), \n @ref GL::Shader::maxTessellationControlTotalOutputComponents(), \n @ref GL::Shader::maxTessellationEvaluationInputComponents(), \n @ref GL::Shader::maxTessellationEvaluationOutputComponents(), \n @ref GL::Shader::maxVertexOutputComponents()
@def_gl{MAX_GEOMETRY_OUTPUT_VERTICES} | | @def_gl{MAX_GEOMETRY_OUTPUT_VERTICES} | |
@def_gl{MAX_GEOMETRY_SHADER_INVOCATIONS} | | @def_gl{MAX_GEOMETRY_SHADER_INVOCATIONS} | |
@def_gl{MAX_IMAGE_SAMPLES} | @ref AbstractShaderProgram::maxImageSamples() @def_gl{MAX_IMAGE_SAMPLES} | @ref GL::AbstractShaderProgram::maxImageSamples()
@def_gl{MAX_IMAGE_UNITS} | @ref AbstractShaderProgram::maxImageUnits() @def_gl{MAX_IMAGE_UNITS} | @ref GL::AbstractShaderProgram::maxImageUnits()
@def_gl{MAX_LABEL_LENGTH} | @ref AbstractObject::maxLabelLength() @def_gl{MAX_LABEL_LENGTH} | @ref GL::AbstractObject::maxLabelLength()
@def_gl{MAX_PATCH_VERTICES} | | @def_gl{MAX_PATCH_VERTICES} | |
@def_gl{MAX_RENDERBUFFER_SIZE} | @ref Renderbuffer::maxSize() @def_gl{MAX_RENDERBUFFER_SIZE} | @ref GL::Renderbuffer::maxSize()
@def_gl{MAX_SAMPLE_MASK_WORDS} | | @def_gl{MAX_SAMPLE_MASK_WORDS} | |
@def_gl{MAX_SERVER_WAIT_TIMEOUT} | | @def_gl{MAX_SERVER_WAIT_TIMEOUT} | |
@def_gl{MAX_SHADER_STORAGE_BLOCK_SIZE} | @ref AbstractShaderProgram::maxShaderStorageBlockSize() @def_gl{MAX_SHADER_STORAGE_BLOCK_SIZE} | @ref GL::AbstractShaderProgram::maxShaderStorageBlockSize()
@def_gl{MAX_SHADER_STORAGE_BUFFER_BINDINGS} | @ref Buffer::maxShaderStorageBindings() @def_gl{MAX_SHADER_STORAGE_BUFFER_BINDINGS} | @ref GL::Buffer::maxShaderStorageBindings()
@def_gl_extension{MAX_SPARSE_TEXTURE_SIZE,ARB,sparse_texture} | | @def_gl_extension{MAX_SPARSE_TEXTURE_SIZE,ARB,sparse_texture} | |
@def_gl_extension{MAX_SPARSE_3D_TEXTURE_SIZE,ARB,sparse_texture} | | @def_gl_extension{MAX_SPARSE_3D_TEXTURE_SIZE,ARB,sparse_texture} | |
@def_gl_extension{MAX_SPARSE_ARRAY_TEXTURE_LAYERS,ARB,sparse_texture} | | @def_gl_extension{MAX_SPARSE_ARRAY_TEXTURE_LAYERS,ARB,sparse_texture} | |
@def_gl{MAX_TESS_GEN_LEVEL} | | @def_gl{MAX_TESS_GEN_LEVEL} | |
@def_gl{MAX_TESS_PATCH_COMPONENTS} | | @def_gl{MAX_TESS_PATCH_COMPONENTS} | |
@def_gl{MAX_TEXTURE_BUFFER_SIZE} | @ref BufferTexture::maxSize() @def_gl{MAX_TEXTURE_BUFFER_SIZE} | @ref GL::BufferTexture::maxSize()
@def_gl{MAX_TEXTURE_LOD_BIAS} | @ref AbstractTexture::maxLodBias() @def_gl{MAX_TEXTURE_LOD_BIAS} | @ref GL::AbstractTexture::maxLodBias()
@def_gl{MAX_TEXTURE_MAX_ANISOTROPY} | @ref Sampler::maxMaxAnisotropy() @def_gl{MAX_TEXTURE_MAX_ANISOTROPY} | @ref GL::Sampler::maxMaxAnisotropy()
@def_gl{MAX_TRANSFORM_FEEDBACK_BUFFERS} | @ref TransformFeedback::maxBuffers() @def_gl{MAX_TRANSFORM_FEEDBACK_BUFFERS} | @ref GL::TransformFeedback::maxBuffers()
@def_gl{MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS} | @ref TransformFeedback::maxInterleavedComponents() @def_gl{MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS} | @ref GL::TransformFeedback::maxInterleavedComponents()
@def_gl{MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS} | @ref TransformFeedback::maxSeparateAttributes() @def_gl{MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS} | @ref GL::TransformFeedback::maxSeparateAttributes()
@def_gl{MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS} | @ref TransformFeedback::maxSeparateComponents() @def_gl{MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS} | @ref GL::TransformFeedback::maxSeparateComponents()
@def_gl{MAX_UNIFORM_BLOCK_SIZE} | @ref AbstractShaderProgram::maxUniformBlockSize() @def_gl{MAX_UNIFORM_BLOCK_SIZE} | @ref GL::AbstractShaderProgram::maxUniformBlockSize()
@def_gl{MAX_UNIFORM_BUFFER_BINDINGS} | @ref Buffer::maxUniformBindings() @def_gl{MAX_UNIFORM_BUFFER_BINDINGS} | @ref GL::Buffer::maxUniformBindings()
@def_gl{MAX_UNIFORM_LOCATIONS} | @ref AbstractShaderProgram::maxUniformLocations() @def_gl{MAX_UNIFORM_LOCATIONS} | @ref GL::AbstractShaderProgram::maxUniformLocations()
@def_gl{MAX_VERTEX_ATTRIBS} | @ref AbstractShaderProgram::maxVertexAttributes() @def_gl{MAX_VERTEX_ATTRIBS} | @ref GL::AbstractShaderProgram::maxVertexAttributes()
@def_gl{MAX_VERTEX_ATTRIB_STRIDE} | | @def_gl{MAX_VERTEX_ATTRIB_STRIDE} | |
@def_gl{MAX_VERTEX_ATTRIB_BINDINGS} | | @def_gl{MAX_VERTEX_ATTRIB_BINDINGS} | |
@def_gl{MAX_VERTEX_ATTRIB_RELATIVE_OFFSET} | | @def_gl{MAX_VERTEX_ATTRIB_RELATIVE_OFFSET} | |
@def_gl{MAX_VERTEX_STREAMS} | @ref TransformFeedback::maxVertexStreams() @def_gl{MAX_VERTEX_STREAMS} | @ref GL::TransformFeedback::maxVertexStreams()
@def_gl{MAX_VIEWPORTS} | | @def_gl{MAX_VIEWPORTS} | |
@def_gl{MAX_VIEWPORT_DIMS} | @ref AbstractFramebuffer::maxViewportSize() @def_gl{MAX_VIEWPORT_DIMS} | @ref GL::AbstractFramebuffer::maxViewportSize()
@def_gl{MIN_FRAGMENT_INTERPOLATION_OFFSET}, \n @def_gl{MAX_FRAGMENT_INTERPOLATION_OFFSET} | | @def_gl{MIN_FRAGMENT_INTERPOLATION_OFFSET}, \n @def_gl{MAX_FRAGMENT_INTERPOLATION_OFFSET} | |
@def_gl{MIN_MAP_BUFFER_ALIGNMENT} | @ref Buffer::minMapAlignment() @def_gl{MIN_MAP_BUFFER_ALIGNMENT} | @ref GL::Buffer::minMapAlignment()
@def_gl{MIN_PROGRAM_TEXEL_OFFSET}, \n @def_gl{MAX_PROGRAM_TEXEL_OFFSET} | @ref AbstractShaderProgram::minTexelOffset(), \n @ref AbstractShaderProgram::maxTexelOffset() @def_gl{MIN_PROGRAM_TEXEL_OFFSET}, \n @def_gl{MAX_PROGRAM_TEXEL_OFFSET} | @ref GL::AbstractShaderProgram::minTexelOffset(), \n @ref GL::AbstractShaderProgram::maxTexelOffset()
@def_gl{MIN_PROGRAM_TEXTURE_GATHER_OFFSET}, \n @def_gl{MAX_PROGRAM_TEXTURE_GATHER_OFFSET} | | @def_gl{MIN_PROGRAM_TEXTURE_GATHER_OFFSET}, \n @def_gl{MAX_PROGRAM_TEXTURE_GATHER_OFFSET} | |
@def_gl{MIN_SAMPLE_SHADING_VALUE} | | @def_gl{MIN_SAMPLE_SHADING_VALUE} | |
@def_gl{NUM_EXTENSIONS} | @ref Context::supportedExtensions() @def_gl{NUM_EXTENSIONS} | @ref GL::Context::supportedExtensions()
@def_gl{NUM_PROGRAM_BINARY_FORMATS}, \n @def_gl{PROGRAM_BINARY_FORMATS} | | @def_gl{NUM_PROGRAM_BINARY_FORMATS}, \n @def_gl{PROGRAM_BINARY_FORMATS} | |
@def_gl{NUM_SHADER_BINARY_FORMATS}, \n @def_gl{SHADER_BINARY_FORMATS} | | @def_gl{NUM_SHADER_BINARY_FORMATS}, \n @def_gl{SHADER_BINARY_FORMATS} | |
@def_gl{NUM_SPIR_V_EXTENSIONS} | | @def_gl{NUM_SPIR_V_EXTENSIONS} | |
@def_gl{PACK_ALIGNMENT}, \n @def_gl{PACK_IMAGE_HEIGHT}, \n @def_gl{PACK_ROW_LENGTH}, \n @def_gl{PACK_SKIP_IMAGES}, \n @def_gl{PACK_SKIP_PIXELS}, \n @def_gl{PACK_SKIP_ROWS}, \n @def_gl{PACK_SWAP_BYTES}, \n @def_gl{UNPACK_ALIGNMENT}, \n @def_gl{UNPACK_IMAGE_HEIGHT}, \n @def_gl{UNPACK_ROW_LENGTH}, \n @def_gl{UNPACK_SKIP_IMAGES}, \n @def_gl{UNPACK_SKIP_PIXELS}, \n @def_gl{UNPACK_SKIP_ROWS}, \n @def_gl{UNPACK_SWAP_BYTES} | not queryable, @ref PixelStorage setters only @def_gl{PACK_ALIGNMENT}, \n @def_gl{PACK_IMAGE_HEIGHT}, \n @def_gl{PACK_ROW_LENGTH}, \n @def_gl{PACK_SKIP_IMAGES}, \n @def_gl{PACK_SKIP_PIXELS}, \n @def_gl{PACK_SKIP_ROWS}, \n @def_gl{PACK_SWAP_BYTES}, \n @def_gl{UNPACK_ALIGNMENT}, \n @def_gl{UNPACK_IMAGE_HEIGHT}, \n @def_gl{UNPACK_ROW_LENGTH}, \n @def_gl{UNPACK_SKIP_IMAGES}, \n @def_gl{UNPACK_SKIP_PIXELS}, \n @def_gl{UNPACK_SKIP_ROWS}, \n @def_gl{UNPACK_SWAP_BYTES} | not queryable, @ref PixelStorage setters only
@def_gl{POINT_FADE_THRESHOLD_SIZE} | | @def_gl{POINT_FADE_THRESHOLD_SIZE} | |
@def_gl{POINT_SIZE_GRANULARITY}, \n @def_gl{POINT_SIZE_RANGE} | | @def_gl{POINT_SIZE_GRANULARITY}, \n @def_gl{POINT_SIZE_RANGE} | |
@def_gl{POINT_SIZE} | not queryable, @ref Renderer::setPointSize() setter only @def_gl{POINT_SIZE} | not queryable, @ref GL::Renderer::setPointSize() setter only
@def_gl{POLYGON_OFFSET_FACTOR}, \n @def_gl{POLYGON_OFFSET_UNITS} | not queryable, @ref Renderer::setPolygonOffset() setter only @def_gl{POLYGON_OFFSET_FACTOR}, \n @def_gl{POLYGON_OFFSET_UNITS} | not queryable, @ref GL::Renderer::setPolygonOffset() setter only
@def_gl{PRIMITIVE_RESTART_INDEX} | not queryable @def_gl{PRIMITIVE_RESTART_INDEX} | not queryable
@def_gl{PROGRAM_PIPELINE_BINDING} | not queryable @def_gl{PROGRAM_PIPELINE_BINDING} | not queryable
@def_gl{PROVOKING_VERTEX} | not queryable, @ref Renderer::setProvokingVertex() setter only @def_gl{PROVOKING_VERTEX} | not queryable, @ref GL::Renderer::setProvokingVertex() setter only
@def_gl{RENDERBUFFER_BINDING} | not queryable but tracked internally @def_gl{RENDERBUFFER_BINDING} | not queryable but tracked internally
@def_gl{SAMPLER_BINDING} | not queryable @def_gl{SAMPLER_BINDING} | not queryable
@def_gl{SAMPLES} | @ref Renderbuffer::maxSamples() @def_gl{SAMPLES} | @ref GL::Renderbuffer::maxSamples()
@def_gl{SAMPLE_BUFFERS} | | @def_gl{SAMPLE_BUFFERS} | |
@def_gl{SAMPLE_COVERAGE_INVERT}, \n @def_gl{SAMPLE_COVERAGE_VALUE} | | @def_gl{SAMPLE_COVERAGE_INVERT}, \n @def_gl{SAMPLE_COVERAGE_VALUE} | |
@def_gl{SCISSOR_BOX} | not queryable, @ref Renderer::setScissor() setter only @def_gl{SCISSOR_BOX} | not queryable, @ref GL::Renderer::setScissor() setter only
@def_gl{SHADER_COMPILER} | not supported (@ref opengl-unsupported "details") @def_gl{SHADER_COMPILER} | not supported (@ref opengl-unsupported "details")
@def_gl{SHADER_STORAGE_BUFFER_BINDING}, \n @def_gl{SHADER_STORAGE_BUFFER_SIZE}, \n @def_gl{SHADER_STORAGE_BUFFER_START} | not queryable @def_gl{SHADER_STORAGE_BUFFER_BINDING}, \n @def_gl{SHADER_STORAGE_BUFFER_SIZE}, \n @def_gl{SHADER_STORAGE_BUFFER_START} | not queryable
@def_gl{SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT} | @ref Buffer::shaderStorageOffsetAlignment() @def_gl{SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT} | @ref GL::Buffer::shaderStorageOffsetAlignment()
@def_gl{SMOOTH_LINE_WIDTH_GRANULARITY}, \n @def_gl{SMOOTH_LINE_WIDTH_RANGE} | | @def_gl{SMOOTH_LINE_WIDTH_GRANULARITY}, \n @def_gl{SMOOTH_LINE_WIDTH_RANGE} | |
@def_gl{STENCIL_BACK_FUNC}, \n @def_gl{STENCIL_BACK_REF}, \n @def_gl{STENCIL_BACK_VALUE_MASK}, \n @def_gl{STENCIL_FUNC}, \n @def_gl{STENCIL_REF}, \n @def_gl{STENCIL_VALUE_MASK} | not queryable, @ref Renderer::setStencilFunction() setter only @def_gl{STENCIL_BACK_FUNC}, \n @def_gl{STENCIL_BACK_REF}, \n @def_gl{STENCIL_BACK_VALUE_MASK}, \n @def_gl{STENCIL_FUNC}, \n @def_gl{STENCIL_REF}, \n @def_gl{STENCIL_VALUE_MASK} | not queryable, @ref GL::Renderer::setStencilFunction() setter only
@def_gl{STENCIL_BACK_FAIL}, \n @def_gl{STENCIL_BACK_PASS_DEPTH_FAIL}, \n @def_gl{STENCIL_BACK_PASS_DEPTH_PASS}, \n @def_gl{STENCIL_FAIL}, \n @def_gl{STENCIL_PASS_DEPTH_FAIL}, \n @def_gl{STENCIL_PASS_DEPTH_PASS} | not queryable, @ref Renderer::setStencilOperation() setter only @def_gl{STENCIL_BACK_FAIL}, \n @def_gl{STENCIL_BACK_PASS_DEPTH_FAIL}, \n @def_gl{STENCIL_BACK_PASS_DEPTH_PASS}, \n @def_gl{STENCIL_FAIL}, \n @def_gl{STENCIL_PASS_DEPTH_FAIL}, \n @def_gl{STENCIL_PASS_DEPTH_PASS} | not queryable, @ref GL::Renderer::setStencilOperation() setter only
@def_gl{SUBPIXEL_BITS} | | @def_gl{SUBPIXEL_BITS} | |
@def_gl{TEXTURE_BUFFER_OFFSET_ALIGNMENT} | @ref BufferTexture::offsetAlignment() @def_gl{TEXTURE_BUFFER_OFFSET_ALIGNMENT} | @ref GL::BufferTexture::offsetAlignment()
@def_gl{TIMESTAMP} | | @def_gl{TIMESTAMP} | |
@def_gl{TRANSFORM_FEEDBACK_BUFFER_BINDING}, \n @def_gl{TRANSFORM_FEEDBACK_BUFFER_SIZE}, \n @def_gl{TRANSFORM_FEEDBACK_BUFFER_START} | not queryable @def_gl{TRANSFORM_FEEDBACK_BUFFER_BINDING}, \n @def_gl{TRANSFORM_FEEDBACK_BUFFER_SIZE}, \n @def_gl{TRANSFORM_FEEDBACK_BUFFER_START} | not queryable
@def_gl{UNIFORM_BUFFER_OFFSET_ALIGNMENT} | @ref Buffer::uniformOffsetAlignment() @def_gl{UNIFORM_BUFFER_OFFSET_ALIGNMENT} | @ref GL::Buffer::uniformOffsetAlignment()
@def_gl{UNIFORM_BUFFER_BINDING}, \n @def_gl{UNIFORM_BUFFER_SIZE}, \n @def_gl{UNIFORM_BUFFER_START} | not queryable @def_gl{UNIFORM_BUFFER_BINDING}, \n @def_gl{UNIFORM_BUFFER_SIZE}, \n @def_gl{UNIFORM_BUFFER_START} | not queryable
@def_gl{VERTEX_BINDING_DIVISOR}, \n @def_gl{VERTEX_BINDING_OFFSET}, \n @def_gl{VERTEX_BINDING_STRIDE} | not queryable @def_gl{VERTEX_BINDING_DIVISOR}, \n @def_gl{VERTEX_BINDING_OFFSET}, \n @def_gl{VERTEX_BINDING_STRIDE} | not queryable
@def_gl{VERTEX_PROGRAM_POINT_SIZE} | not queryable @def_gl{VERTEX_PROGRAM_POINT_SIZE} | not queryable
@def_gl{VIEWPORT_BOUNDS_RANGE} | | @def_gl{VIEWPORT_BOUNDS_RANGE} | |
@def_gl{VIEWPORT_INDEX_PROVOKING_VERTEX} | | @def_gl{VIEWPORT_INDEX_PROVOKING_VERTEX} | |
@def_gl{VIEWPORT_SUBPIXEL_BITS} | | @def_gl{VIEWPORT_SUBPIXEL_BITS} | |
@def_gl{VIEWPORT} | not queryable but tracked in @ref AbstractFramebuffer::viewport() @def_gl{VIEWPORT} | not queryable but tracked in @ref GL::AbstractFramebuffer::viewport()
*/ */

2
doc/opengl-workarounds.dox

@ -49,7 +49,7 @@ Using driver workarounds:
These identifiers correspond to the strings in the below listing. For debugging These identifiers correspond to the strings in the below listing. For debugging
and diagnostic purpose it's possible to disable particular workarounds by and diagnostic purpose it's possible to disable particular workarounds by
passing their identifier string to the `--magnum-disable-workarounds` passing their identifier string to the `--magnum-disable-workarounds`
command-line option. See @ref Context-command-line for more information. command-line option. See @ref GL-Context-command-line for more information.
@snippet src/Magnum/GL/Implementation/driverSpecific.cpp workarounds @snippet src/Magnum/GL/Implementation/driverSpecific.cpp workarounds

26
doc/opengl-wrapping.dox

@ -44,7 +44,7 @@ libraries if the user wants to.
By default, all underlying OpenGL objects are created in wrapper class By default, all underlying OpenGL objects are created in wrapper class
constructor and deleted in wrapper class destructor. Constructing an object constructor and deleted in wrapper class destructor. Constructing an object
using default constructor requires active @ref Context instance. All OpenGL using default constructor requires active @ref GL::Context instance. All OpenGL
objects are movable (but not copyable), although for performance reasons (and objects are movable (but not copyable), although for performance reasons (and
contrary to standard C++11 practice), the moved-from instance does *not* have contrary to standard C++11 practice), the moved-from instance does *not* have
any associated OpenGL object and is thus in *invalid state*. Using instance in any associated OpenGL object and is thus in *invalid state*. Using instance in
@ -52,11 +52,11 @@ moved-from state may result in OpenGL errors being generated, in some cases
even application crashes. even application crashes.
Besides the default behavior, it is possible to construct the object without Besides the default behavior, it is possible to construct the object without
creating the underlying OpenGL object using the @ref NoCreate tag. Constructing creating the underlying OpenGL object using the @ref NoCreate tag.
the object this way does not require any active context and its state is then Constructing the object this way does not require any active context and its
equivalent to the moved-from state. It is useful in case you need to construct state is then equivalent to the moved-from state. It is useful in case you need
the object before creating context (such as class members) or if you know you to construct the object before creating context (such as class members) or if
would overwrite it later with another object: you know you would overwrite it later with another object:
@snippet MagnumGL.cpp opengl-wrapping-nocreate @snippet MagnumGL.cpp opengl-wrapping-nocreate
@ -71,7 +71,7 @@ instance using @cpp wrap() @ce.
@snippet MagnumGL.cpp opengl-wrapping-transfer @snippet MagnumGL.cpp opengl-wrapping-transfer
The @cpp NoCreate @ce constructor, @cpp wrap() @ce and @cpp release() @ce The @cpp NoCreate @ce constructor, @cpp wrap() @ce and @cpp release() @ce
functions are available for all OpenGL classes except @ref Shader, where functions are available for all OpenGL classes except @ref GL::Shader, where
wrapping external instances makes less sense. wrapping external instances makes less sense.
Note that interaction with third-party OpenGL code as shown above usually needs Note that interaction with third-party OpenGL code as shown above usually needs
@ -85,7 +85,7 @@ Magnum, using some specialized GUI library etc. But bear in mind that in order
to improve performance and avoid redundant state changes, Magnum internally to improve performance and avoid redundant state changes, Magnum internally
tracks OpenGL state such as currently bound objects, activated renderer tracks OpenGL state such as currently bound objects, activated renderer
features etc. When combining Magnum with third-party code, the internal state features etc. When combining Magnum with third-party code, the internal state
tracker may get confused and you need to reset it using @ref Context::resetState(): tracker may get confused and you need to reset it using @ref GL::Context::resetState():
@snippet MagnumGL.cpp opengl-wrapping-state @snippet MagnumGL.cpp opengl-wrapping-state
@ -111,7 +111,7 @@ do the checks. Documentation of each type, function and enum value explicitly
states whether the functionality is available everywhere or whether particular states whether the functionality is available everywhere or whether particular
GL version/extension is required. The information is also aggregated on GL version/extension is required. The information is also aggregated on
@ref opengl-required-extensions documentation page. Use @ref opengl-required-extensions documentation page. Use
@ref Context::isVersionSupported() or @ref Context::isExtensionSupported(): @ref GL::Context::isVersionSupported() or @ref GL::Context::isExtensionSupported():
@snippet MagnumGL.cpp opengl-wrapping-extensions @snippet MagnumGL.cpp opengl-wrapping-extensions
@ -130,10 +130,10 @@ binding them, reducing the amount of needed API calls. Magnum API is designed
around direct state access as it is far easier to use and less error-prone, but around direct state access as it is far easier to use and less error-prone, but
if these extensions are not available, the functionality is emulated through if these extensions are not available, the functionality is emulated through
classic bind-to-edit approach. Other examples of extension-dependent classic bind-to-edit approach. Other examples of extension-dependent
functionality is @ref DebugMessage "debug output" which is simply no-op when functionality is @ref GL::DebugMessage "debug output" which is simply no-op
required extensions are not available, @ref Texture::setStorage() emulation on when required extensions are not available, @ref GL::Texture::setStorage()
platforms that don't support it etc. The goal is to abstract away the (mostly emulation on platforms that don't support it etc. The goal is to abstract away
unimportant) differences for easier porting. the (mostly unimportant) differences for easier porting.
@snippet MagnumGL.cpp opengl-wrapping-dsa @snippet MagnumGL.cpp opengl-wrapping-dsa

2
doc/platforms-android.dox

@ -89,7 +89,7 @@ adb shell /data/local/tmp/my-application
You can also use @cb{.sh} adb shell @ce to enter the device shell directly and You can also use @cb{.sh} adb shell @ce to enter the device shell directly and
continue from there. Besides plain command-line apps it's also possible to continue from there. Besides plain command-line apps it's also possible to
create an EGL context without any extra setup using create an EGL context without any extra setup using
@ref Platform::WindowlessEglApplication. See also @ref OpenGLTester for @ref Platform::WindowlessEglApplication. See also @ref GL::OpenGLTester for
information about OpenGL testing. information about OpenGL testing.
@section platforms-android-apps Building and installing graphics apps @section platforms-android-apps Building and installing graphics apps

6
doc/platforms-gl.dox

@ -54,9 +54,9 @@ Various links gathered around the web:
- Rendering to RGB textures doesn't work on many platforms, either due to - Rendering to RGB textures doesn't work on many platforms, either due to
alignment issues or other factors. For example it is not possible to render alignment issues or other factors. For example it is not possible to render
to @ref TextureFormat::RGB8 on iOS (but it works elsewhere); rendering to to @ref GL::TextureFormat::RGB8 on iOS (but it works elsewhere); rendering
@ref TextureFormat::RGB32F is not possible even on NVidia. Use RGBA formats to @ref GL::TextureFormat::RGB32F is not possible even on NVidia. Use RGBA
instead. formats instead.
- While on desktop GL it's often permitted to upload a RGB image to a texture - While on desktop GL it's often permitted to upload a RGB image to a texture
with RGBA internal format, on mobile devices usually nothing happens. Be with RGBA internal format, on mobile devices usually nothing happens. Be
sure to match the component count. sure to match the component count.

9
doc/platforms-html5.dox

@ -56,10 +56,11 @@ other target hints for UBOs etc.):
@snippet MagnumGL.cpp Buffer-webgl @snippet MagnumGL.cpp Buffer-webgl
See @ref Buffer-webgl-restrictions "Buffer", @ref Mesh-webgl-restrictions "Mesh", See @ref GL-Buffer-webgl-restrictions "GL::Buffer",
@ref Texture::setSubImage() "*Texture::setSubImage()", @ref GL-Mesh-webgl-restrictions "GL::Mesh",
@ref Mesh::addVertexBuffer(), @ref Renderer::setStencilFunction(), @ref GL::Texture::setSubImage() "GL::*Texture::setSubImage()",
@ref Renderer::setStencilMask() and @ref Renderer::setBlendFunction() @ref GL::Mesh::addVertexBuffer(), @ref GL::Renderer::setStencilFunction(),
@ref GL::Renderer::setStencilMask() and @ref GL::Renderer::setBlendFunction()
documentation for more information. The corresponding sections in official documentation for more information. The corresponding sections in official
WebGL specification provide even more detail: WebGL specification provide even more detail:

8
doc/platforms-macos.dox

@ -76,12 +76,12 @@ HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja
@section platforms-macos-troubleshooting Troubleshooting @section platforms-macos-troubleshooting Troubleshooting
- @ref AbstractShaderProgram::validate() expects that the shader has a - @ref GL::AbstractShaderProgram::validate() expects that the shader has a
properly configured framebuffer bound along with proper @ref Renderer properly configured framebuffer bound along with proper @ref GL::Renderer
setup. That is often hard to achieve, so the function cannot be portably setup. That is often hard to achieve, so the function cannot be portably
used for shader validity testing. used for shader validity testing.
- `GL_TIMESTAMP` used by @ref TimeQuery::timestamp() is not implemented on - `GL_TIMESTAMP` used by @ref GL::TimeQuery::timestamp() is not implemented
macOS and gives zero results. on macOS and gives zero results.
*/ */

27
doc/portability.dox

@ -74,15 +74,16 @@ which you can use for platform-aware code.
@section portability-extensions Extension-aware code @section portability-extensions Extension-aware code
Some functionality is depending on support of a particular OpenGL extension and Some functionality is depending on support of a particular OpenGL extension and
thus the decision cannot be made at compile time. Header @ref Extensions.h thus the decision cannot be made at compile time. Header @ref GL/Extensions.h
contains list of extensions, which you can pass to contains list of extensions, which you can pass to
@ref Context::isExtensionSupported() and decide based on that: @ref GL::Context::isExtensionSupported() and decide based on that:
@snippet MagnumGL.cpp portability-extensions @snippet MagnumGL.cpp portability-extensions
You can also decide on particular OpenGL version using @ref Context::isVersionSupported(), You can also decide on particular OpenGL version using
but remember that some features from that version might be available even if @ref GL::Context::isVersionSupported(), but remember that some features from
the drivers don't fully expose that version. that version might be available even if the drivers don't fully expose that
version.
On the other hand, if you don't want to write fallback code for unsupported On the other hand, if you don't want to write fallback code for unsupported
extensions, you can use macros @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED() or extensions, you can use macros @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED() or
@ -95,9 +96,9 @@ Each class, function or enum value is marked accordingly if it needs specific
extension or specific OpenGL version. Various classes in Magnum are taking extension or specific OpenGL version. Various classes in Magnum are taking
advantage of some extensions and enable faster code paths if given extension is advantage of some extensions and enable faster code paths if given extension is
available, but also have proper fallback when it's not, see for example available, but also have proper fallback when it's not, see for example
@ref AbstractShaderProgram-performance-optimization "AbstractShaderProgram", @ref GL-AbstractShaderProgram-performance-optimization "AbstractShaderProgram",
@ref AbstractTexture-performance-optimization "AbstractTexture" or @ref GL-AbstractTexture-performance-optimization "AbstractTexture" or
@ref Mesh-performance-optimization "Mesh". See also @ref opengl-required-extensions. @ref GL-Mesh-performance-optimization "Mesh". See also @ref opengl-required-extensions.
@section portability-shaders Writing portable shaders @section portability-shaders Writing portable shaders
@ -109,7 +110,7 @@ precision qualifiers in OpenGL ES etc.
Shader class allows you to explicitly specify shader version and based on that Shader class allows you to explicitly specify shader version and based on that
you can decide on the syntax in your shader code. You can also use you can decide on the syntax in your shader code. You can also use
@ref Context::supportedVersion() to conveniently select the first supported @ref GL::Context::supportedVersion() to conveniently select the first supported
version from a list: version from a list:
<p> <p>
@ -136,14 +137,14 @@ void main() {
It is often desirable to query extension presence based on actually used GLSL It is often desirable to query extension presence based on actually used GLSL
version --- while the extension might be supported in the driver, it might not version --- while the extension might be supported in the driver, it might not
be available in given GLSL version (e.g. causing compilation errors). You can be available in given GLSL version (e.g. causing compilation errors). You can
use @ref Context::isExtensionSupported(Version) const to check that the use @ref GL::Context::isExtensionSupported(Version) const to check that the
extension is present in given version: extension is present in given version:
@snippet MagnumGL.cpp portability-shaders-bind @snippet MagnumGL.cpp portability-shaders-bind
See also @ref AbstractShaderProgram class documentation for information about See also @ref GL::AbstractShaderProgram class documentation for information
specifying attribute location, uniform location and texture binding unit in about specifying attribute location, uniform location and texture binding unit
various OpenGL versions. in various OpenGL versions.
All shaders in @ref Shaders namespace support desktop OpenGL starting from All shaders in @ref Shaders namespace support desktop OpenGL starting from
version 2.1 and also OpenGL ES 2.0 and 3.0 (or WebGL 1.0 / 2.0). Feel free to version 2.1 and also OpenGL ES 2.0 and 3.0 (or WebGL 1.0 / 2.0). Feel free to

4
doc/shaders.dox

@ -55,8 +55,8 @@ mesh and configuring the shader itself.
Each shader expects some set of vertex attributes, thus when adding vertex Each shader expects some set of vertex attributes, thus when adding vertex
buffer into the mesh, you need to specify which shader attributes are on which buffer into the mesh, you need to specify which shader attributes are on which
position in the buffer. See @ref Mesh::addVertexBuffer() for details and usage position in the buffer. See @ref GL::Mesh::addVertexBuffer() for details and
examples. Example mesh configuration for @ref Shaders::Phong shader: usage examples. Example mesh configuration for @ref Shaders::Phong shader:
@snippet MagnumShaders.cpp shaders-setup @snippet MagnumShaders.cpp shaders-setup

54
doc/troubleshooting.dox

@ -52,47 +52,49 @@ things:
If you are experiencing so-called "black screen of death", weird behavior or If you are experiencing so-called "black screen of death", weird behavior or
crashes on GL calls, you might want to try these things: crashes on GL calls, you might want to try these things:
- Verify that @ref Renderer::error() "no OpenGL error was emitted". - Verify that @ref GL::Renderer::error() "no OpenGL error was emitted".
- Check that you use only extensions that are - Check that you use only extensions that are
@ref Context::isExtensionSupported() "available on your system". @ref GL::Context::isExtensionSupported() "available on your system".
- Check that you didn't exceed any implementation-defined limit (see - Check that you didn't exceed any implementation-defined limit (see
@ref magnum-info output for list of all of them). @ref magnum-info output for list of all of them).
- Enable @ref DebugMessage "debug output" to see more detailed errors, - Enable @ref GL::DebugMessage "debug output" to see more detailed errors,
warnings and performance hints. warnings and performance hints.
- If using framebuffer objects, @ref Framebuffer::checkStatus() "check that they are complete". - If using framebuffer objects,
- Change @ref Renderer::setClearColor() "framebuffer clear color" to @ref GL::Framebuffer::checkStatus() "check that they are complete".
- Change @ref GL::Renderer::setClearColor() "framebuffer clear color" to
something else than black to verify that at least something is drawn. something else than black to verify that at least something is drawn.
- If nothing is drawn, use @ref PrimitiveQuery to check that at least some - If nothing is drawn, use @ref GL::PrimitiveQuery to check that at least
primitives were generated. Use @ref SampleQuery to check whether fragments some primitives were generated. Use @ref GL::SampleQuery to check whether
were drawn. fragments were drawn.
- Verify that the mesh is properly set up --- nonzero vertex/index count, - Verify that the mesh is properly set up --- nonzero vertex/index count,
matching type in buffer and @ref Mesh::addVertexBuffer() "vertex specification", matching type in buffer and @ref GL::Mesh::addVertexBuffer() "vertex specification",
properly set up @ref Mesh::setIndexBuffer() "index buffer" and index count properly set up @ref GL::Mesh::setIndexBuffer() "index buffer" and index
for indexed mesh. If you specified index range, be sure that all indices count for indexed mesh. If you specified index range, be sure that all
fall into it, otherwise you would get undefined behavior. indices fall into it, otherwise you would get undefined behavior.
- Try disabling @ref Renderer::Feature::DepthTest "depth test", - Try disabling @ref GL::Renderer::Feature::DepthTest "depth test",
@ref Renderer::Feature::FaceCulling "face culling" and other renderer @ref GL::Renderer::Feature::FaceCulling "face culling" and other renderer
features that might affect the fragments. features that might affect the fragments.
- Verify that your projection and transformation matrix is properly set up --- - Verify that your projection and transformation matrix is properly set up ---
try drawing points instead of triangles, to see if they are at least at try drawing points instead of triangles, to see if they are at least at
proper places. proper places.
- @ref AbstractShaderProgram::validate() "Validate the shader", check that - @ref GL::AbstractShaderProgram::validate() "Validate the shader", check
all used uniforms and attributes have proper locations. Try reducing it that all used uniforms and attributes have proper locations. Try reducing
until it is able to draw something, possibly also with some simpler mesh. it until it is able to draw something, possibly also with some simpler
mesh.
- Magnum tracks the OpenGL state to improve performance, but the tracker can - Magnum tracks the OpenGL state to improve performance, but the tracker can
get confused if you or any other library are doing OpenGL calls outside of get confused if you or any other library are doing OpenGL calls outside of
Magnum. You can use @ref Context::resetState() to reset the internal state Magnum. You can use @ref GL::Context::resetState() to reset the internal
tracker. The other library also needs to be aware of this fact (either state tracker. The other library also needs to be aware of this fact
setting all state explicitly every time or having similar ability to reset (either setting all state explicitly every time or having similar ability
its state tracker), otherwise you may need to save and restore GL state to reset its state tracker), otherwise you may need to save and restore GL
manually for that library to work. state manually for that library to work.
@section troubleshooting-debugging Debugging rendering @section troubleshooting-debugging Debugging rendering
- Enable @ref DebugMessage "debug output" to see additional performance hints - Enable @ref GL::DebugMessage "debug output" to see additional performance
and implementation-dependent information. hints and implementation-dependent information.
- Use @ref TimeQuery to find hot spots in the rendering code. - Use @ref GL::TimeQuery to find hot spots in the rendering code.
- @ref DebugMessage::insert() "Mark relevant parts of code" to find them - @ref GL::DebugMessage::insert() "Mark relevant parts of code" to find them
easier in the debugger. easier in the debugger.
- Use ApiTrace to trace the program call by call, verify buffer and texture - Use ApiTrace to trace the program call by call, verify buffer and texture
contents, vertex binding and count of generated primitives, rendered contents, vertex binding and count of generated primitives, rendered

4
src/Magnum/DebugTools/Test/CompareImageTest.cpp

@ -305,7 +305,7 @@ void CompareImageTest::compareDifferentFormat() {
compare.printErrorMessage(e, "a", "b"); compare.printErrorMessage(e, "a", "b");
} }
CORRADE_COMPARE(out.str(), "Images a and b have different format, actual PixelFormat::RGBA/PixelType::Float but PixelFormat::RGB/PixelType::Float expected.\n"); CORRADE_COMPARE(out.str(), "Images a and b have different format, actual GL::PixelFormat::RGBA/GL::PixelType::Float but GL::PixelFormat::RGB/GL::PixelType::Float expected.\n");
} }
void CompareImageTest::compareDifferentType() { void CompareImageTest::compareDifferentType() {
@ -321,7 +321,7 @@ void CompareImageTest::compareDifferentType() {
compare.printErrorMessage(e, "a", "b"); compare.printErrorMessage(e, "a", "b");
} }
CORRADE_COMPARE(out.str(), "Images a and b have different format, actual PixelFormat::RGB/PixelType::UnsignedByte but PixelFormat::RGB/PixelType::UnsignedShort expected.\n"); CORRADE_COMPARE(out.str(), "Images a and b have different format, actual GL::PixelFormat::RGB/GL::PixelType::UnsignedByte but GL::PixelFormat::RGB/GL::PixelType::UnsignedShort expected.\n");
} }
void CompareImageTest::compareSameZeroThreshold() { void CompareImageTest::compareSameZeroThreshold() {

12
src/Magnum/GL/AbstractFramebuffer.cpp

@ -45,7 +45,7 @@
#include "Magnum/GL/Implementation/FramebufferState.h" #include "Magnum/GL/Implementation/FramebufferState.h"
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
namespace Magnum { namespace Magnum { namespace GL {
Vector2i AbstractFramebuffer::maxViewportSize() { Vector2i AbstractFramebuffer::maxViewportSize() {
Vector2i& value = Context::current().state().framebuffer->maxViewportSize; Vector2i& value = Context::current().state().framebuffer->maxViewportSize;
@ -298,7 +298,7 @@ void AbstractFramebuffer::read(const Range2Di& rectangle, Image2D& image) {
bindInternal(FramebufferTarget::Read); bindInternal(FramebufferTarget::Read);
/* Reallocate only if needed */ /* Reallocate only if needed */
const std::size_t dataSize = Implementation::imageDataSizeFor(image, rectangle.size()); const std::size_t dataSize = Magnum::Implementation::imageDataSizeFor(image, rectangle.size());
Containers::Array<char> data{image.release()}; Containers::Array<char> data{image.release()};
if(data.size() < dataSize) if(data.size() < dataSize)
data = Containers::Array<char>{dataSize}; data = Containers::Array<char>{dataSize};
@ -325,7 +325,7 @@ void AbstractFramebuffer::read(const Range2Di& rectangle, BufferImage2D& image,
bindInternal(FramebufferTarget::Read); bindInternal(FramebufferTarget::Read);
/* Reallocate only if needed */ /* Reallocate only if needed */
const std::size_t dataSize = Implementation::imageDataSizeFor(image, rectangle.size()); const std::size_t dataSize = Magnum::Implementation::imageDataSizeFor(image, rectangle.size());
if(image.dataSize() < dataSize) if(image.dataSize() < dataSize)
image.setData(image.storage(), image.format(), image.type(), rectangle.size(), {nullptr, dataSize}, usage); image.setData(image.storage(), image.format(), image.type(), rectangle.size(), {nullptr, dataSize}, usage);
else else
@ -344,7 +344,7 @@ BufferImage2D AbstractFramebuffer::read(const Range2Di& rectangle, BufferImage2D
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void AbstractFramebuffer::copyImage(const Range2Di& rectangle, Texture1D& texture, const Int level, const TextureFormat internalFormat) { void AbstractFramebuffer::copyImage(const Range2Di& rectangle, Texture1D& texture, const Int level, const TextureFormat internalFormat) {
CORRADE_ASSERT(rectangle.sizeY() == 1, "AbstractFramebuffer::copyImage(): height must be 1 for 1D textures", ); CORRADE_ASSERT(rectangle.sizeY() == 1, "GL::AbstractFramebuffer::copyImage(): height must be 1 for 1D textures", );
bindInternal(FramebufferTarget::Read); bindInternal(FramebufferTarget::Read);
texture.bindInternal(); texture.bindInternal();
glCopyTexImage1D(GL_TEXTURE_1D, level, GLenum(internalFormat), rectangle.min().x(), rectangle.min().y(), rectangle.sizeX(), 0); glCopyTexImage1D(GL_TEXTURE_1D, level, GLenum(internalFormat), rectangle.min().x(), rectangle.min().y(), rectangle.sizeX(), 0);
@ -381,7 +381,7 @@ void AbstractFramebuffer::copyImage(const Range2Di& rectangle, Texture1DArray& t
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void AbstractFramebuffer::copySubImage(const Range2Di& rectangle, Texture1D& texture, const Int level, const Int offset) { void AbstractFramebuffer::copySubImage(const Range2Di& rectangle, Texture1D& texture, const Int level, const Int offset) {
CORRADE_ASSERT(rectangle.sizeY() == 1, "AbstractFramebuffer::copyImage(): height must be 1 for 1D textures", ); CORRADE_ASSERT(rectangle.sizeY() == 1, "GL::AbstractFramebuffer::copyImage(): height must be 1 for 1D textures", );
bindInternal(FramebufferTarget::Read); bindInternal(FramebufferTarget::Read);
Context::current().state().framebuffer->copySub1DImplementation(rectangle, texture, level, offset); Context::current().state().framebuffer->copySub1DImplementation(rectangle, texture, level, offset);
} }
@ -677,4 +677,4 @@ void AbstractFramebuffer::copySub3DImplementationDSAEXT(const Range2Di& rectangl
} }
#endif #endif
} }}

8
src/Magnum/GL/AbstractFramebuffer.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::AbstractFramebuffer, enum @ref Magnum::FramebufferClear, @ref Magnum::FramebufferBlit, @ref Magnum::FramebufferBlitFilter, @ref Magnum::FramebufferTarget, enum set @ref Magnum::FramebufferClearMask * @brief Class @ref Magnum::GL::AbstractFramebuffer, enum @ref Magnum::GL::FramebufferClear, @ref Magnum::GL::FramebufferBlit, @ref Magnum::GL::FramebufferBlitFilter, @ref Magnum::GL::FramebufferTarget, enum set @ref Magnum::GL::FramebufferClearMask
*/ */
#include <Corrade/Containers/EnumSet.h> #include <Corrade/Containers/EnumSet.h>
@ -35,7 +35,7 @@
#include "Magnum/GL/AbstractObject.h" #include "Magnum/GL/AbstractObject.h"
#include "Magnum/Math/Range.h" #include "Magnum/Math/Range.h"
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Mask for framebuffer clearing @brief Mask for framebuffer clearing
@ -143,7 +143,7 @@ namespace Implementation { struct FramebufferState; }
See @ref DefaultFramebuffer and @ref Framebuffer for more information. See @ref DefaultFramebuffer and @ref Framebuffer for more information.
@section AbstractFramebuffer-performance-optimization Performance optimizations and security @section GL-AbstractFramebuffer-performance-optimization Performance optimizations and security
The engine tracks currently bound framebuffer and current viewport to avoid The engine tracks currently bound framebuffer and current viewport to avoid
unnecessary calls to @fn_gl_keyword{BindFramebuffer} and @fn_gl{Viewport} when unnecessary calls to @fn_gl_keyword{BindFramebuffer} and @fn_gl{Viewport} when
@ -822,6 +822,6 @@ CORRADE_ENUMSET_OPERATORS(FramebufferClearMask)
CORRADE_ENUMSET_OPERATORS(FramebufferBlitMask) CORRADE_ENUMSET_OPERATORS(FramebufferBlitMask)
#endif #endif
} }}
#endif #endif

4
src/Magnum/GL/AbstractObject.cpp

@ -35,7 +35,7 @@
#include "Magnum/GL/Implementation/DebugState.h" #include "Magnum/GL/Implementation/DebugState.h"
#endif #endif
namespace Magnum { namespace Magnum { namespace GL {
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
namespace { namespace {
@ -198,4 +198,4 @@ std::string AbstractObject::getLabelImplementationExt(const GLenum identifier, c
} }
#endif #endif
} }}

6
src/Magnum/GL/AbstractObject.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::AbstractObject * @brief Class @ref Magnum::GL::AbstractObject
*/ */
#include <string> #include <string>
@ -36,7 +36,7 @@
#include "Magnum/GL/OpenGL.h" #include "Magnum/GL/OpenGL.h"
#include "Magnum/GL/visibility.h" #include "Magnum/GL/visibility.h"
namespace Magnum { namespace Magnum { namespace GL {
namespace Implementation { struct DebugState; } namespace Implementation { struct DebugState; }
@ -131,6 +131,6 @@ class MAGNUM_GL_EXPORT AbstractObject {
CORRADE_ENUMSET_OPERATORS(ObjectFlags) CORRADE_ENUMSET_OPERATORS(ObjectFlags)
} }}
#endif #endif

4
src/Magnum/GL/AbstractQuery.cpp

@ -34,7 +34,7 @@
#include "Magnum/GL/Implementation/QueryState.h" #include "Magnum/GL/Implementation/QueryState.h"
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
namespace Magnum { namespace Magnum { namespace GL {
AbstractQuery::AbstractQuery(GLenum target): _target{target}, _flags{ObjectFlag::DeleteOnDestruction} { AbstractQuery::AbstractQuery(GLenum target): _target{target}, _flags{ObjectFlag::DeleteOnDestruction} {
(this->*Context::current().state().query->createImplementation)(); (this->*Context::current().state().query->createImplementation)();
@ -161,4 +161,4 @@ void AbstractQuery::end() {
#endif #endif
} }
} }}

6
src/Magnum/GL/AbstractQuery.h

@ -27,7 +27,7 @@
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
/** @file /** @file
* @brief Class @ref Magnum::AbstractQuery * @brief Class @ref Magnum::GL::AbstractQuery
*/ */
#endif #endif
@ -40,7 +40,7 @@
#include "Magnum/configure.h" #include "Magnum/configure.h"
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
namespace Magnum { namespace Magnum { namespace GL {
namespace Implementation { struct QueryState; } namespace Implementation { struct QueryState; }
@ -224,7 +224,7 @@ inline GLuint AbstractQuery::release() {
return id; return id;
} }
} }}
#else #else
#error this header is not available in WebGL 1.0 build #error this header is not available in WebGL 1.0 build
#endif #endif

8
src/Magnum/GL/AbstractShaderProgram.cpp

@ -37,7 +37,7 @@
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
#include "Magnum/Math/RectangularMatrix.h" #include "Magnum/Math/RectangularMatrix.h"
namespace Magnum { namespace Magnum { namespace GL {
namespace Implementation { namespace Implementation {
/* Defined in Implementation/driverSpecific.cpp */ /* Defined in Implementation/driverSpecific.cpp */
@ -440,7 +440,7 @@ bool AbstractShaderProgram::link(std::initializer_list<std::reference_wrapper<Ab
Int AbstractShaderProgram::uniformLocationInternal(const Containers::ArrayView<const char> name) { Int AbstractShaderProgram::uniformLocationInternal(const Containers::ArrayView<const char> name) {
const GLint location = glGetUniformLocation(_id, name); const GLint location = glGetUniformLocation(_id, name);
if(location == -1) if(location == -1)
Warning() << "AbstractShaderProgram: location of uniform \'" << Debug::nospace << std::string{name, name.size()} << Debug::nospace << "\' cannot be retrieved"; Warning{} << "GL::AbstractShaderProgram: location of uniform \'" << Debug::nospace << std::string{name, name.size()} << Debug::nospace << "\' cannot be retrieved";
return location; return location;
} }
@ -448,7 +448,7 @@ Int AbstractShaderProgram::uniformLocationInternal(const Containers::ArrayView<c
UnsignedInt AbstractShaderProgram::uniformBlockIndexInternal(const Containers::ArrayView<const char> name) { UnsignedInt AbstractShaderProgram::uniformBlockIndexInternal(const Containers::ArrayView<const char> name) {
const GLuint index = glGetUniformBlockIndex(_id, name); const GLuint index = glGetUniformBlockIndex(_id, name);
if(index == GL_INVALID_INDEX) if(index == GL_INVALID_INDEX)
Warning() << "AbstractShaderProgram: index of uniform block \'" << Debug::nospace << std::string{name, name.size()} << Debug::nospace << "\' cannot be retrieved"; Warning{} << "GL::AbstractShaderProgram: index of uniform block \'" << Debug::nospace << std::string{name, name.size()} << Debug::nospace << "\' cannot be retrieved";
return index; return index;
} }
#endif #endif
@ -1103,4 +1103,4 @@ void AbstractShaderProgram::uniformImplementationDSAEXT(const GLint location, co
} }
#endif #endif
} }}

46
src/Magnum/GL/AbstractShaderProgram.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::AbstractShaderProgram * @brief Class @ref Magnum::GL::AbstractShaderProgram
*/ */
#include <functional> #include <functional>
@ -42,14 +42,14 @@
#include <vector> #include <vector>
#endif #endif
namespace Magnum { namespace Magnum { namespace GL {
namespace Implementation { struct ShaderProgramState; } namespace Implementation { struct ShaderProgramState; }
/** /**
@brief Base for shader program implementations @brief Base for shader program implementations
@section AbstractShaderProgram-subclassing Subclassing workflow @section GL-AbstractShaderProgram-subclassing Subclassing workflow
This class is designed to be used via subclassing. Subclasses define these This class is designed to be used via subclassing. Subclasses define these
functions and properties: functions and properties:
@ -89,7 +89,7 @@ functions and properties:
@snippet MagnumGL.cpp AbstractShaderProgram-xfb @snippet MagnumGL.cpp AbstractShaderProgram-xfb
</li></ul> </li></ul>
@subsection AbstractShaderProgram-attribute-location Binding attribute location @subsection GL-AbstractShaderProgram-attribute-location Binding attribute location
The preferred workflow is to specify attribute location for vertex shader input The preferred workflow is to specify attribute location for vertex shader input
attributes and fragment shader output attributes explicitly in the shader code, attributes and fragment shader output attributes explicitly in the shader code,
@ -155,7 +155,7 @@ out vec3 normal;
@todo @extension2{EXT,separate_shader_objects,separate_shader_objects.gles} @todo @extension2{EXT,separate_shader_objects,separate_shader_objects.gles}
supports explicit attrib location supports explicit attrib location
@subsection AbstractShaderProgram-uniform-location Uniform locations @subsection GL-AbstractShaderProgram-uniform-location Uniform locations
The preferred workflow is to specify uniform locations directly in the shader The preferred workflow is to specify uniform locations directly in the shader
code, e.g.: code, e.g.:
@ -190,7 +190,7 @@ uniform mat3 normalMatrix;
@requires_gles Explicit uniform location is not supported in WebGL. Use @requires_gles Explicit uniform location is not supported in WebGL. Use
@ref uniformLocation() instead. @ref uniformLocation() instead.
@subsection AbstractShaderProgram-uniform-block-binding Uniform block bindings @subsection GL-AbstractShaderProgram-uniform-block-binding Uniform block bindings
The preferred workflow is to specify uniform block binding directly in the The preferred workflow is to specify uniform block binding directly in the
shader code, e.g.: shader code, e.g.:
@ -240,7 +240,7 @@ layout(std140) uniform material {
@requires_gles Explicit uniform block binding is not supported in WebGL. Use @requires_gles Explicit uniform block binding is not supported in WebGL. Use
@ref uniformBlockIndex() and @ref setUniformBlockBinding() instead. @ref uniformBlockIndex() and @ref setUniformBlockBinding() instead.
@subsection AbstractShaderProgram-shader-storage-block-binding Shader storage block bindings @subsection GL-AbstractShaderProgram-shader-storage-block-binding Shader storage block bindings
The workflow is to specify shader storage block binding directly in the shader The workflow is to specify shader storage block binding directly in the shader
code, e.g.: code, e.g.:
@ -261,7 +261,7 @@ layout(std430, binding = 1) buffer normals {
@requires_gles31 Shader storage is not available in OpenGL ES 3.0 and older. @requires_gles31 Shader storage is not available in OpenGL ES 3.0 and older.
@requires_gles Shader storage is not available in WebGL. @requires_gles Shader storage is not available in WebGL.
@subsection AbstractShaderProgram-texture-units Specifying texture and image binding units @subsection GL-AbstractShaderProgram-texture-units Specifying texture and image binding units
The preferred workflow is to specify texture/image binding unit directly in the The preferred workflow is to specify texture/image binding unit directly in the
shader code, e.g.: shader code, e.g.:
@ -295,7 +295,7 @@ uniform sampler2D specularTexture;
@requires_gles Explicit texture binding unit is not supported in WebGL. Use @requires_gles Explicit texture binding unit is not supported in WebGL. Use
@ref setUniform(Int, const T&) "setUniform(Int, Int)" instead. @ref setUniform(Int, const T&) "setUniform(Int, Int)" instead.
@subsection AbstractShaderProgram-transform-feedback Specifying transform feedback binding points @subsection GL-AbstractShaderProgram-transform-feedback Specifying transform feedback binding points
The preferred workflow is to specify output binding points directly in the The preferred workflow is to specify output binding points directly in the
shader code, e.g.: shader code, e.g.:
@ -339,24 +339,24 @@ out vec3 velocity;
in OpenGL ES or WebGL. in OpenGL ES or WebGL.
@requires_webgl20 Transform feedback is not available in WebGL 1.0. @requires_webgl20 Transform feedback is not available in WebGL 1.0.
@section AbstractShaderProgram-rendering-workflow Rendering workflow @section GL-AbstractShaderProgram-rendering-workflow Rendering workflow
Basic workflow with AbstractShaderProgram subclasses is: instance shader Basic workflow with AbstractShaderProgram subclasses is: instance shader
class, configure attribute binding in meshes (see @ref Mesh-configuration "Mesh documentation" class, configure attribute binding in meshes (see @ref GL-Mesh-configuration "Mesh documentation"
for more information) and map shader outputs to framebuffer attachments if for more information) and map shader outputs to framebuffer attachments if
needed (see @ref Framebuffer-usage "Framebuffer documentation" for more needed (see @ref GL-Framebuffer-usage "Framebuffer documentation" for more
information). In each draw event set all required shader parameters, bind information). In each draw event set all required shader parameters, bind
specific framebuffer (if needed) and then call @ref Mesh::draw(). Example: specific framebuffer (if needed) and then call @ref Mesh::draw(). Example:
@snippet MagnumGL.cpp AbstractShaderProgram-rendering @snippet MagnumGL.cpp AbstractShaderProgram-rendering
@section AbstractShaderProgram-compute-workflow Compute workflow @section GL-AbstractShaderProgram-compute-workflow Compute workflow
Add just the @ref Shader::Type::Compute shader and implement uniform/texture Add just the @ref Shader::Type::Compute shader and implement uniform/texture
setting functions as needed. After setting up required parameters call setting functions as needed. After setting up required parameters call
@ref dispatchCompute(). @ref dispatchCompute().
@section AbstractShaderProgram-types Mapping between GLSL and Magnum types @section GL-AbstractShaderProgram-types Mapping between GLSL and Magnum types
See @ref types for more information, only types with GLSL equivalent can be See @ref types for more information, only types with GLSL equivalent can be
used (and their super- or subclasses with the same size and underlying type). used (and their super- or subclasses with the same size and underlying type).
@ -388,7 +388,7 @@ See also @ref Attribute::DataType enum for additional type options.
@ref Matrix2x4, @ref Matrix4x2, @ref Matrix3x4 and @ref Matrix4x3) are not @ref Matrix2x4, @ref Matrix4x2, @ref Matrix3x4 and @ref Matrix4x3) are not
available in WebGL 1.0. available in WebGL 1.0.
@section AbstractShaderProgram-performance-optimization Performance optimizations @section GL-AbstractShaderProgram-performance-optimization Performance optimizations
The engine tracks currently used shader program to avoid unnecessary calls to The engine tracks currently used shader program to avoid unnecessary calls to
@fn_gl_keyword{UseProgram}. Shader limits (such as @ref maxVertexAttributes()) @fn_gl_keyword{UseProgram}. Shader limits (such as @ref maxVertexAttributes())
@ -811,7 +811,7 @@ class MAGNUM_GL_EXPORT AbstractShaderProgram: public AbstractObject {
* @see @fn_gl_keyword{BindAttribLocation} * @see @fn_gl_keyword{BindAttribLocation}
* @deprecated_gl 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 GL-AbstractShaderProgram-attribute-location "class documentation"
* for more information. * for more information.
*/ */
void bindAttributeLocation(UnsignedInt location, const std::string& name) { void bindAttributeLocation(UnsignedInt location, const std::string& name) {
@ -837,7 +837,7 @@ class MAGNUM_GL_EXPORT AbstractShaderProgram: public AbstractObject {
* @see @fn_gl_keyword{BindFragDataLocationIndexed} * @see @fn_gl_keyword{BindFragDataLocationIndexed}
* @deprecated_gl 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 GL-AbstractShaderProgram-attribute-location "class documentation"
* for more information. * for more information.
* @requires_gl33 Extension @extension{ARB,blend_func_extended} * @requires_gl33 Extension @extension{ARB,blend_func_extended}
* @requires_gl Multiple blend function inputs are not available in * @requires_gl Multiple blend function inputs are not available in
@ -862,7 +862,7 @@ class MAGNUM_GL_EXPORT AbstractShaderProgram: public AbstractObject {
* @see @fn_gl_keyword{BindFragDataLocation} * @see @fn_gl_keyword{BindFragDataLocation}
* @deprecated_gl 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 GL-AbstractShaderProgram-attribute-location "class documentation"
* for more information. * for more information.
* @requires_gl30 Extension @extension{EXT,gpu_shader4} * @requires_gl30 Extension @extension{EXT,gpu_shader4}
* @requires_gl Use explicit location specification in OpenGL ES 3.0 or * @requires_gl Use explicit location specification in OpenGL ES 3.0 or
@ -900,7 +900,7 @@ class MAGNUM_GL_EXPORT AbstractShaderProgram: public AbstractObject {
* @see @fn_gl_keyword{TransformFeedbackVaryings} * @see @fn_gl_keyword{TransformFeedbackVaryings}
* @deprecated_gl Preferred usage is to specify transform feedback * @deprecated_gl Preferred usage is to specify transform feedback
* outputs explicitly in the shader instead of using this * outputs explicitly in the shader instead of using this
* function. See @ref AbstractShaderProgram-transform-feedback "class documentation" * function. See @ref GL-AbstractShaderProgram-transform-feedback "class documentation"
* for more information. * for more information.
* @requires_gl30 Extension @extension{EXT,transform_feedback} * @requires_gl30 Extension @extension{EXT,transform_feedback}
* @requires_gl40 Extension @extension{ARB,transform_feedback3} for * @requires_gl40 Extension @extension{ARB,transform_feedback3} for
@ -934,7 +934,7 @@ class MAGNUM_GL_EXPORT AbstractShaderProgram: public AbstractObject {
* @see @ref setUniform(), @fn_gl_keyword{GetUniformLocation} * @see @ref setUniform(), @fn_gl_keyword{GetUniformLocation}
* @deprecated_gl 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 GL-AbstractShaderProgram-uniform-location "class documentation"
* for more information. * for more information.
*/ */
Int uniformLocation(const std::string& name) { Int uniformLocation(const std::string& name) {
@ -960,7 +960,7 @@ class MAGNUM_GL_EXPORT AbstractShaderProgram: public AbstractObject {
* @requires_webgl20 Uniform buffers are not available in WebGL 1.0. * @requires_webgl20 Uniform buffers are not available in WebGL 1.0.
* @deprecated_gl Preferred usage is to specify uniform block binding * @deprecated_gl Preferred usage is to specify uniform block binding
* explicitly in the shader instead of using this function. See * explicitly in the shader instead of using this function. See
* @ref AbstractShaderProgram-uniform-block-binding "class documentation" * @ref GL-AbstractShaderProgram-uniform-block-binding "class documentation"
* for more information. * for more information.
*/ */
UnsignedInt uniformBlockIndex(const std::string& name) { UnsignedInt uniformBlockIndex(const std::string& name) {
@ -1110,7 +1110,7 @@ class MAGNUM_GL_EXPORT AbstractShaderProgram: public AbstractObject {
* @requires_webgl20 Uniform buffers are not available in WebGL 1.0. * @requires_webgl20 Uniform buffers are not available in WebGL 1.0.
* @deprecated_gl Preferred usage is to specify uniform block binding * @deprecated_gl Preferred usage is to specify uniform block binding
* explicitly in the shader instead of using this function. See * explicitly in the shader instead of using this function. See
* @ref AbstractShaderProgram-uniform-block-binding "class documentation" * @ref GL-AbstractShaderProgram-uniform-block-binding "class documentation"
* for more information. * for more information.
*/ */
void setUniformBlockBinding(UnsignedInt index, UnsignedInt binding) { void setUniformBlockBinding(UnsignedInt index, UnsignedInt binding) {
@ -1300,6 +1300,6 @@ class MAGNUM_GL_EXPORT AbstractShaderProgram: public AbstractObject {
#endif #endif
}; };
} }}
#endif #endif

54
src/Magnum/GL/AbstractTexture.cpp

@ -44,7 +44,7 @@
#include "Magnum/Math/Color.h" #include "Magnum/Math/Color.h"
#include "Magnum/Math/Range.h" #include "Magnum/Math/Range.h"
namespace Magnum { namespace Magnum { namespace GL {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
Float AbstractTexture::maxLodBias() { Float AbstractTexture::maxLodBias() {
@ -1691,7 +1691,7 @@ void AbstractTexture::invalidateSubImageImplementationARB(GLint level, const Vec
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
template<UnsignedInt dimensions> void AbstractTexture::image(GLint level, Image<dimensions>& image) { template<UnsignedInt dimensions> void AbstractTexture::image(GLint level, Image<dimensions>& image) {
const Math::Vector<dimensions, Int> size = DataHelper<dimensions>::imageSize(*this, level); const Math::Vector<dimensions, Int> size = DataHelper<dimensions>::imageSize(*this, level);
const std::size_t dataSize = Implementation::imageDataSizeFor(image, size); const std::size_t dataSize = Magnum::Implementation::imageDataSizeFor(image, size);
/* Reallocate only if needed */ /* Reallocate only if needed */
Containers::Array<char> data{image.release()}; Containers::Array<char> data{image.release()};
@ -1710,7 +1710,7 @@ template void MAGNUM_GL_EXPORT AbstractTexture::image<3>(GLint, Image<3>&);
template<UnsignedInt dimensions> void AbstractTexture::image(GLint level, BufferImage<dimensions>& image, BufferUsage usage) { template<UnsignedInt dimensions> void AbstractTexture::image(GLint level, BufferImage<dimensions>& image, BufferUsage usage) {
const Math::Vector<dimensions, Int> size = DataHelper<dimensions>::imageSize(*this, level); const Math::Vector<dimensions, Int> size = DataHelper<dimensions>::imageSize(*this, level);
const std::size_t dataSize = Implementation::imageDataSizeFor(image, size); const std::size_t dataSize = Magnum::Implementation::imageDataSizeFor(image, size);
/* Reallocate only if needed */ /* Reallocate only if needed */
if(image.dataSize() < dataSize) if(image.dataSize() < dataSize)
@ -1737,7 +1737,7 @@ template<UnsignedInt dimensions> void AbstractTexture::compressedImage(const GLi
GLint textureDataSize; GLint textureDataSize;
(this->*Context::current().state().texture->getLevelParameterivImplementation)(level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &textureDataSize); (this->*Context::current().state().texture->getLevelParameterivImplementation)(level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &textureDataSize);
dataSize = textureDataSize; dataSize = textureDataSize;
} else dataSize = Implementation::compressedImageDataSizeFor(image, size); } else dataSize = Magnum::Implementation::compressedImageDataSizeFor(image, size);
/* Internal texture format */ /* Internal texture format */
GLint format; GLint format;
@ -1768,7 +1768,7 @@ template<UnsignedInt dimensions> void AbstractTexture::compressedImage(const GLi
GLint textureDataSize; GLint textureDataSize;
(this->*Context::current().state().texture->getLevelParameterivImplementation)(level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &textureDataSize); (this->*Context::current().state().texture->getLevelParameterivImplementation)(level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &textureDataSize);
dataSize = textureDataSize; dataSize = textureDataSize;
} else dataSize = Implementation::compressedImageDataSizeFor(image, size); } else dataSize = Magnum::Implementation::compressedImageDataSizeFor(image, size);
/* Internal texture format */ /* Internal texture format */
GLint format; GLint format;
@ -1793,7 +1793,7 @@ template<UnsignedInt dimensions> void AbstractTexture::subImage(const GLint leve
createIfNotAlready(); createIfNotAlready();
const Math::Vector<dimensions, Int> size = range.size(); const Math::Vector<dimensions, Int> size = range.size();
const std::size_t dataSize = Implementation::imageDataSizeFor(image, size); const std::size_t dataSize = Magnum::Implementation::imageDataSizeFor(image, size);
const Vector3i paddedOffset = Vector3i::pad(range.min()); const Vector3i paddedOffset = Vector3i::pad(range.min());
const Vector3i paddedSize = Vector3i::pad(size, 1); const Vector3i paddedSize = Vector3i::pad(size, 1);
@ -1816,7 +1816,7 @@ template<UnsignedInt dimensions> void AbstractTexture::subImage(const GLint leve
createIfNotAlready(); createIfNotAlready();
const Math::Vector<dimensions, Int> size = range.size(); const Math::Vector<dimensions, Int> size = range.size();
const std::size_t dataSize = Implementation::imageDataSizeFor(image, size); const std::size_t dataSize = Magnum::Implementation::imageDataSizeFor(image, size);
const Vector3i paddedOffset = Vector3i::pad(range.min()); const Vector3i paddedOffset = Vector3i::pad(range.min());
const Vector3i paddedSize = Vector3i::pad(size, 1); const Vector3i paddedSize = Vector3i::pad(size, 1);
@ -1860,7 +1860,7 @@ template<UnsignedInt dimensions> void AbstractTexture::compressedSubImage(const
std::size_t dataSize; std::size_t dataSize;
if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize())
dataSize = compressedSubImageSize<dimensions>(TextureFormat(format), size); dataSize = compressedSubImageSize<dimensions>(TextureFormat(format), size);
else dataSize = Implementation::compressedImageDataSizeFor(image, size); else dataSize = Magnum::Implementation::compressedImageDataSizeFor(image, size);
/* Reallocate only if needed */ /* Reallocate only if needed */
Containers::Array<char> data{image.release()}; Containers::Array<char> data{image.release()};
@ -1894,7 +1894,7 @@ template<UnsignedInt dimensions> void AbstractTexture::compressedSubImage(const
std::size_t dataSize; std::size_t dataSize;
if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize())
dataSize = compressedSubImageSize<dimensions>(TextureFormat(format), size); dataSize = compressedSubImageSize<dimensions>(TextureFormat(format), size);
else dataSize = Implementation::compressedImageDataSizeFor(image, size); else dataSize = Magnum::Implementation::compressedImageDataSizeFor(image, size);
/* Reallocate only if needed */ /* Reallocate only if needed */
if(image.dataSize() < dataSize) if(image.dataSize() < dataSize)
@ -2001,7 +2001,7 @@ void AbstractTexture::DataHelper<1>::setCompressedImage(AbstractTexture& texture
Buffer::unbindInternal(Buffer::TargetHint::PixelUnpack); Buffer::unbindInternal(Buffer::TargetHint::PixelUnpack);
image.storage().applyUnpack(); image.storage().applyUnpack();
texture.bindInternal(); texture.bindInternal();
glCompressedTexImage1D(texture._target, level, GLenum(image.format()), image.size()[0], 0, Implementation::occupiedCompressedImageDataSize(image, image.data().size()), image.data()); glCompressedTexImage1D(texture._target, level, GLenum(image.format()), image.size()[0], 0, Magnum::Implementation::occupiedCompressedImageDataSize(image, image.data().size()), image.data());
} }
void AbstractTexture::DataHelper<1>::setImage(AbstractTexture& texture, const GLint level, const TextureFormat internalFormat, BufferImage1D& image) { void AbstractTexture::DataHelper<1>::setImage(AbstractTexture& texture, const GLint level, const TextureFormat internalFormat, BufferImage1D& image) {
@ -2015,7 +2015,7 @@ void AbstractTexture::DataHelper<1>::setCompressedImage(AbstractTexture& texture
image.buffer().bindInternal(Buffer::TargetHint::PixelUnpack); image.buffer().bindInternal(Buffer::TargetHint::PixelUnpack);
image.storage().applyUnpack(); image.storage().applyUnpack();
texture.bindInternal(); texture.bindInternal();
glCompressedTexImage1D(texture._target, level, GLenum(image.format()), image.size()[0], 0, Implementation::occupiedCompressedImageDataSize(image, image.dataSize()), nullptr); glCompressedTexImage1D(texture._target, level, GLenum(image.format()), image.size()[0], 0, Magnum::Implementation::occupiedCompressedImageDataSize(image, image.dataSize()), nullptr);
} }
void AbstractTexture::DataHelper<1>::setSubImage(AbstractTexture& texture, const GLint level, const Math::Vector<1, GLint>& offset, const ImageView1D& image) { void AbstractTexture::DataHelper<1>::setSubImage(AbstractTexture& texture, const GLint level, const Math::Vector<1, GLint>& offset, const ImageView1D& image) {
@ -2027,7 +2027,7 @@ void AbstractTexture::DataHelper<1>::setSubImage(AbstractTexture& texture, const
void AbstractTexture::DataHelper<1>::setCompressedSubImage(AbstractTexture& texture, const GLint level, const Math::Vector<1, GLint>& offset, const CompressedImageView1D& image) { void AbstractTexture::DataHelper<1>::setCompressedSubImage(AbstractTexture& texture, const GLint level, const Math::Vector<1, GLint>& offset, const CompressedImageView1D& image) {
Buffer::unbindInternal(Buffer::TargetHint::PixelUnpack); Buffer::unbindInternal(Buffer::TargetHint::PixelUnpack);
image.storage().applyUnpack(); image.storage().applyUnpack();
(texture.*Context::current().state().texture->compressedSubImage1DImplementation)(level, offset, image.size(), image.format(), image.data(), Implementation::occupiedCompressedImageDataSize(image, image.data().size())); (texture.*Context::current().state().texture->compressedSubImage1DImplementation)(level, offset, image.size(), image.format(), image.data(), Magnum::Implementation::occupiedCompressedImageDataSize(image, image.data().size()));
} }
void AbstractTexture::DataHelper<1>::setSubImage(AbstractTexture& texture, const GLint level, const Math::Vector<1, GLint>& offset, BufferImage1D& image) { void AbstractTexture::DataHelper<1>::setSubImage(AbstractTexture& texture, const GLint level, const Math::Vector<1, GLint>& offset, BufferImage1D& image) {
@ -2039,7 +2039,7 @@ void AbstractTexture::DataHelper<1>::setSubImage(AbstractTexture& texture, const
void AbstractTexture::DataHelper<1>::setCompressedSubImage(AbstractTexture& texture, const GLint level, const Math::Vector<1, GLint>& offset, CompressedBufferImage1D& image) { void AbstractTexture::DataHelper<1>::setCompressedSubImage(AbstractTexture& texture, const GLint level, const Math::Vector<1, GLint>& offset, CompressedBufferImage1D& image) {
image.buffer().bindInternal(Buffer::TargetHint::PixelUnpack); image.buffer().bindInternal(Buffer::TargetHint::PixelUnpack);
image.storage().applyUnpack(); image.storage().applyUnpack();
(texture.*Context::current().state().texture->compressedSubImage1DImplementation)(level, offset, image.size(), image.format(), nullptr, Implementation::occupiedCompressedImageDataSize(image, image.dataSize())); (texture.*Context::current().state().texture->compressedSubImage1DImplementation)(level, offset, image.size(), image.format(), nullptr, Magnum::Implementation::occupiedCompressedImageDataSize(image, image.dataSize()));
} }
#endif #endif
@ -2050,7 +2050,7 @@ void AbstractTexture::DataHelper<2>::setImage(AbstractTexture& texture, const GL
image.storage().applyUnpack(); image.storage().applyUnpack();
(texture.*Context::current().state().texture->image2DImplementation)(target, level, internalFormat, image.size(), image.format(), image.type(), image.data() (texture.*Context::current().state().texture->image2DImplementation)(target, level, internalFormat, image.size(), image.format(), image.type(), image.data()
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
+ Implementation::pixelStorageSkipOffset(image) + Magnum::Implementation::pixelStorageSkipOffset(image)
#endif #endif
, image.storage()); , image.storage());
} }
@ -2065,7 +2065,7 @@ void AbstractTexture::DataHelper<2>::setCompressedImage(AbstractTexture& texture
image.storage().applyUnpack(); image.storage().applyUnpack();
#endif #endif
texture.bindInternal(); texture.bindInternal();
glCompressedTexImage2D(target, level, GLenum(image.format()), image.size().x(), image.size().y(), 0, Implementation::occupiedCompressedImageDataSize(image, image.data().size()), image.data()); glCompressedTexImage2D(target, level, GLenum(image.format()), image.size().x(), image.size().y(), 0, Magnum::Implementation::occupiedCompressedImageDataSize(image, image.data().size()), image.data());
} }
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
@ -2084,7 +2084,7 @@ void AbstractTexture::DataHelper<2>::setCompressedImage(AbstractTexture& texture
image.storage().applyUnpack(); image.storage().applyUnpack();
#endif #endif
texture.bindInternal(); texture.bindInternal();
glCompressedTexImage2D(target, level, GLenum(image.format()), image.size().x(), image.size().y(), 0, Implementation::occupiedCompressedImageDataSize(image, image.dataSize()), nullptr); glCompressedTexImage2D(target, level, GLenum(image.format()), image.size().x(), image.size().y(), 0, Magnum::Implementation::occupiedCompressedImageDataSize(image, image.dataSize()), nullptr);
} }
#endif #endif
@ -2095,7 +2095,7 @@ void AbstractTexture::DataHelper<2>::setSubImage(AbstractTexture& texture, const
image.storage().applyUnpack(); image.storage().applyUnpack();
(texture.*Context::current().state().texture->subImage2DImplementation)(level, offset, image.size(), image.format(), image.type(), image.data() (texture.*Context::current().state().texture->subImage2DImplementation)(level, offset, image.size(), image.format(), image.type(), image.data()
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
+ Implementation::pixelStorageSkipOffset(image) + Magnum::Implementation::pixelStorageSkipOffset(image)
#endif #endif
, image.storage()); , image.storage());
} }
@ -2109,7 +2109,7 @@ void AbstractTexture::DataHelper<2>::setCompressedSubImage(AbstractTexture& text
to reset anything */ to reset anything */
image.storage().applyUnpack(); image.storage().applyUnpack();
#endif #endif
(texture.*Context::current().state().texture->compressedSubImage2DImplementation)(level, offset, image.size(), image.format(), image.data(), Implementation::occupiedCompressedImageDataSize(image, image.data().size())); (texture.*Context::current().state().texture->compressedSubImage2DImplementation)(level, offset, image.size(), image.format(), image.data(), Magnum::Implementation::occupiedCompressedImageDataSize(image, image.data().size()));
} }
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
@ -2126,7 +2126,7 @@ void AbstractTexture::DataHelper<2>::setCompressedSubImage(AbstractTexture& text
to reset anything */ to reset anything */
image.storage().applyUnpack(); image.storage().applyUnpack();
#endif #endif
(texture.*Context::current().state().texture->compressedSubImage2DImplementation)(level, offset, image.size(), image.format(), nullptr, Implementation::occupiedCompressedImageDataSize(image, image.dataSize())); (texture.*Context::current().state().texture->compressedSubImage2DImplementation)(level, offset, image.size(), image.format(), nullptr, Magnum::Implementation::occupiedCompressedImageDataSize(image, image.dataSize()));
} }
#endif #endif
@ -2138,7 +2138,7 @@ void AbstractTexture::DataHelper<3>::setImage(AbstractTexture& texture, const GL
image.storage().applyUnpack(); image.storage().applyUnpack();
(texture.*Context::current().state().texture->image3DImplementation)(level, internalFormat, image.size(), image.format(), image.type(), image.data() (texture.*Context::current().state().texture->image3DImplementation)(level, internalFormat, image.size(), image.format(), image.type(), image.data()
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
+ Implementation::pixelStorageSkipOffset(image) + Magnum::Implementation::pixelStorageSkipOffset(image)
#endif #endif
, image.storage()); , image.storage());
} }
@ -2154,9 +2154,9 @@ void AbstractTexture::DataHelper<3>::setCompressedImage(AbstractTexture& texture
#endif #endif
texture.bindInternal(); texture.bindInternal();
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
glCompressedTexImage3D(texture._target, level, GLenum(image.format()), image.size().x(), image.size().y(), image.size().z(), 0, Implementation::occupiedCompressedImageDataSize(image, image.data().size()), image.data()); glCompressedTexImage3D(texture._target, level, GLenum(image.format()), image.size().x(), image.size().y(), image.size().z(), 0, Magnum::Implementation::occupiedCompressedImageDataSize(image, image.data().size()), image.data());
#else #else
glCompressedTexImage3DOES(texture._target, level, GLenum(image.format()), image.size().x(), image.size().y(), image.size().z(), 0, Implementation::occupiedCompressedImageDataSize(image, image.data().size()), image.data()); glCompressedTexImage3DOES(texture._target, level, GLenum(image.format()), image.size().x(), image.size().y(), image.size().z(), 0, Magnum::Implementation::occupiedCompressedImageDataSize(image, image.data().size()), image.data());
#endif #endif
} }
#endif #endif
@ -2177,7 +2177,7 @@ void AbstractTexture::DataHelper<3>::setCompressedImage(AbstractTexture& texture
image.storage().applyUnpack(); image.storage().applyUnpack();
#endif #endif
texture.bindInternal(); texture.bindInternal();
glCompressedTexImage3D(texture._target, level, GLenum(image.format()), image.size().x(), image.size().y(), image.size().z(), 0, Implementation::occupiedCompressedImageDataSize(image, image.dataSize()), nullptr); glCompressedTexImage3D(texture._target, level, GLenum(image.format()), image.size().x(), image.size().y(), image.size().z(), 0, Magnum::Implementation::occupiedCompressedImageDataSize(image, image.dataSize()), nullptr);
} }
#endif #endif
@ -2189,7 +2189,7 @@ void AbstractTexture::DataHelper<3>::setSubImage(AbstractTexture& texture, const
image.storage().applyUnpack(); image.storage().applyUnpack();
(texture.*Context::current().state().texture->subImage3DImplementation)(level, offset, image.size(), image.format(), image.type(), image.data() (texture.*Context::current().state().texture->subImage3DImplementation)(level, offset, image.size(), image.format(), image.type(), image.data()
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
+ Implementation::pixelStorageSkipOffset(image) + Magnum::Implementation::pixelStorageSkipOffset(image)
#endif #endif
, image.storage()); , image.storage());
} }
@ -2203,7 +2203,7 @@ void AbstractTexture::DataHelper<3>::setCompressedSubImage(AbstractTexture& text
to reset anything */ to reset anything */
image.storage().applyUnpack(); image.storage().applyUnpack();
#endif #endif
(texture.*Context::current().state().texture->compressedSubImage3DImplementation)(level, offset, image.size(), image.format(), image.data(), Implementation::occupiedCompressedImageDataSize(image, image.data().size())); (texture.*Context::current().state().texture->compressedSubImage3DImplementation)(level, offset, image.size(), image.format(), image.data(), Magnum::Implementation::occupiedCompressedImageDataSize(image, image.data().size()));
} }
#endif #endif
@ -2221,7 +2221,7 @@ void AbstractTexture::DataHelper<3>::setCompressedSubImage(AbstractTexture& text
to reset anything */ to reset anything */
image.storage().applyUnpack(); image.storage().applyUnpack();
#endif #endif
(texture.*Context::current().state().texture->compressedSubImage3DImplementation)(level, offset, image.size(), image.format(), nullptr, Implementation::occupiedCompressedImageDataSize(image, image.dataSize())); (texture.*Context::current().state().texture->compressedSubImage3DImplementation)(level, offset, image.size(), image.format(), nullptr, Magnum::Implementation::occupiedCompressedImageDataSize(image, image.dataSize()));
} }
#endif #endif
@ -2267,4 +2267,4 @@ void AbstractTexture::DataHelper<3>::setWrapping(AbstractTexture& texture, const
#endif #endif
#endif #endif
} }}

10
src/Magnum/GL/AbstractTexture.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::AbstractTexture * @brief Class @ref Magnum::GL::AbstractTexture
*/ */
#include <Corrade/Containers/ArrayView.h> #include <Corrade/Containers/ArrayView.h>
@ -37,7 +37,7 @@
#include "Magnum/GL/GL.h" #include "Magnum/GL/GL.h"
#include "Magnum/GL/Sampler.h" #include "Magnum/GL/Sampler.h"
namespace Magnum { namespace Magnum { namespace GL {
namespace Implementation { namespace Implementation {
struct TextureState; struct TextureState;
@ -61,13 +61,13 @@ Encapsulates one OpenGL texture object. See @ref Texture, @ref TextureArray,
@ref BufferTexture and @ref MultisampleTexture documentation for more @ref BufferTexture and @ref MultisampleTexture documentation for more
information and usage examples. information and usage examples.
@section AbstractTexture-webgl-restrictions WebGL restrictions @section GL-AbstractTexture-webgl-restrictions WebGL restrictions
@ref MAGNUM_TARGET_WEBGL "WebGL" puts some restrictions on type of data @ref MAGNUM_TARGET_WEBGL "WebGL" puts some restrictions on type of data
submitted to @ref Texture::setSubImage() "*Texture::setSubImage()", see its submitted to @ref Texture::setSubImage() "*Texture::setSubImage()", see its
documentation for details. documentation for details.
@section AbstractTexture-performance-optimization Performance optimizations and security @section GL-AbstractTexture-performance-optimization Performance optimizations and security
The engine tracks currently bound textures and images in all available texture The engine tracks currently bound textures and images in all available texture
units to avoid unnecessary calls to @fn_gl_keyword{ActiveTexture}, units to avoid unnecessary calls to @fn_gl_keyword{ActiveTexture},
@ -829,6 +829,6 @@ inline GLuint AbstractTexture::release() {
return id; return id;
} }
} }}
#endif #endif

76
src/Magnum/GL/Attribute.cpp

@ -28,7 +28,7 @@
#include <Corrade/Utility/Assert.h> #include <Corrade/Utility/Assert.h>
#include <Corrade/Utility/Debug.h> #include <Corrade/Utility/Debug.h>
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
UnsignedInt FloatAttribute::size(GLint components, DataType dataType) { UnsignedInt FloatAttribute::size(GLint components, DataType dataType) {
switch(dataType) { switch(dataType) {
@ -143,116 +143,116 @@ Debug& operator<<(Debug& debug, SizedAttribute<1, 1>::Components value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
case SizedAttribute<1, 1>::Components::One: case SizedAttribute<1, 1>::Components::One:
return debug << "Attribute::Components::One"; return debug << "GL::Attribute::Components::One";
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, SizedAttribute<1, 2>::Components value) { Debug& operator<<(Debug& debug, SizedAttribute<1, 2>::Components value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
case SizedAttribute<1, 2>::Components::One: case SizedAttribute<1, 2>::Components::One:
return debug << "Attribute::Components::One"; return debug << "GL::Attribute::Components::One";
case SizedAttribute<1, 2>::Components::Two: case SizedAttribute<1, 2>::Components::Two:
return debug << "Attribute::Components::Two"; return debug << "GL::Attribute::Components::Two";
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, SizedAttribute<1, 3>::Components value) { Debug& operator<<(Debug& debug, SizedAttribute<1, 3>::Components value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
case SizedAttribute<1, 3>::Components::One: case SizedAttribute<1, 3>::Components::One:
return debug << "Attribute::Components::One"; return debug << "GL::Attribute::Components::One";
case SizedAttribute<1, 3>::Components::Two: case SizedAttribute<1, 3>::Components::Two:
return debug << "Attribute::Components::Two"; return debug << "GL::Attribute::Components::Two";
case SizedAttribute<1, 3>::Components::Three: case SizedAttribute<1, 3>::Components::Three:
return debug << "Attribute::Components::Three"; return debug << "GL::Attribute::Components::Three";
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, SizedAttribute<1, 4>::Components value) { Debug& operator<<(Debug& debug, SizedAttribute<1, 4>::Components value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
case SizedAttribute<1, 4>::Components::One: case SizedAttribute<1, 4>::Components::One:
return debug << "Attribute::Components::One"; return debug << "GL::Attribute::Components::One";
case SizedAttribute<1, 4>::Components::Two: case SizedAttribute<1, 4>::Components::Two:
return debug << "Attribute::Components::Two"; return debug << "GL::Attribute::Components::Two";
case SizedAttribute<1, 4>::Components::Three: case SizedAttribute<1, 4>::Components::Three:
return debug << "Attribute::Components::Three"; return debug << "GL::Attribute::Components::Three";
case SizedAttribute<1, 4>::Components::Four: case SizedAttribute<1, 4>::Components::Four:
return debug << "Attribute::Components::Four"; return debug << "GL::Attribute::Components::Four";
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, SizedMatrixAttribute<2>::Components value) { Debug& operator<<(Debug& debug, SizedMatrixAttribute<2>::Components value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
case SizedMatrixAttribute<2>::Components::Two: case SizedMatrixAttribute<2>::Components::Two:
return debug << "Attribute::Components::Two"; return debug << "GL::Attribute::Components::Two";
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, SizedMatrixAttribute<3>::Components value) { Debug& operator<<(Debug& debug, SizedMatrixAttribute<3>::Components value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
case SizedMatrixAttribute<3>::Components::Three: case SizedMatrixAttribute<3>::Components::Three:
return debug << "Attribute::Components::Three"; return debug << "GL::Attribute::Components::Three";
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, SizedMatrixAttribute<4>::Components value) { Debug& operator<<(Debug& debug, SizedMatrixAttribute<4>::Components value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
case SizedMatrixAttribute<4>::Components::Four: case SizedMatrixAttribute<4>::Components::Four:
return debug << "Attribute::Components::Four"; return debug << "GL::Attribute::Components::Four";
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, Attribute<Math::Vector<4, Float>>::Components value) { Debug& operator<<(Debug& debug, Attribute<Math::Vector<4, Float>>::Components value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
case Attribute<Math::Vector<4, Float>>::Components::One: case Attribute<Math::Vector<4, Float>>::Components::One:
return debug << "Attribute::Components::One"; return debug << "GL::Attribute::Components::One";
case Attribute<Math::Vector<4, Float>>::Components::Two: case Attribute<Math::Vector<4, Float>>::Components::Two:
return debug << "Attribute::Components::Two"; return debug << "GL::Attribute::Components::Two";
case Attribute<Math::Vector<4, Float>>::Components::Three: case Attribute<Math::Vector<4, Float>>::Components::Three:
return debug << "Attribute::Components::Three"; return debug << "GL::Attribute::Components::Three";
case Attribute<Math::Vector<4, Float>>::Components::Four: case Attribute<Math::Vector<4, Float>>::Components::Four:
return debug << "Attribute::Components::Four"; return debug << "GL::Attribute::Components::Four";
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
case Attribute<Math::Vector<4, Float>>::Components::BGRA: case Attribute<Math::Vector<4, Float>>::Components::BGRA:
return debug << "Attribute::Components::BGRA"; return debug << "GL::Attribute::Components::BGRA";
#endif #endif
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, FloatAttribute::DataType value) { Debug& operator<<(Debug& debug, FloatAttribute::DataType value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case FloatAttribute::DataType::value: return debug << "Attribute::DataType::" #value; #define _c(value) case FloatAttribute::DataType::value: return debug << "GL::Attribute::DataType::" #value;
_c(UnsignedByte) _c(UnsignedByte)
_c(Byte) _c(Byte)
_c(UnsignedShort) _c(UnsignedShort)
@ -268,14 +268,14 @@ Debug& operator<<(Debug& debug, FloatAttribute::DataType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::DataType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::DataType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
Debug& operator<<(Debug& debug, IntAttribute::DataType value) { Debug& operator<<(Debug& debug, IntAttribute::DataType value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case IntAttribute::DataType::value: return debug << "Attribute::DataType::" #value; #define _c(value) case IntAttribute::DataType::value: return debug << "GL::Attribute::DataType::" #value;
_c(UnsignedByte) _c(UnsignedByte)
_c(Byte) _c(Byte)
_c(UnsignedShort) _c(UnsignedShort)
@ -286,7 +286,7 @@ Debug& operator<<(Debug& debug, IntAttribute::DataType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::DataType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::DataType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
@ -294,20 +294,20 @@ Debug& operator<<(Debug& debug, IntAttribute::DataType value) {
Debug& operator<<(Debug& debug, DoubleAttribute::DataType value) { Debug& operator<<(Debug& debug, DoubleAttribute::DataType value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case DoubleAttribute::DataType::value: return debug << "Attribute::DataType::" #value; #define _c(value) case DoubleAttribute::DataType::value: return debug << "GL::Attribute::DataType::" #value;
_c(Double) _c(Double)
#undef _c #undef _c
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::DataType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::DataType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
Debug& operator<<(Debug& debug, Attribute<Math::Vector<3, Float>>::DataType value) { Debug& operator<<(Debug& debug, Attribute<Math::Vector<3, Float>>::DataType value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Attribute<Math::Vector<3, Float>>::DataType::value: return debug << "Attribute::DataType::" #value; #define _c(value) case Attribute<Math::Vector<3, Float>>::DataType::value: return debug << "GL::Attribute::DataType::" #value;
_c(UnsignedByte) _c(UnsignedByte)
_c(Byte) _c(Byte)
_c(UnsignedShort) _c(UnsignedShort)
@ -324,13 +324,13 @@ Debug& operator<<(Debug& debug, Attribute<Math::Vector<3, Float>>::DataType valu
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::DataType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::DataType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, Attribute<Math::Vector<4, Float>>::DataType value) { Debug& operator<<(Debug& debug, Attribute<Math::Vector<4, Float>>::DataType value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Attribute<Math::Vector<4, Float>>::DataType::value: return debug << "Attribute::DataType::" #value; #define _c(value) case Attribute<Math::Vector<4, Float>>::DataType::value: return debug << "GL::Attribute::DataType::" #value;
_c(UnsignedByte) _c(UnsignedByte)
_c(Byte) _c(Byte)
_c(UnsignedShort) _c(UnsignedShort)
@ -350,7 +350,7 @@ Debug& operator<<(Debug& debug, Attribute<Math::Vector<4, Float>>::DataType valu
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Attribute::DataType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Attribute::DataType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
}} }}}

17
src/Magnum/GL/Attribute.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::Attribute * @brief Class @ref Magnum::GL::Attribute
*/ */
#include <Corrade/Containers/EnumSet.h> #include <Corrade/Containers/EnumSet.h>
@ -35,7 +35,7 @@
#include "Magnum/GL/OpenGL.h" #include "Magnum/GL/OpenGL.h"
#include "Magnum/GL/visibility.h" #include "Magnum/GL/visibility.h"
namespace Magnum { namespace Magnum { namespace GL {
namespace Implementation { template<class> struct Attribute; } namespace Implementation { template<class> struct Attribute; }
@ -55,11 +55,12 @@ to floating-point shader inputs. In this case you may want to normalize the
values (e.g. color components from @cpp 0 @ce -- @cpp 255 @ce to @cpp 0.0f @ce values (e.g. color components from @cpp 0 @ce -- @cpp 255 @ce to @cpp 0.0f @ce
-- @cpp 1.0f @ce) --- see @ref DataOption::Normalized. -- @cpp 1.0f @ce) --- see @ref DataOption::Normalized.
Only some types are allowed as attribute types, see @ref AbstractShaderProgram-types Only some types are allowed as attribute types, see @ref GL-AbstractShaderProgram-types
for more information. for more information.
See @ref AbstractShaderProgram-subclassing for example usage in shaders and See @ref GL-AbstractShaderProgram-subclassing for example usage in shaders and
@ref Mesh-configuration for example usage when adding vertex buffers to mesh. @ref GL-Mesh-configuration for example usage when adding vertex buffers to
mesh.
*/ */
template<UnsignedInt location, class T> class Attribute { template<UnsignedInt location, class T> class Attribute {
public: public:
@ -305,10 +306,10 @@ template<UnsignedInt location, class T> class Attribute {
}; };
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
/** @debugoperatorclassenum{Magnum::Attribute,Magnum::Attribute::Components} */ /** @debugoperatorclassenum{Attribute,Attribute::Components} */
template<class T> Debug& operator<<(Debug& debug, Attribute<T>::Components); template<class T> Debug& operator<<(Debug& debug, Attribute<T>::Components);
/** @debugoperatorclassenum{Magnum::Attribute,Magnum::Attribute::DataType} */ /** @debugoperatorclassenum{Attribute,Attribute::DataType} */
template<class T> Debug& operator<<(Debug& debug, Attribute<T>::DataType); template<class T> Debug& operator<<(Debug& debug, Attribute<T>::DataType);
#endif #endif
@ -795,6 +796,6 @@ template<class T> struct Attribute<Math::Matrix4<T>>: Attribute<Math::Matrix<4,
} }
} }}
#endif #endif

12
src/Magnum/GL/Buffer.cpp

@ -37,7 +37,7 @@
#endif #endif
#include "Magnum/GL/Implementation/MeshState.h" #include "Magnum/GL/Implementation/MeshState.h"
namespace Magnum { namespace Magnum { namespace GL {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
Int Buffer::minMapAlignment() { Int Buffer::minMapAlignment() {
@ -579,7 +579,7 @@ bool Buffer::unmapImplementationDSAEXT() {
Debug& operator<<(Debug& debug, Buffer::TargetHint value) { Debug& operator<<(Debug& debug, Buffer::TargetHint value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Buffer::TargetHint::value: return debug << "Buffer::TargetHint::" #value; #define _c(value) case Buffer::TargetHint::value: return debug << "GL::Buffer::TargetHint::" #value;
_c(Array) _c(Array)
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
@ -611,13 +611,13 @@ Debug& operator<<(Debug& debug, Buffer::TargetHint value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Buffer::TargetHint(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Buffer::TargetHint(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
Debug& operator<<(Debug& debug, Buffer::Target value) { Debug& operator<<(Debug& debug, Buffer::Target value) {
switch(value) { switch(value) {
#define _c(value) case Buffer::Target::value: return debug << "Buffer::Target::" #value; #define _c(value) case Buffer::Target::value: return debug << "GL::Buffer::Target::" #value;
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
_c(AtomicCounter) _c(AtomicCounter)
_c(ShaderStorage) _c(ShaderStorage)
@ -626,9 +626,9 @@ Debug& operator<<(Debug& debug, Buffer::Target value) {
#undef _c #undef _c
} }
return debug << "Buffer::Target(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Buffer::Target(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
#endif #endif
} }}

20
src/Magnum/GL/Buffer.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::Buffer, enum @ref Magnum::BufferUsage * @brief Class @ref Magnum::GL::Buffer, enum @ref Magnum::GL::BufferUsage
*/ */
#include <cstddef> #include <cstddef>
@ -45,7 +45,7 @@
#include <Corrade/Utility/Macros.h> #include <Corrade/Utility/Macros.h>
#endif #endif
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Buffer usage @brief Buffer usage
@ -141,7 +141,7 @@ namespace Implementation { struct BufferState; }
Encapsulates one OpenGL buffer object and provides functions for convenient Encapsulates one OpenGL buffer object and provides functions for convenient
data updates. data updates.
@section Buffer-data-updating Data updating @section GL-Buffer-data-updating Data updating
Default way to set or update buffer data with @ref setData() or @ref setSubData() Default way to set or update buffer data with @ref setData() or @ref setSubData()
is to use @ref Corrade::Containers::ArrayView. See its documentation for is to use @ref Corrade::Containers::ArrayView. See its documentation for
@ -154,7 +154,7 @@ There is also overload for array-like containers from STL, such as
@snippet MagnumGL.cpp Buffer-setdata-stl @snippet MagnumGL.cpp Buffer-setdata-stl
@section Buffer-data-mapping Memory mapping @section GL-Buffer-data-mapping Memory mapping
Buffer data can be also updated asynchronously. First you need to allocate Buffer data can be also updated asynchronously. First you need to allocate
the buffer to desired size by passing @cpp nullptr @ce to @ref setData(), e.g.: the buffer to desired size by passing @cpp nullptr @ce to @ref setData(), e.g.:
@ -174,7 +174,7 @@ memory operations performed by OpenGL on unmapping. Example:
@snippet MagnumGL.cpp Buffer-flush @snippet MagnumGL.cpp Buffer-flush
@section Buffer-webgl-restrictions WebGL restrictions @section GL-Buffer-webgl-restrictions WebGL restrictions
Buffers in @ref MAGNUM_TARGET_WEBGL "WebGL" need to be bound only to one unique Buffers in @ref MAGNUM_TARGET_WEBGL "WebGL" need to be bound only to one unique
target, i.e., @ref Buffer bound to @ref Buffer::TargetHint::Array cannot be target, i.e., @ref Buffer bound to @ref Buffer::TargetHint::Array cannot be
@ -194,7 +194,7 @@ such as UBOs):
To simplify debugging, @ref Mesh checks proper target hint when adding vertex To simplify debugging, @ref Mesh checks proper target hint when adding vertex
and index buffers in WebGL. and index buffers in WebGL.
@section Buffer-performance-optimizations Performance optimizations @section GL-Buffer-performance-optimizations Performance optimizations
The engine tracks currently bound buffers to avoid unnecessary calls to The engine tracks currently bound buffers to avoid unnecessary calls to
@fn_gl_keyword{BindBuffer}. If the buffer is already bound to some target, @fn_gl_keyword{BindBuffer}. If the buffer is already bound to some target,
@ -1176,7 +1176,7 @@ class MAGNUM_GL_EXPORT Buffer: public AbstractObject {
* *
* Flushes specified subsection of mapped range. Use only if you called * Flushes specified subsection of mapped range. Use only if you called
* @ref map() with @ref MapFlag::FlushExplicit flag. See * @ref map() with @ref MapFlag::FlushExplicit flag. See
* @ref Buffer-data-mapping "class documentation" for usage example. * @ref GL-Buffer-data-mapping "class documentation" for usage example.
* *
* If neither @extension{ARB,direct_state_access} (part of OpenGL 4.5) * If neither @extension{ARB,direct_state_access} (part of OpenGL 4.5)
* nor @extension{EXT,direct_state_access} desktop extension is * nor @extension{EXT,direct_state_access} desktop extension is
@ -1332,11 +1332,11 @@ class MAGNUM_GL_EXPORT Buffer: public AbstractObject {
CORRADE_ENUMSET_OPERATORS(Buffer::MapFlags) CORRADE_ENUMSET_OPERATORS(Buffer::MapFlags)
#endif #endif
/** @debugoperatorclassenum{Magnum::Buffer,Magnum::Buffer::TargetHint} */ /** @debugoperatorclassenum{Buffer,Buffer::TargetHint} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Buffer::TargetHint value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Buffer::TargetHint value);
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
/** @debugoperatorclassenum{Magnum::Buffer,Magnum::Buffer::Target} */ /** @debugoperatorclassenum{Buffer,Buffer::Target} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Buffer::Target value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Buffer::Target value);
#endif #endif
@ -1376,6 +1376,6 @@ template<class T> Containers::Array<T> inline Buffer::subData(const GLintptr off
CORRADE_IGNORE_DEPRECATED_POP CORRADE_IGNORE_DEPRECATED_POP
#endif #endif
} }}
#endif #endif

12
src/Magnum/GL/BufferImage.cpp

@ -27,16 +27,16 @@
#include "Magnum/GL/PixelFormat.h" #include "Magnum/GL/PixelFormat.h"
namespace Magnum { namespace Magnum { namespace GL {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
template<UnsignedInt dimensions> BufferImage<dimensions>::BufferImage(const PixelStorage storage, const PixelFormat format, const PixelType type, const VectorTypeFor<dimensions, Int>& size, Containers::ArrayView<const void> const data, const BufferUsage usage): _storage{storage}, _format{format}, _type{type}, _size{size}, _buffer{Buffer::TargetHint::PixelPack}, _dataSize{data.size()} { template<UnsignedInt dimensions> BufferImage<dimensions>::BufferImage(const PixelStorage storage, const PixelFormat format, const PixelType type, const VectorTypeFor<dimensions, Int>& size, Containers::ArrayView<const void> const data, const BufferUsage usage): _storage{storage}, _format{format}, _type{type}, _size{size}, _buffer{Buffer::TargetHint::PixelPack}, _dataSize{data.size()} {
CORRADE_ASSERT(Implementation::imageDataSize(*this) <= data.size(), "BufferImage::BufferImage(): bad image data size, got" << data.size() << "but expected at least" << Implementation::imageDataSize(*this), ); CORRADE_ASSERT(Magnum::Implementation::imageDataSize(*this) <= data.size(), "GL::BufferImage::BufferImage(): bad image data size, got" << data.size() << "but expected at least" << Magnum::Implementation::imageDataSize(*this), );
_buffer.setData(data, usage); _buffer.setData(data, usage);
} }
template<UnsignedInt dimensions> BufferImage<dimensions>::BufferImage(const PixelStorage storage, const PixelFormat format, const PixelType type, const VectorTypeFor<dimensions, Int>& size, Buffer&& buffer, const std::size_t dataSize) noexcept: _storage{storage}, _format{format}, _type{type}, _size{size}, _buffer{std::move(buffer)}, _dataSize{dataSize} { template<UnsignedInt dimensions> BufferImage<dimensions>::BufferImage(const PixelStorage storage, const PixelFormat format, const PixelType type, const VectorTypeFor<dimensions, Int>& size, Buffer&& buffer, const std::size_t dataSize) noexcept: _storage{storage}, _format{format}, _type{type}, _size{size}, _buffer{std::move(buffer)}, _dataSize{dataSize} {
CORRADE_ASSERT(Implementation::imageDataSize(*this) <= dataSize, "BufferImage::BufferImage(): bad image data size, got" << dataSize << "but expected at least" << Implementation::imageDataSize(*this), ); CORRADE_ASSERT(Magnum::Implementation::imageDataSize(*this) <= dataSize, "GL::BufferImage::BufferImage(): bad image data size, got" << dataSize << "but expected at least" << Magnum::Implementation::imageDataSize(*this), );
} }
template<UnsignedInt dimensions> BufferImage<dimensions>::BufferImage(const PixelStorage storage, const PixelFormat format, const PixelType type): _storage{storage}, _format{format}, _type{type}, _buffer{Buffer::TargetHint::PixelPack}, _dataSize{0} {} template<UnsignedInt dimensions> BufferImage<dimensions>::BufferImage(const PixelStorage storage, const PixelFormat format, const PixelType type): _storage{storage}, _format{format}, _type{type}, _buffer{Buffer::TargetHint::PixelPack}, _dataSize{0} {}
@ -51,9 +51,9 @@ template<UnsignedInt dimensions> void BufferImage<dimensions>::setData(const Pix
/* Keep the old storage if zero-sized nullptr buffer was passed */ /* Keep the old storage if zero-sized nullptr buffer was passed */
if(data.data() == nullptr && data.size() == 0) if(data.data() == nullptr && data.size() == 0)
CORRADE_ASSERT(Implementation::imageDataSize(*this) <= _dataSize, "BufferImage::setData(): bad current storage size, got" << _dataSize << "but expected at least" << Implementation::imageDataSize(*this), ); CORRADE_ASSERT(Magnum::Implementation::imageDataSize(*this) <= _dataSize, "GL::BufferImage::setData(): bad current storage size, got" << _dataSize << "but expected at least" << Magnum::Implementation::imageDataSize(*this), );
else { else {
CORRADE_ASSERT(Implementation::imageDataSize(*this) <= data.size(), "BufferImage::setData(): bad image data size, got" << data.size() << "but expected at least" << Implementation::imageDataSize(*this), ); CORRADE_ASSERT(Magnum::Implementation::imageDataSize(*this) <= data.size(), "GL::BufferImage::setData(): bad image data size, got" << data.size() << "but expected at least" << Magnum::Implementation::imageDataSize(*this), );
_buffer.setData(data, usage); _buffer.setData(data, usage);
_dataSize = data.size(); _dataSize = data.size();
} }
@ -132,4 +132,4 @@ template class MAGNUM_GL_EXPORT CompressedBufferImage<3>;
#endif #endif
#endif #endif
} }}

10
src/Magnum/GL/BufferImage.h

@ -27,7 +27,7 @@
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
/** @file /** @file
* @brief Class @ref Magnum::BufferImage, @ref Magnum::CompressedBufferImage, typedef @ref Magnum::BufferImage1D, @ref Magnum::BufferImage2D, @ref Magnum::BufferImage3D, @ref Magnum::CompressedBufferImage1D, @ref Magnum::CompressedBufferImage2D, @ref Magnum::CompressedBufferImage3D * @brief Class @ref Magnum::GL::BufferImage, @ref Magnum::GL::CompressedBufferImage, typedef @ref Magnum::GL::BufferImage1D, @ref Magnum::GL::BufferImage2D, @ref Magnum::GL::BufferImage3D, @ref Magnum::GL::CompressedBufferImage1D, @ref Magnum::GL::CompressedBufferImage2D, @ref Magnum::GL::CompressedBufferImage3D
*/ */
#endif #endif
@ -36,7 +36,7 @@
#include "Magnum/GL/Buffer.h" #include "Magnum/GL/Buffer.h"
#include "Magnum/Math/Vector4.h" #include "Magnum/Math/Vector4.h"
namespace Magnum { namespace Magnum { namespace GL {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
/** /**
@ -160,7 +160,7 @@ template<UnsignedInt dimensions> class BufferImage {
* See @ref PixelStorage::dataProperties() for more information. * See @ref PixelStorage::dataProperties() for more information.
*/ */
std::tuple<VectorTypeFor<dimensions, std::size_t>, VectorTypeFor<dimensions, std::size_t>, std::size_t> dataProperties() const { std::tuple<VectorTypeFor<dimensions, std::size_t>, VectorTypeFor<dimensions, std::size_t>, std::size_t> dataProperties() const {
return Implementation::imageDataProperties<dimensions>(*this); return Magnum::Implementation::imageDataProperties<dimensions>(*this);
} }
/** @brief Currently allocated data size */ /** @brief Currently allocated data size */
@ -366,7 +366,7 @@ template<UnsignedInt dimensions> class CompressedBufferImage {
* WebGL. * WebGL.
*/ */
std::tuple<VectorTypeFor<dimensions, std::size_t>, VectorTypeFor<dimensions, std::size_t>, std::size_t> dataProperties() const { std::tuple<VectorTypeFor<dimensions, std::size_t>, VectorTypeFor<dimensions, std::size_t>, std::size_t> dataProperties() const {
return Implementation::compressedImageDataProperties<dimensions>(*this); return Magnum::Implementation::compressedImageDataProperties<dimensions>(*this);
} }
#endif #endif
@ -489,6 +489,6 @@ template<UnsignedInt dimensions> inline void CompressedBufferImage<dimensions>::
#error this header is not available in OpenGL ES 2.0 build #error this header is not available in OpenGL ES 2.0 build
#endif #endif
} }}
#endif #endif

4
src/Magnum/GL/BufferTexture.cpp

@ -32,7 +32,7 @@
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
#include "Magnum/GL/Implementation/TextureState.h" #include "Magnum/GL/Implementation/TextureState.h"
namespace Magnum { namespace Magnum { namespace GL {
Int BufferTexture::maxSize() { Int BufferTexture::maxSize() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -124,5 +124,5 @@ void BufferTexture::setBufferRangeImplementationDSAEXT(BufferTextureFormat inter
} }
#endif #endif
} }}
#endif #endif

12
src/Magnum/GL/BufferTexture.h

@ -27,14 +27,14 @@
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/** @file /** @file
* @brief Class @ref Magnum::BufferTexture * @brief Class @ref Magnum::GL::BufferTexture
*/ */
#endif #endif
#include "Magnum/GL/AbstractTexture.h" #include "Magnum/GL/AbstractTexture.h"
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Buffer texture @brief Buffer texture
@ -42,7 +42,7 @@ namespace Magnum {
This texture is, unlike classic textures such as @ref Texture, used as simple This texture is, unlike classic textures such as @ref Texture, used as simple
data source, without any unnecessary interpolation and wrapping methods. data source, without any unnecessary interpolation and wrapping methods.
@section BufferTexture-usage Usage @section GL-BufferTexture-usage Usage
Texture data are stored in buffer and after binding the buffer to the texture Texture data are stored in buffer and after binding the buffer to the texture
using @ref setBuffer(), you can fill the buffer at any time using data setting using @ref setBuffer(), you can fill the buffer at any time using data setting
@ -63,13 +63,13 @@ textures, coordinates for buffer textures are integer coordinates passed to
@glsl texelFetch() @ce. See @ref AbstractShaderProgram documentation for more @glsl texelFetch() @ce. See @ref AbstractShaderProgram documentation for more
information about usage in shaders. information about usage in shaders.
@section BufferTexture-performance-optimizations Performance optimizations @section GL-BufferTexture-performance-optimizations Performance optimizations
If either @extension{ARB,direct_state_access} (part of OpenGL 4.5) or If either @extension{ARB,direct_state_access} (part of OpenGL 4.5) or
@extension{EXT,direct_state_access} is available, @ref setBuffer() functions @extension{EXT,direct_state_access} is available, @ref setBuffer() functions
use DSA to avoid unnecessary calls to @fn_gl{ActiveTexture} and use DSA to avoid unnecessary calls to @fn_gl{ActiveTexture} and
@fn_gl{BindTexture}. See @fn_gl{BindTexture}. See
@ref AbstractTexture-performance-optimization "relevant section in AbstractTexture documentation" @ref GL-AbstractTexture-performance-optimization "relevant section in AbstractTexture documentation"
and respective function documentation for more information. and respective function documentation for more information.
@see @ref Texture, @ref TextureArray, @ref CubeMapTexture, @see @ref Texture, @ref TextureArray, @ref CubeMapTexture,
@ -242,7 +242,7 @@ class MAGNUM_GL_EXPORT BufferTexture: public AbstractTexture {
#endif #endif
}; };
} }}
#else #else
#error this header is not available in OpenGL ES 2.0 and WebGL build #error this header is not available in OpenGL ES 2.0 and WebGL build
#endif #endif

6
src/Magnum/GL/BufferTextureFormat.h

@ -27,14 +27,14 @@
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/** @file /** @file
* @brief Enum @ref Magnum::BufferTextureFormat * @brief Enum @ref Magnum::GL::BufferTextureFormat
*/ */
#endif #endif
#include "Magnum/GL/OpenGL.h" #include "Magnum/GL/OpenGL.h"
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Internal buffer texture format @brief Internal buffer texture format
@ -171,7 +171,7 @@ enum class BufferTextureFormat: GLenum {
RGBA32F = GL_RGBA32F RGBA32F = GL_RGBA32F
}; };
} }}
#else #else
#error this header is not available in OpenGL ES 2.0 and WebGL build #error this header is not available in OpenGL ES 2.0 and WebGL build
#endif #endif

34
src/Magnum/GL/Context.cpp

@ -61,7 +61,7 @@
#include "Magnum/GL/Implementation/TransformFeedbackState.h" #include "Magnum/GL/Implementation/TransformFeedbackState.h"
#endif #endif
namespace Magnum { namespace Magnum { namespace GL {
const std::vector<Extension>& Extension::extensions(Version version) { const std::vector<Extension>& Extension::extensions(Version version) {
#define _extension(prefix, vendor, extension) \ #define _extension(prefix, vendor, extension) \
@ -445,7 +445,7 @@ namespace {
bool Context::hasCurrent() { return currentContext; } bool Context::hasCurrent() { return currentContext; }
Context& Context::current() { Context& Context::current() {
CORRADE_ASSERT(currentContext, "Context::current(): no current context", *currentContext); CORRADE_ASSERT(currentContext, "GL::Context::current(): no current context", *currentContext);
return *currentContext; return *currentContext;
} }
@ -521,7 +521,7 @@ bool Context::tryCreate() {
#else #else
const std::string version = versionString(); const std::string version = versionString();
if(version.find("WebGL 2") == std::string::npos) { if(version.find("WebGL 2") == std::string::npos) {
Error() << "Context: unsupported version string:" << version; Error{} << "GL::Context: unsupported version string:" << version;
return false; return false;
} }
majorVersion = 3; majorVersion = 3;
@ -543,7 +543,7 @@ bool Context::tryCreate() {
{ {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
CORRADE_ASSERT(versionNumberError == Renderer::Error::InvalidEnum, CORRADE_ASSERT(versionNumberError == Renderer::Error::InvalidEnum,
"Context: cannot retrieve OpenGL version:" << versionNumberError, false); "GL::Context: cannot retrieve OpenGL version:" << versionNumberError, false);
#endif #endif
/* Allow ES2 context on driver that reports ES3 as supported */ /* Allow ES2 context on driver that reports ES3 as supported */
@ -567,20 +567,20 @@ bool Context::tryCreate() {
minorVersion = 0; minorVersion = 0;
#endif #endif
} else { } else {
Error() << "Context: unsupported version string:" << version; Error{} << "GL::Context: unsupported version string:" << version;
return false; return false;
} }
} }
#endif #endif
/* Compose the version enum */ /* Compose the version enum */
_version = Magnum::version(majorVersion, minorVersion); _version = GL::version(majorVersion, minorVersion);
/* Check that version retrieval went right */ /* Check that version retrieval went right */
#ifndef CORRADE_NO_ASSERT #ifndef CORRADE_NO_ASSERT
const auto error = Renderer::error(); const auto error = Renderer::error();
CORRADE_ASSERT(error == Renderer::Error::NoError, CORRADE_ASSERT(error == Renderer::Error::NoError,
"Context: cannot retrieve OpenGL version:" << error, false); "GL::Context: cannot retrieve OpenGL version:" << error, false);
#endif #endif
/* Check that the version is supported (now it probably is, but be sure) */ /* Check that the version is supported (now it probably is, but be sure) */
@ -593,9 +593,9 @@ bool Context::tryCreate() {
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
Error() << "Context: unsupported OpenGL version" << std::make_pair(majorVersion, minorVersion); Error{} << "GL::Context: unsupported OpenGL version" << std::make_pair(majorVersion, minorVersion);
#else #else
Error() << "Context: unsupported OpenGL ES version" << std::make_pair(majorVersion, minorVersion); Error{} << "GL::Context: unsupported OpenGL ES version" << std::make_pair(majorVersion, minorVersion);
#endif #endif
/* Reset the version so the context is not marked as successfully created */ /* Reset the version so the context is not marked as successfully created */
@ -678,7 +678,7 @@ bool Context::tryCreate() {
setupDriverWorkarounds(); setupDriverWorkarounds();
/* Set this context as current */ /* Set this context as current */
CORRADE_ASSERT(!currentContext, "Context: Another context currently active", false); CORRADE_ASSERT(!currentContext, "GL::Context: Another context currently active", false);
currentContext = this; currentContext = this;
/* Decide whether to print the initialization output or not */ /* Decide whether to print the initialization output or not */
@ -886,7 +886,7 @@ void Context::resetState(const States states) {
Debug& operator<<(Debug& debug, const Context::Flag value) { Debug& operator<<(Debug& debug, const Context::Flag value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Context::Flag::value: return debug << "Context::Flag::" #value; #define _c(value) case Context::Flag::value: return debug << "GL::Context::Flag::" #value;
_c(Debug) _c(Debug)
_c(NoError) _c(NoError)
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
@ -896,11 +896,11 @@ Debug& operator<<(Debug& debug, const Context::Flag value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Context::Flag(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Context::Flag(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const Context::Flags value) { Debug& operator<<(Debug& debug, const Context::Flags value) {
return Containers::enumSetDebugOutput(debug, value, "Context::Flags{}", { return Containers::enumSetDebugOutput(debug, value, "GL::Context::Flags{}", {
Context::Flag::Debug, Context::Flag::Debug,
Context::Flag::NoError, Context::Flag::NoError,
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
@ -913,7 +913,7 @@ Debug& operator<<(Debug& debug, const Context::Flags value) {
Debug& operator<<(Debug& debug, const Context::DetectedDriver value) { Debug& operator<<(Debug& debug, const Context::DetectedDriver value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Context::DetectedDriver::value: return debug << "Context::DetectedDriver::" #value; #define _c(value) case Context::DetectedDriver::value: return debug << "GL::Context::DetectedDriver::" #value;
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
_c(Amd) _c(Amd)
#endif #endif
@ -932,11 +932,11 @@ Debug& operator<<(Debug& debug, const Context::DetectedDriver value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Context::DetectedDriver(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Context::DetectedDriver(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const Context::DetectedDrivers value) { Debug& operator<<(Debug& debug, const Context::DetectedDrivers value) {
return Containers::enumSetDebugOutput(debug, value, "Context::DetectedDrivers{}", { return Containers::enumSetDebugOutput(debug, value, "GL::Context::DetectedDrivers{}", {
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
Context::DetectedDriver::Amd, Context::DetectedDriver::Amd,
#endif #endif
@ -955,4 +955,4 @@ Debug& operator<<(Debug& debug, const Context::DetectedDrivers value) {
} }
#endif #endif
} }}

24
src/Magnum/GL/Context.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::Context, @ref Magnum::Extension, macro @ref MAGNUM_ASSERT_VERSION_SUPPORTED(), @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED() * @brief Class @ref Magnum::GL::Context, @ref Magnum::GL::Extension, macro @ref MAGNUM_ASSERT_VERSION_SUPPORTED(), @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED()
*/ */
#include <cstdlib> #include <cstdlib>
@ -45,6 +45,10 @@
namespace Magnum { namespace Magnum {
namespace Platform { class Context; }
namespace GL {
namespace Implementation { namespace Implementation {
struct ContextState; struct ContextState;
struct State; struct State;
@ -61,8 +65,6 @@ namespace Implementation {
}; };
} }
namespace Platform { class Context; }
/** /**
@brief Run-time information about OpenGL extension @brief Run-time information about OpenGL extension
@ -110,7 +112,7 @@ also possible to create the context without using any `*Application` class
using @ref Platform::Context subclass, see @ref platform documentation for more using @ref Platform::Context subclass, see @ref platform documentation for more
information. information.
@section Context-command-line Command-line options @section GL-Context-command-line Command-line options
The context is configurable through command-line options, that are passed The context is configurable through command-line options, that are passed
either from the `Platform::*Application` classes or from the @ref Platform::Context either from the `Platform::*Application` classes or from the @ref Platform::Context
@ -675,17 +677,17 @@ CORRADE_ENUMSET_OPERATORS(Context::Flags)
CORRADE_ENUMSET_OPERATORS(Context::DetectedDrivers) CORRADE_ENUMSET_OPERATORS(Context::DetectedDrivers)
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
/** @debugoperatorclassenum{Magnum::Context,Magnum::Context::Flag} */ /** @debugoperatorclassenum{Context,Context::Flag} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Context::Flag value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Context::Flag value);
/** @debugoperatorclassenum{Magnum::Context,Magnum::Context::Flags} */ /** @debugoperatorclassenum{Context,Context::Flags} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Context::Flags value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Context::Flags value);
#endif #endif
/** @debugoperatorclassenum{Magnum::Context,Magnum::Context::DetectedDriver} */ /** @debugoperatorclassenum{Context,Context::DetectedDriver} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Context::DetectedDriver value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Context::DetectedDriver value);
/** @debugoperatorclassenum{Magnum::Context,Magnum::Context::DetectedDrivers} */ /** @debugoperatorclassenum{Context,Context::DetectedDrivers} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Context::DetectedDrivers value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Context::DetectedDrivers value);
/** @hideinitializer /** @hideinitializer
@ -700,7 +702,7 @@ Example usage:
@snippet MagnumGL.cpp Context-MAGNUM_ASSERT_VERSION_SUPPORTED @snippet MagnumGL.cpp Context-MAGNUM_ASSERT_VERSION_SUPPORTED
@see @ref Magnum::Context::isVersionSupported() "Context::isVersionSupported()", @see @ref Magnum::GL::Context::isVersionSupported() "GL::Context::isVersionSupported()",
@ref MAGNUM_ASSERT_EXTENSION_SUPPORTED(), @ref CORRADE_ASSERT(), @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED(), @ref CORRADE_ASSERT(),
@ref CORRADE_INTERNAL_ASSERT() @ref CORRADE_INTERNAL_ASSERT()
*/ */
@ -718,7 +720,7 @@ Example usage:
/** @hideinitializer /** @hideinitializer
@brief Assert that given OpenGL extension is supported @brief Assert that given OpenGL extension is supported
@param extension Extension name (from @ref Magnum::Extensions "Extensions" @param extension Extension name (from the @ref Magnum::GL::Extensions "Extensions"
namespace) namespace)
Useful for initial checks on availability of required features. Useful for initial checks on availability of required features.
@ -745,6 +747,6 @@ Example usage:
} while(0) } while(0)
#endif #endif
} }}
#endif #endif

30
src/Magnum/GL/CubeMapTexture.cpp

@ -34,7 +34,7 @@
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
#include "Magnum/GL/Implementation/TextureState.h" #include "Magnum/GL/Implementation/TextureState.h"
namespace Magnum { namespace Magnum { namespace GL {
static_assert(GL_TEXTURE_CUBE_MAP_POSITIVE_X - GL_TEXTURE_CUBE_MAP_POSITIVE_X == 0 && static_assert(GL_TEXTURE_CUBE_MAP_POSITIVE_X - GL_TEXTURE_CUBE_MAP_POSITIVE_X == 0 &&
GL_TEXTURE_CUBE_MAP_NEGATIVE_X - GL_TEXTURE_CUBE_MAP_POSITIVE_X == 1 && GL_TEXTURE_CUBE_MAP_NEGATIVE_X - GL_TEXTURE_CUBE_MAP_POSITIVE_X == 1 &&
@ -64,7 +64,7 @@ void CubeMapTexture::image(const Int level, Image3D& image) {
createIfNotAlready(); createIfNotAlready();
const Vector3i size{imageSize(level), 6}; const Vector3i size{imageSize(level), 6};
const std::size_t dataSize = Implementation::imageDataSizeFor(image, size); const std::size_t dataSize = Magnum::Implementation::imageDataSizeFor(image, size);
/* Reallocate only if needed */ /* Reallocate only if needed */
Containers::Array<char> data{image.release()}; Containers::Array<char> data{image.release()};
@ -86,7 +86,7 @@ void CubeMapTexture::image(const Int level, BufferImage3D& image, const BufferUs
createIfNotAlready(); createIfNotAlready();
const Vector3i size{imageSize(level), 6}; const Vector3i size{imageSize(level), 6};
const std::size_t dataSize = Implementation::imageDataSizeFor(image, size); const std::size_t dataSize = Magnum::Implementation::imageDataSizeFor(image, size);
/* Reallocate only if needed */ /* Reallocate only if needed */
if(image.dataSize() < dataSize) if(image.dataSize() < dataSize)
@ -115,7 +115,7 @@ void CubeMapTexture::compressedImage(const Int level, CompressedImage3D& image)
if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) { if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) {
dataOffset = 0; dataOffset = 0;
dataSize = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level)*6; dataSize = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level)*6;
} else std::tie(dataOffset, dataSize) = Implementation::compressedImageDataOffsetSizeFor(image, size); } else std::tie(dataOffset, dataSize) = Magnum::Implementation::compressedImageDataOffsetSizeFor(image, size);
/* Internal texture format */ /* Internal texture format */
GLint format; GLint format;
@ -148,7 +148,7 @@ void CubeMapTexture::compressedImage(const Int level, CompressedBufferImage3D& i
if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) { if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) {
dataOffset = 0; dataOffset = 0;
dataSize = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level)*6; dataSize = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level)*6;
} else std::tie(dataOffset, dataSize) = Implementation::compressedImageDataOffsetSizeFor(image, size); } else std::tie(dataOffset, dataSize) = Magnum::Implementation::compressedImageDataOffsetSizeFor(image, size);
/* Internal texture format */ /* Internal texture format */
GLint format; GLint format;
@ -172,7 +172,7 @@ CompressedBufferImage3D CubeMapTexture::compressedImage(const Int level, Compres
void CubeMapTexture::image(const CubeMapCoordinate coordinate, const Int level, Image2D& image) { void CubeMapTexture::image(const CubeMapCoordinate coordinate, const Int level, Image2D& image) {
const Vector2i size = imageSize(level); const Vector2i size = imageSize(level);
const std::size_t dataSize = Implementation::imageDataSizeFor(image, size); const std::size_t dataSize = Magnum::Implementation::imageDataSizeFor(image, size);
/* Reallocate only if needed */ /* Reallocate only if needed */
Containers::Array<char> data{image.release()}; Containers::Array<char> data{image.release()};
@ -192,7 +192,7 @@ Image2D CubeMapTexture::image(const CubeMapCoordinate coordinate, const Int leve
void CubeMapTexture::image(const CubeMapCoordinate coordinate, const Int level, BufferImage2D& image, const BufferUsage usage) { void CubeMapTexture::image(const CubeMapCoordinate coordinate, const Int level, BufferImage2D& image, const BufferUsage usage) {
const Vector2i size = imageSize(level); const Vector2i size = imageSize(level);
const std::size_t dataSize = Implementation::imageDataSizeFor(image, size); const std::size_t dataSize = Magnum::Implementation::imageDataSizeFor(image, size);
/* Reallocate only if needed */ /* Reallocate only if needed */
if(image.dataSize() < dataSize) if(image.dataSize() < dataSize)
@ -219,7 +219,7 @@ void CubeMapTexture::compressedImage(const CubeMapCoordinate coordinate, const I
if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize())
dataSize = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level); dataSize = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level);
else else
dataSize = Implementation::compressedImageDataSizeFor(image, size); dataSize = Magnum::Implementation::compressedImageDataSizeFor(image, size);
/* Internal texture format */ /* Internal texture format */
GLint format; GLint format;
@ -250,7 +250,7 @@ void CubeMapTexture::compressedImage(const CubeMapCoordinate coordinate, const I
if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize())
dataSize = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level); dataSize = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level);
else else
dataSize = Implementation::compressedImageDataSizeFor(image, size); dataSize = Magnum::Implementation::compressedImageDataSizeFor(image, size);
/* Internal texture format */ /* Internal texture format */
GLint format; GLint format;
@ -315,7 +315,7 @@ CubeMapTexture& CubeMapTexture::setCompressedSubImage(const Int level, const Vec
Buffer::unbindInternal(Buffer::TargetHint::PixelUnpack); Buffer::unbindInternal(Buffer::TargetHint::PixelUnpack);
image.storage().applyUnpack(); image.storage().applyUnpack();
glCompressedTextureSubImage3D(_id, level, offset.x(), offset.y(), offset.z(), image.size().x(), image.size().y(), image.size().z(), GLenum(image.format()), Implementation::occupiedCompressedImageDataSize(image, image.data().size()), image.data()); glCompressedTextureSubImage3D(_id, level, offset.x(), offset.y(), offset.z(), image.size().x(), image.size().y(), image.size().z(), GLenum(image.format()), Magnum::Implementation::occupiedCompressedImageDataSize(image, image.data().size()), image.data());
return *this; return *this;
} }
@ -324,7 +324,7 @@ CubeMapTexture& CubeMapTexture::setCompressedSubImage(const Int level, const Vec
image.buffer().bindInternal(Buffer::TargetHint::PixelUnpack); image.buffer().bindInternal(Buffer::TargetHint::PixelUnpack);
image.storage().applyUnpack(); image.storage().applyUnpack();
glCompressedTextureSubImage3D(_id, level, offset.x(), offset.y(), offset.z(), image.size().x(), image.size().y(), image.size().z(), GLenum(image.format()), Implementation::occupiedCompressedImageDataSize(image, image.dataSize()), nullptr); glCompressedTextureSubImage3D(_id, level, offset.x(), offset.y(), offset.z(), image.size().x(), image.size().y(), image.size().z(), GLenum(image.format()), Magnum::Implementation::occupiedCompressedImageDataSize(image, image.dataSize()), nullptr);
return *this; return *this;
} }
#endif #endif
@ -336,7 +336,7 @@ CubeMapTexture& CubeMapTexture::setSubImage(const CubeMapCoordinate coordinate,
image.storage().applyUnpack(); image.storage().applyUnpack();
(this->*Context::current().state().texture->cubeSubImageImplementation)(coordinate, level, offset, image.size(), image.format(), image.type(), image.data() (this->*Context::current().state().texture->cubeSubImageImplementation)(coordinate, level, offset, image.size(), image.format(), image.type(), image.data()
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
+ Implementation::pixelStorageSkipOffset(image) + Magnum::Implementation::pixelStorageSkipOffset(image)
#endif #endif
); );
return *this; return *this;
@ -360,7 +360,7 @@ CubeMapTexture& CubeMapTexture::setCompressedSubImage(const CubeMapCoordinate co
to reset anything */ to reset anything */
image.storage().applyUnpack(); image.storage().applyUnpack();
#endif #endif
(this->*Context::current().state().texture->cubeCompressedSubImageImplementation)(coordinate, level, offset, image.size(), image.format(), image.data(), Implementation::occupiedCompressedImageDataSize(image, image.data().size())); (this->*Context::current().state().texture->cubeCompressedSubImageImplementation)(coordinate, level, offset, image.size(), image.format(), image.data(), Magnum::Implementation::occupiedCompressedImageDataSize(image, image.data().size()));
return *this; return *this;
} }
@ -372,7 +372,7 @@ CubeMapTexture& CubeMapTexture::setCompressedSubImage(const CubeMapCoordinate co
to reset anything */ to reset anything */
image.storage().applyUnpack(); image.storage().applyUnpack();
#endif #endif
(this->*Context::current().state().texture->cubeCompressedSubImageImplementation)(coordinate, level, offset, image.size(), image.format(), nullptr, Implementation::occupiedCompressedImageDataSize(image, image.dataSize())); (this->*Context::current().state().texture->cubeCompressedSubImageImplementation)(coordinate, level, offset, image.size(), image.format(), nullptr, Magnum::Implementation::occupiedCompressedImageDataSize(image, image.dataSize()));
return *this; return *this;
} }
#endif #endif
@ -544,4 +544,4 @@ void CubeMapTexture::compressedSubImageImplementationDSAEXT(const CubeMapCoordin
} }
#endif #endif
} }}

8
src/Magnum/GL/CubeMapTexture.h

@ -26,14 +26,14 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::CubeMapTexture, enum @ref Magnum::CubeMapCoordinate * @brief Class @ref Magnum::GL::CubeMapTexture, enum @ref Magnum::GL::CubeMapCoordinate
*/ */
#include "Magnum/Array.h" #include "Magnum/Array.h"
#include "Magnum/GL/AbstractTexture.h" #include "Magnum/GL/AbstractTexture.h"
#include "Magnum/Math/Vector2.h" #include "Magnum/Math/Vector2.h"
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Cube map coordinate @brief Cube map coordinate
@ -65,7 +65,7 @@ turned upside down (+Y is top):
| +Y | | +Y |
+----+ +----+
@section CubeMapTexture-usage Basic usage @section GL-CubeMapTexture-usage Basic usage
See @ref Texture documentation for introduction. See @ref Texture documentation for introduction.
@ -1120,6 +1120,6 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture {
#endif #endif
}; };
} }}
#endif #endif

4
src/Magnum/GL/CubeMapTextureArray.cpp

@ -32,7 +32,7 @@
#include "Magnum/GL/Extensions.h" #include "Magnum/GL/Extensions.h"
#include "Magnum/GL/Implementation/maxTextureSize.h" #include "Magnum/GL/Implementation/maxTextureSize.h"
namespace Magnum { namespace Magnum { namespace GL {
Vector3i CubeMapTextureArray::maxSize() { Vector3i CubeMapTextureArray::maxSize() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -89,5 +89,5 @@ CompressedBufferImage3D CubeMapTextureArray::compressedSubImage(const Int level,
} }
#endif #endif
} }}
#endif #endif

8
src/Magnum/GL/CubeMapTextureArray.h

@ -27,7 +27,7 @@
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/** @file /** @file
* @brief Class @ref Magnum::CubeMapTextureArray * @brief Class @ref Magnum::GL::CubeMapTextureArray
*/ */
#endif #endif
@ -36,14 +36,14 @@
#include "Magnum/Math/Vector3.h" #include "Magnum/Math/Vector3.h"
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Cube map texture array @brief Cube map texture array
See @ref CubeMapTexture documentation for introduction. See @ref CubeMapTexture documentation for introduction.
@section CubeMapTextureArray-usage Usage @section GL-CubeMapTextureArray-usage Usage
See @ref Texture documentation for introduction. See @ref Texture documentation for introduction.
@ -779,7 +779,7 @@ class MAGNUM_GL_EXPORT CubeMapTextureArray: public AbstractTexture {
explicit CubeMapTextureArray(GLuint id, ObjectFlags flags) noexcept: AbstractTexture{id, GL_TEXTURE_CUBE_MAP_ARRAY, flags} {} explicit CubeMapTextureArray(GLuint id, ObjectFlags flags) noexcept: AbstractTexture{id, GL_TEXTURE_CUBE_MAP_ARRAY, flags} {}
}; };
} }}
#else #else
#error this header is not available in OpenGL ES 2.0 and WebGL build #error this header is not available in OpenGL ES 2.0 and WebGL build
#endif #endif

32
src/Magnum/GL/DebugOutput.cpp

@ -34,7 +34,7 @@
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
#include "Magnum/GL/Implementation/DebugState.h" #include "Magnum/GL/Implementation/DebugState.h"
namespace Magnum { namespace Magnum { namespace GL {
namespace { namespace {
@ -202,7 +202,7 @@ void DebugOutput::callbackImplementationKhrES(const Callback callback, const voi
Debug& operator<<(Debug& debug, const DebugOutput::Source value) { Debug& operator<<(Debug& debug, const DebugOutput::Source value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case DebugOutput::Source::value: return debug << "DebugOutput::Source::" #value; #define _c(value) case DebugOutput::Source::value: return debug << "GL::DebugOutput::Source::" #value;
_c(Api) _c(Api)
_c(WindowSystem) _c(WindowSystem)
_c(ShaderCompiler) _c(ShaderCompiler)
@ -213,13 +213,13 @@ Debug& operator<<(Debug& debug, const DebugOutput::Source value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "DebugOutput::Source(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::DebugOutput::Source(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const DebugOutput::Type value) { Debug& operator<<(Debug& debug, const DebugOutput::Type value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case DebugOutput::Type::value: return debug << "DebugOutput::Type::" #value; #define _c(value) case DebugOutput::Type::value: return debug << "GL::DebugOutput::Type::" #value;
_c(Error) _c(Error)
_c(DeprecatedBehavior) _c(DeprecatedBehavior)
_c(UndefinedBehavior) _c(UndefinedBehavior)
@ -233,12 +233,12 @@ Debug& operator<<(Debug& debug, const DebugOutput::Type value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "DebugOutput::Type(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::DebugOutput::Type(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const DebugOutput::Severity value) { Debug& operator<<(Debug& debug, const DebugOutput::Severity value) {
switch(value) { switch(value) {
#define _c(value) case DebugOutput::Severity::value: return debug << "DebugOutput::Severity::" #value; #define _c(value) case DebugOutput::Severity::value: return debug << "GL::DebugOutput::Severity::" #value;
_c(High) _c(High)
_c(Medium) _c(Medium)
_c(Low) _c(Low)
@ -246,7 +246,7 @@ Debug& operator<<(Debug& debug, const DebugOutput::Severity value) {
#undef _c #undef _c
} }
return debug << "DebugOutput::Severity(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::DebugOutput::Severity(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
@ -282,19 +282,19 @@ void DebugMessage::insertImplementationGremedy(Source, Type, UnsignedInt, DebugO
Debug& operator<<(Debug& debug, const DebugMessage::Source value) { Debug& operator<<(Debug& debug, const DebugMessage::Source value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case DebugMessage::Source::value: return debug << "DebugMessage::Source::" #value; #define _c(value) case DebugMessage::Source::value: return debug << "GL::DebugMessage::Source::" #value;
_c(ThirdParty) _c(ThirdParty)
_c(Application) _c(Application)
#undef _c #undef _c
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "DebugMessage::Source(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::DebugMessage::Source(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const DebugMessage::Type value) { Debug& operator<<(Debug& debug, const DebugMessage::Type value) {
switch(value) { switch(value) {
#define _c(value) case DebugMessage::Type::value: return debug << "DebugMessage::Type::" #value; #define _c(value) case DebugMessage::Type::value: return debug << "GL::DebugMessage::Type::" #value;
_c(Error) _c(Error)
_c(DeprecatedBehavior) _c(DeprecatedBehavior)
_c(UndefinedBehavior) _c(UndefinedBehavior)
@ -305,7 +305,7 @@ Debug& operator<<(Debug& debug, const DebugMessage::Type value) {
#undef _c #undef _c
} }
return debug << "DebugMessage::Type(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::DebugMessage::Type(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
@ -327,13 +327,13 @@ Int DebugGroup::maxStackDepth() {
} }
void DebugGroup::pushInternal(const Source source, const UnsignedInt id, const Containers::ArrayView<const char> message) { void DebugGroup::pushInternal(const Source source, const UnsignedInt id, const Containers::ArrayView<const char> message) {
CORRADE_ASSERT(!_active, "DebugGroup::push(): group is already active", ); CORRADE_ASSERT(!_active, "GL::DebugGroup::push(): group is already active", );
Context::current().state().debug->pushGroupImplementation(source, id, message); Context::current().state().debug->pushGroupImplementation(source, id, message);
_active = true; _active = true;
} }
void DebugGroup::pop() { void DebugGroup::pop() {
CORRADE_ASSERT(_active, "DebugGroup::pop(): group is not active", ); CORRADE_ASSERT(_active, "GL::DebugGroup::pop(): group is not active", );
Context::current().state().debug->popGroupImplementation(); Context::current().state().debug->popGroupImplementation();
_active = false; _active = false;
} }
@ -378,16 +378,16 @@ void DebugGroup::popImplementationExt() {
Debug& operator<<(Debug& debug, const DebugGroup::Source value) { Debug& operator<<(Debug& debug, const DebugGroup::Source value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case DebugGroup::Source::value: return debug << "DebugGroup::Source::" #value; #define _c(value) case DebugGroup::Source::value: return debug << "GL::DebugGroup::Source::" #value;
_c(ThirdParty) _c(ThirdParty)
_c(Application) _c(Application)
#undef _c #undef _c
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "DebugGroup::Source(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::DebugGroup::Source(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
} }}
#endif #endif

30
src/Magnum/GL/DebugOutput.h

@ -27,7 +27,7 @@
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
/** @file /** @file
* @brief Class @ref Magnum::DebugOutput, @ref Magnum::DebugMessage, @ref Magnum::DebugGroup * @brief Class @ref Magnum::GL::DebugOutput, @ref Magnum::GL::DebugMessage, @ref Magnum::GL::DebugGroup
*/ */
#endif #endif
@ -39,7 +39,7 @@
#include "Magnum/GL/visibility.h" #include "Magnum/GL/visibility.h"
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
namespace Magnum { namespace Magnum { namespace GL {
namespace Implementation { struct DebugState; } namespace Implementation { struct DebugState; }
@ -52,7 +52,7 @@ or from third party software and the application itself using @ref DebugMessage
and @ref DebugGroup, which can be also used to mark various portions of command and @ref DebugGroup, which can be also used to mark various portions of command
stream in various graphics debuggers, such as ApiTrace or gDEBugger. stream in various graphics debuggers, such as ApiTrace or gDEBugger.
@section Magnum-DebugOutput-usage Basic usage @section GL-Magnum-DebugOutput-usage Basic usage
Support for debug output is provided by OpenGL 4.3 / OpenGL ES 3.2 or Support for debug output is provided by OpenGL 4.3 / OpenGL ES 3.2 or
@extension{KHR,debug} (desktop/ES extension, covered also by @extension{KHR,debug} (desktop/ES extension, covered also by
@ -412,13 +412,13 @@ class MAGNUM_GL_EXPORT DebugOutput {
#endif #endif
}; };
/** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Source} */ /** @debugoperatorclassenum{DebugOutput,DebugOutput::Source} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Source value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Source value);
/** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Type} */ /** @debugoperatorclassenum{DebugOutput,DebugOutput::Type} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Type value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Type value);
/** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Severity} */ /** @debugoperatorclassenum{DebugOutput,DebugOutput::Severity} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Severity value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Severity value);
/** /**
@ -428,7 +428,7 @@ Allows inserting messages GL command stream with labels, useful for example
with conjunction with various graphics debuggers, such as ApiTrace or with conjunction with various graphics debuggers, such as ApiTrace or
gDEBugger. gDEBugger.
@section DebugMessage-usage Basic usage @section GL-DebugMessage-usage Basic usage
See @ref DebugOutput for introduction. See @ref DebugOutput for introduction.
@ -453,7 +453,7 @@ If OpenGL 4.3 is not supported and neither @extension{KHR,debug} nor
@extension{EXT,debug_marker} nor @extension{GREMEDY,string_marker} are @extension{EXT,debug_marker} nor @extension{GREMEDY,string_marker} are
available, the function is essentially a no-op. available, the function is essentially a no-op.
@section DebugMessage-performance-notes Performance notes @section GL-DebugMessage-performance-notes Performance notes
If you ensure that you always use the @cpp const char @ce overload of If you ensure that you always use the @cpp const char @ce overload of
@ref insert() and the debug output is either not supported or turned off, the @ref insert() and the debug output is either not supported or turned off, the
@ -595,10 +595,10 @@ class MAGNUM_GL_EXPORT DebugMessage {
#endif #endif
}; };
/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Source} */ /** @debugoperatorclassenum{DebugMessage,DebugMessage::Source} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugMessage::Source value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugMessage::Source value);
/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Type} */ /** @debugoperatorclassenum{DebugMessage,DebugMessage::Type} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugMessage::Type value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugMessage::Type value);
/** /**
@ -607,7 +607,7 @@ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugMessage::Type value);
Allows marking portions of GL command stream with labels, useful for example Allows marking portions of GL command stream with labels, useful for example
with conjunction with various graphics debuggers, such as Apitrace or gDEBugger. with conjunction with various graphics debuggers, such as Apitrace or gDEBugger.
@section DebugGroup-usage Basic usage @section GL-DebugGroup-usage Basic usage
See @ref DebugOutput for introduction. See @ref DebugOutput for introduction.
@ -644,7 +644,7 @@ no-op.
similarly for @ref pop(). So if you want to have nested debug groups, you similarly for @ref pop(). So if you want to have nested debug groups, you
need to create one instance for each level. need to create one instance for each level.
@section DebugGroup-volume-control Interaction with debug output volume control @section GL-DebugGroup-volume-control Interaction with debug output volume control
Besides putting hierarchical messages in debug output, the group also affects Besides putting hierarchical messages in debug output, the group also affects
settings done by @ref DebugOutput::setEnabled(). Entering debug group inherits settings done by @ref DebugOutput::setEnabled(). Entering debug group inherits
@ -655,7 +655,7 @@ to state set in parent debug group. No state is preserved, thus calling
@ref push() after previous @ref pop() will not restore settings done when the @ref push() after previous @ref pop() will not restore settings done when the
group was active previously. group was active previously.
@section DebugGroup-performance-notes Performance notes @section GL-DebugGroup-performance-notes Performance notes
If you ensure that you always use the @cpp const char @ce overload of If you ensure that you always use the @cpp const char @ce overload of
@ref push() and the debug output is either not supported or turned off, the @ref push() and the debug output is either not supported or turned off, the
@ -802,10 +802,10 @@ class MAGNUM_GL_EXPORT DebugGroup {
bool _active; bool _active;
}; };
/** @debugoperatorclassenum{Magnum::DebugGroup,Magnum::DebugGroup::Source} */ /** @debugoperatorclassenum{DebugGroup,DebugGroup::Source} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugGroup::Source value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugGroup::Source value);
} }}
#else #else
#error this header is not available in WebGL build #error this header is not available in WebGL build
#endif #endif

8
src/Magnum/GL/DefaultFramebuffer.cpp

@ -35,7 +35,7 @@
#include "Magnum/Math/Color.h" #include "Magnum/Math/Color.h"
#endif #endif
namespace Magnum { namespace Magnum { namespace GL {
DefaultFramebuffer defaultFramebuffer; DefaultFramebuffer defaultFramebuffer;
@ -138,7 +138,7 @@ void DefaultFramebuffer::initializeContextBasedFunctionality(Context& context) {
Debug& operator<<(Debug& debug, const DefaultFramebuffer::Status value) { Debug& operator<<(Debug& debug, const DefaultFramebuffer::Status value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case DefaultFramebuffer::Status::value: return debug << "DefaultFramebuffer::Status::" #value; #define _c(value) case DefaultFramebuffer::Status::value: return debug << "GL::DefaultFramebuffer::Status::" #value;
_c(Complete) _c(Complete)
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
_c(Undefined) _c(Undefined)
@ -147,8 +147,8 @@ Debug& operator<<(Debug& debug, const DefaultFramebuffer::Status value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "DefaultFramebuffer::Status(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::DefaultFramebuffer::Status(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
} }}

14
src/Magnum/GL/DefaultFramebuffer.h

@ -26,12 +26,12 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::DefaultFramebuffer * @brief Class @ref Magnum::GL::DefaultFramebuffer
*/ */
#include "Magnum/GL/AbstractFramebuffer.h" #include "Magnum/GL/AbstractFramebuffer.h"
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Default framebuffer @brief Default framebuffer
@ -40,7 +40,7 @@ Default framebuffer, i.e. the actual screen surface. It is automatically
created when @ref Context is created and it is available through global created when @ref Context is created and it is available through global
variable @ref defaultFramebuffer. variable @ref defaultFramebuffer.
@section DefaultFramebuffer-usage Usage @section GL-DefaultFramebuffer-usage Usage
When you are using only the default framebuffer, the usage is simple. You When you are using only the default framebuffer, the usage is simple. You
must ensure that it is properly resized when window surface is resized. In case must ensure that it is properly resized when window surface is resized. In case
@ -62,9 +62,9 @@ example:
See documentation of particular functions and @ref Framebuffer documentation See documentation of particular functions and @ref Framebuffer documentation
for more involved usage, usage of non-default or multiple framebuffers. for more involved usage, usage of non-default or multiple framebuffers.
@section DefaultFramebuffer-performance-optimizations Performance optimizations @section GL-DefaultFramebuffer-performance-optimizations Performance optimizations
See also @ref AbstractFramebuffer-performance-optimization "relevant section in AbstractFramebuffer". See also @ref GL-AbstractFramebuffer-performance-optimization "relevant section in AbstractFramebuffer".
If either @extension{ARB,direct_state_access} (part of OpenGL 4.5) or If either @extension{ARB,direct_state_access} (part of OpenGL 4.5) or
@extension{EXT,direct_state_access} desktop extension is available, functions @extension{EXT,direct_state_access} desktop extension is available, functions
@ -506,9 +506,9 @@ class MAGNUM_GL_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
/** @brief Default framebuffer instance */ /** @brief Default framebuffer instance */
extern DefaultFramebuffer MAGNUM_GL_EXPORT defaultFramebuffer; extern DefaultFramebuffer MAGNUM_GL_EXPORT defaultFramebuffer;
/** @debugoperatorclassenum{Magnum::DefaultFramebuffer,Magnum::DefaultFramebuffer::Status} */ /** @debugoperatorclassenum{DefaultFramebuffer,DefaultFramebuffer::Status} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DefaultFramebuffer::Status value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DefaultFramebuffer::Status value);
} }}
#endif #endif

6
src/Magnum/GL/Extensions.h

@ -26,12 +26,12 @@
*/ */
/** @file /** @file
* @brief Namespace @ref Magnum::Extensions * @brief Namespace @ref Magnum::GL::Extensions
*/ */
#include "Magnum/GL/Version.h" #include "Magnum/GL/Version.h"
namespace Magnum { namespace Magnum { namespace GL {
/* Standard Android build system thinks that it's okay to define unmangled /* Standard Android build system thinks that it's okay to define unmangled
unprefixed macros. I think that whoever did that needs to be punished, unprefixed macros. I think that whoever did that needs to be punished,
@ -475,6 +475,6 @@ namespace ANDROID {
} }
} }}
#endif #endif

8
src/Magnum/GL/Framebuffer.cpp

@ -56,7 +56,7 @@
#include "Magnum/Math/Color.h" #include "Magnum/Math/Color.h"
#endif #endif
namespace Magnum { namespace Magnum { namespace GL {
const Framebuffer::DrawAttachment Framebuffer::DrawAttachment::None = Framebuffer::DrawAttachment(GL_NONE); const Framebuffer::DrawAttachment Framebuffer::DrawAttachment::None = Framebuffer::DrawAttachment(GL_NONE);
const Framebuffer::BufferAttachment Framebuffer::BufferAttachment::Depth = Framebuffer::BufferAttachment(GL_DEPTH_ATTACHMENT); const Framebuffer::BufferAttachment Framebuffer::BufferAttachment::Depth = Framebuffer::BufferAttachment(GL_DEPTH_ATTACHMENT);
@ -422,7 +422,7 @@ void Framebuffer::textureLayerImplementationDSAEXT(BufferAttachment attachment,
Debug& operator<<(Debug& debug, const Framebuffer::Status value) { Debug& operator<<(Debug& debug, const Framebuffer::Status value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Framebuffer::Status::value: return debug << "Framebuffer::Status::" #value; #define _c(value) case Framebuffer::Status::value: return debug << "GL::Framebuffer::Status::" #value;
_c(Complete) _c(Complete)
_c(IncompleteAttachment) _c(IncompleteAttachment)
_c(IncompleteMissingAttachment) _c(IncompleteMissingAttachment)
@ -441,8 +441,8 @@ Debug& operator<<(Debug& debug, const Framebuffer::Status value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Framebuffer::Status(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Framebuffer::Status(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
} }}

16
src/Magnum/GL/Framebuffer.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::Framebuffer * @brief Class @ref Magnum::GL::Framebuffer
*/ */
#include <Corrade/Containers/ArrayView.h> #include <Corrade/Containers/ArrayView.h>
@ -38,7 +38,7 @@
#undef Status #undef Status
#endif #endif
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Framebuffer @brief Framebuffer
@ -47,9 +47,9 @@ Unlike @ref DefaultFramebuffer, which is used for on-screen rendering, this
class is used for off-screen rendering, usable either in windowless class is used for off-screen rendering, usable either in windowless
applications, texture generation or for various post-processing effects. applications, texture generation or for various post-processing effects.
@section Framebuffer-usage Example usage @section GL-Framebuffer-usage Example usage
See @ref DefaultFramebuffer-usage "DefaultFramebuffer documentation" for See @ref GL-DefaultFramebuffer-usage "DefaultFramebuffer documentation" for
introduction. Imagine you have shader with multiple outputs (e.g. for deferred introduction. Imagine you have shader with multiple outputs (e.g. for deferred
rendering). You want to render them off-screen to textures and then use the rendering). You want to render them off-screen to textures and then use the
textures for actual on-screen rendering. First you need to create the textures for actual on-screen rendering. First you need to create the
@ -69,9 +69,9 @@ framebuffer, then bind the default and render the textures on screen:
@snippet MagnumGL-framebuffer.cpp Framebuffer-usage-draw @snippet MagnumGL-framebuffer.cpp Framebuffer-usage-draw
@section Framebuffer-performance-optimizations Performance optimizations @section GL-Framebuffer-performance-optimizations Performance optimizations
See also @ref AbstractFramebuffer-performance-optimization "relevant section in AbstractFramebuffer". See also @ref GL-AbstractFramebuffer-performance-optimization "relevant section in AbstractFramebuffer".
If either @extension{ARB,direct_state_access} (part of OpenGL 4.5) or If either @extension{ARB,direct_state_access} (part of OpenGL 4.5) or
@extension{EXT,direct_state_access} desktop extension is available, functions @extension{EXT,direct_state_access} desktop extension is available, functions
@ -939,7 +939,7 @@ class MAGNUM_GL_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractO
#endif #endif
}; };
/** @debugoperatorclassenum{Magnum::Framebuffer,Magnum::Framebuffer::Status} */ /** @debugoperatorclassenum{Framebuffer,Framebuffer::Status} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Framebuffer::Status value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Framebuffer::Status value);
inline Framebuffer::Framebuffer(Framebuffer&& other) noexcept { inline Framebuffer::Framebuffer(Framebuffer&& other) noexcept {
@ -964,6 +964,6 @@ inline GLuint Framebuffer::release() {
return id; return id;
} }
} }}
#endif #endif

29
src/Magnum/GL/GL.h

@ -35,7 +35,7 @@
typedef unsigned int GLenum; /* Needed for *Format and *Type enums */ typedef unsigned int GLenum; /* Needed for *Format and *Type enums */
#endif #endif
namespace Magnum { namespace Magnum { namespace GL {
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* FramebufferClear[Mask], FramebufferBlit[Mask], FramebufferBlitFilter, /* FramebufferClear[Mask], FramebufferBlit[Mask], FramebufferBlitFilter,
@ -90,26 +90,6 @@ enum class ImageFormat: GLenum;
enum class ImageAccess: GLenum; enum class ImageAccess: GLenum;
#endif #endif
template<UnsignedInt> class Image;
typedef Image<1> Image1D;
typedef Image<2> Image2D;
typedef Image<3> Image3D;
template<UnsignedInt> class CompressedImage;
typedef CompressedImage<1> CompressedImage1D;
typedef CompressedImage<2> CompressedImage2D;
typedef CompressedImage<3> CompressedImage3D;
template<UnsignedInt> class ImageView;
typedef ImageView<1> ImageView1D;
typedef ImageView<2> ImageView2D;
typedef ImageView<3> ImageView3D;
template<UnsignedInt> class CompressedImageView;
typedef CompressedImageView<1> CompressedImageView1D;
typedef CompressedImageView<2> CompressedImageView2D;
typedef CompressedImageView<3> CompressedImageView3D;
enum class MeshPrimitive: GLenum; enum class MeshPrimitive: GLenum;
class Mesh; class Mesh;
@ -126,11 +106,6 @@ enum class PixelFormat: GLenum;
enum class PixelType: GLenum; enum class PixelType: GLenum;
enum class CompressedPixelFormat: GLenum; enum class CompressedPixelFormat: GLenum;
class PixelStorage;
#ifndef MAGNUM_TARGET_GLES
class CompressedPixelStorage;
#endif
/* ObjectFlag, ObjectFlags are used only in conjunction with *::wrap() function */ /* ObjectFlag, ObjectFlags are used only in conjunction with *::wrap() function */
class PrimitiveQuery; class PrimitiveQuery;
@ -173,7 +148,7 @@ class TransformFeedback;
enum class Version: Int; enum class Version: Int;
#endif #endif
} }}
#endif #endif

6
src/Magnum/GL/ImageFormat.h

@ -27,14 +27,14 @@
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/** @file /** @file
* @brief Enum @ref Magnum::ImageAccess, @ref Magnum::ImageFormat * @brief Enum @ref Magnum::GL::ImageAccess, @ref Magnum::GL::ImageFormat
*/ */
#endif #endif
#include "Magnum/GL/OpenGL.h" #include "Magnum/GL/OpenGL.h"
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Image access @brief Image access
@ -309,7 +309,7 @@ enum class ImageFormat: GLenum {
#endif #endif
}; };
} }}
#else #else
#error this header is not available in OpenGL ES 2.0 and WebGL build #error this header is not available in OpenGL ES 2.0 and WebGL build
#endif #endif

4
src/Magnum/GL/Implementation/BufferState.cpp

@ -31,7 +31,7 @@
#include "Magnum/GL/Extensions.h" #include "Magnum/GL/Extensions.h"
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
const Buffer::TargetHint BufferState::targetForIndex[] = { const Buffer::TargetHint BufferState::targetForIndex[] = {
Buffer::TargetHint::Array, Buffer::TargetHint::Array,
@ -193,4 +193,4 @@ void BufferState::reset() {
std::fill_n(bindings, std::size_t{TargetCount}, State::DisengagedBinding); std::fill_n(bindings, std::size_t{TargetCount}, State::DisengagedBinding);
} }
}} }}}

4
src/Magnum/GL/Implementation/BufferState.h

@ -27,7 +27,7 @@
#include "Magnum/GL/Buffer.h" #include "Magnum/GL/Buffer.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
struct BufferState { struct BufferState {
enum: std::size_t { enum: std::size_t {
@ -88,6 +88,6 @@ struct BufferState {
#endif #endif
}; };
}} }}}
#endif #endif

4
src/Magnum/GL/Implementation/ContextState.cpp

@ -27,7 +27,7 @@
#include "Magnum/GL/Context.h" #include "Magnum/GL/Context.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
ContextState::ContextState(Context& context, std::vector<std::string>&) { ContextState::ContextState(Context& context, std::vector<std::string>&) {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -41,4 +41,4 @@ ContextState::ContextState(Context& context, std::vector<std::string>&) {
#endif #endif
} }
}} }}}

4
src/Magnum/GL/Implementation/ContextState.h

@ -37,7 +37,7 @@
#include "Magnum/GL/Context.h" #include "Magnum/GL/Context.h"
#endif #endif
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
struct ContextState { struct ContextState {
explicit ContextState(Context& context, std::vector<std::string>& extensions); explicit ContextState(Context& context, std::vector<std::string>& extensions);
@ -53,6 +53,6 @@ struct ContextState {
#endif #endif
}; };
}} }}}
#endif #endif

4
src/Magnum/GL/Implementation/DebugState.cpp

@ -29,7 +29,7 @@
#include "Magnum/GL/Context.h" #include "Magnum/GL/Context.h"
#include "Magnum/GL/Extensions.h" #include "Magnum/GL/Extensions.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
DebugState::DebugState(Context& context, std::vector<std::string>& extensions): DebugState::DebugState(Context& context, std::vector<std::string>& extensions):
maxLabelLength{0}, maxLabelLength{0},
@ -109,4 +109,4 @@ DebugState::DebugState(Context& context, std::vector<std::string>& extensions):
} }
} }
}} }}}

4
src/Magnum/GL/Implementation/DebugState.h

@ -35,7 +35,7 @@
#error this header is not available in WebGL build #error this header is not available in WebGL build
#endif #endif
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
struct DebugState { struct DebugState {
explicit DebugState(Context& context, std::vector<std::string>& extensions); explicit DebugState(Context& context, std::vector<std::string>& extensions);
@ -53,6 +53,6 @@ struct DebugState {
DebugOutput::Callback messageCallback; DebugOutput::Callback messageCallback;
}; };
}} }}}
#endif #endif

4
src/Magnum/GL/Implementation/FramebufferState.cpp

@ -31,7 +31,7 @@
#include "State.h" #include "State.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
constexpr const Range2Di FramebufferState::DisengagedViewport; constexpr const Range2Di FramebufferState::DisengagedViewport;
@ -355,4 +355,4 @@ void FramebufferState::reset() {
viewport = DisengagedViewport; viewport = DisengagedViewport;
} }
}} }}}

4
src/Magnum/GL/Implementation/FramebufferState.h

@ -37,7 +37,7 @@
#include "Magnum/GL/Renderbuffer.h" #include "Magnum/GL/Renderbuffer.h"
#endif #endif
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
struct FramebufferState { struct FramebufferState {
constexpr static const Range2Di DisengagedViewport{{}, {-1, -1}}; constexpr static const Range2Di DisengagedViewport{{}, {-1, -1}};
@ -118,6 +118,6 @@ struct FramebufferState {
Vector2i maxViewportSize; Vector2i maxViewportSize;
}; };
}} }}}
#endif #endif

4
src/Magnum/GL/Implementation/MeshState.cpp

@ -31,7 +31,7 @@
#include "State.h" #include "State.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
MeshState::MeshState(Context& context, ContextState& contextState, std::vector<std::string>& extensions): currentVAO(0) MeshState::MeshState(Context& context, ContextState& contextState, std::vector<std::string>& extensions): currentVAO(0)
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
@ -185,4 +185,4 @@ void MeshState::reset() {
currentVAO = State::DisengagedBinding; currentVAO = State::DisengagedBinding;
} }
}} }}}

4
src/Magnum/GL/Implementation/MeshState.h

@ -30,7 +30,7 @@
#include "Magnum/GL/Mesh.h" #include "Magnum/GL/Mesh.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
struct ContextState; struct ContextState;
@ -76,6 +76,6 @@ struct MeshState {
#endif #endif
}; };
}} }}}
#endif #endif

4
src/Magnum/GL/Implementation/QueryState.cpp

@ -29,7 +29,7 @@
#include "Magnum/GL/Context.h" #include "Magnum/GL/Context.h"
#include "Magnum/GL/Extensions.h" #include "Magnum/GL/Extensions.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
QueryState::QueryState(Context& context, std::vector<std::string>& extensions) { QueryState::QueryState(Context& context, std::vector<std::string>& extensions) {
/* Create implementation */ /* Create implementation */
@ -50,4 +50,4 @@ QueryState::QueryState(Context& context, std::vector<std::string>& extensions) {
#endif #endif
} }
}} }}}

4
src/Magnum/GL/Implementation/QueryState.h

@ -41,7 +41,7 @@
#error this header is not available in WebGL 1.0 build #error this header is not available in WebGL 1.0 build
#endif #endif
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
struct QueryState { struct QueryState {
explicit QueryState(Context& context, std::vector<std::string>& extensions); explicit QueryState(Context& context, std::vector<std::string>& extensions);
@ -51,6 +51,6 @@ struct QueryState {
void(AbstractQuery::*createImplementation)(); void(AbstractQuery::*createImplementation)();
}; };
}} }}}
#endif #endif

4
src/Magnum/GL/Implementation/RendererState.cpp

@ -28,7 +28,7 @@
#include "Magnum/GL/Context.h" #include "Magnum/GL/Context.h"
#include "Magnum/GL/Extensions.h" #include "Magnum/GL/Extensions.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
RendererState::RendererState(Context& context, std::vector<std::string>& extensions) RendererState::RendererState(Context& context, std::vector<std::string>& extensions)
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
@ -118,4 +118,4 @@ void RendererState::PixelStorage::reset() {
#endif #endif
} }
}} }}}

4
src/Magnum/GL/Implementation/RendererState.h

@ -31,7 +31,7 @@
#include "Magnum/GL/Renderer.h" #include "Magnum/GL/Renderer.h"
#include "Magnum/Math/Vector3.h" #include "Magnum/Math/Vector3.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
struct RendererState { struct RendererState {
explicit RendererState(Context& context, std::vector<std::string>& extensions); explicit RendererState(Context& context, std::vector<std::string>& extensions);
@ -71,6 +71,6 @@ struct RendererState {
PixelStorage packPixelStorage, unpackPixelStorage; PixelStorage packPixelStorage, unpackPixelStorage;
}; };
}} }}}
#endif #endif

4
src/Magnum/GL/Implementation/ShaderProgramState.cpp

@ -31,7 +31,7 @@
#include "State.h" #include "State.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
ShaderProgramState::ShaderProgramState(Context& context, std::vector<std::string>& extensions): current(0), maxVertexAttributes(0) ShaderProgramState::ShaderProgramState(Context& context, std::vector<std::string>& extensions): current(0), maxVertexAttributes(0)
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
@ -227,4 +227,4 @@ void ShaderProgramState::reset() {
current = State::DisengagedBinding; current = State::DisengagedBinding;
} }
}} }}}

4
src/Magnum/GL/Implementation/ShaderProgramState.h

@ -36,7 +36,7 @@
#include "Magnum/GL/AbstractShaderProgram.h" #include "Magnum/GL/AbstractShaderProgram.h"
#endif #endif
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
struct ShaderProgramState { struct ShaderProgramState {
explicit ShaderProgramState(Context& context, std::vector<std::string>& extensions); explicit ShaderProgramState(Context& context, std::vector<std::string>& extensions);
@ -119,6 +119,6 @@ struct ShaderProgramState {
#endif #endif
}; };
}} }}}
#endif #endif

4
src/Magnum/GL/Implementation/ShaderState.cpp

@ -31,7 +31,7 @@
#include "Magnum/GL/Context.h" #include "Magnum/GL/Context.h"
#endif #endif
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
ShaderState::ShaderState(Context& context, std::vector<std::string>&): ShaderState::ShaderState(Context& context, std::vector<std::string>&):
maxVertexOutputComponents{}, maxFragmentInputComponents{}, maxVertexOutputComponents{}, maxFragmentInputComponents{},
@ -61,4 +61,4 @@ ShaderState::ShaderState(Context& context, std::vector<std::string>&):
#endif #endif
} }
}} }}}

4
src/Magnum/GL/Implementation/ShaderState.h

@ -38,7 +38,7 @@
#include "Magnum/GL/Shader.h" #include "Magnum/GL/Shader.h"
#endif #endif
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
struct ShaderState { struct ShaderState {
explicit ShaderState(Context& context, std::vector<std::string>& extensions); explicit ShaderState(Context& context, std::vector<std::string>& extensions);
@ -86,6 +86,6 @@ struct ShaderState {
#endif #endif
}; };
}} }}}
#endif #endif

4
src/Magnum/GL/Implementation/State.cpp

@ -47,7 +47,7 @@
#include "Magnum/GL/Implementation/TransformFeedbackState.h" #include "Magnum/GL/Implementation/TransformFeedbackState.h"
#endif #endif
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
State::State(Context& context, std::ostream* const out) { State::State(Context& context, std::ostream* const out) {
/* List of extensions used in current context. Guesstimate count to avoid /* List of extensions used in current context. Guesstimate count to avoid
@ -87,4 +87,4 @@ State::State(Context& context, std::ostream* const out) {
State::~State() = default; State::~State() = default;
}} }}}

4
src/Magnum/GL/Implementation/State.h

@ -30,7 +30,7 @@
#include "Magnum/GL/GL.h" #include "Magnum/GL/GL.h"
#include "Magnum/GL/OpenGL.h" #include "Magnum/GL/OpenGL.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
struct BufferState; struct BufferState;
struct ContextState; struct ContextState;
@ -77,6 +77,6 @@ struct State {
#endif #endif
}; };
}} }}}
#endif #endif

4
src/Magnum/GL/Implementation/TextureState.cpp

@ -37,7 +37,7 @@
#include "State.h" #include "State.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
TextureState::TextureState(Context& context, std::vector<std::string>& extensions): maxSize{}, TextureState::TextureState(Context& context, std::vector<std::string>& extensions): maxSize{},
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
@ -493,4 +493,4 @@ void TextureState::reset() {
#endif #endif
} }
}} }}}

4
src/Magnum/GL/Implementation/TextureState.h

@ -45,7 +45,7 @@
#endif #endif
#endif #endif
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
struct TextureState { struct TextureState {
explicit TextureState(Context& context, std::vector<std::string>& extensions); explicit TextureState(Context& context, std::vector<std::string>& extensions);
@ -157,6 +157,6 @@ struct TextureState {
#endif #endif
}; };
}} }}}
#endif #endif

4
src/Magnum/GL/Implementation/TransformFeedbackState.cpp

@ -5,7 +5,7 @@
#include "Magnum/GL/TransformFeedback.h" #include "Magnum/GL/TransformFeedback.h"
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
TransformFeedbackState::TransformFeedbackState(Context& context, std::vector<std::string>& extensions): maxInterleavedComponents{0}, maxSeparateAttributes{0}, maxSeparateComponents{0} TransformFeedbackState::TransformFeedbackState(Context& context, std::vector<std::string>& extensions): maxInterleavedComponents{0}, maxSeparateAttributes{0}, maxSeparateComponents{0}
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -42,4 +42,4 @@ void TransformFeedbackState::reset() {
binding = State::DisengagedBinding; binding = State::DisengagedBinding;
} }
}} }}}

4
src/Magnum/GL/Implementation/TransformFeedbackState.h

@ -42,7 +42,7 @@
#error this header is not available in OpenGL ES 2.0 build #error this header is not available in OpenGL ES 2.0 build
#endif #endif
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
struct TransformFeedbackState { struct TransformFeedbackState {
explicit TransformFeedbackState(Context& context, std::vector<std::string>& extensions); explicit TransformFeedbackState(Context& context, std::vector<std::string>& extensions);
@ -66,6 +66,6 @@ struct TransformFeedbackState {
void(TransformFeedback::*attachBasesImplementation)(GLuint, std::initializer_list<Buffer*>); void(TransformFeedback::*attachBasesImplementation)(GLuint, std::initializer_list<Buffer*>);
}; };
}} }}}
#endif #endif

4
src/Magnum/GL/Implementation/driverSpecific.cpp

@ -29,7 +29,7 @@
#include "Magnum/GL/Extensions.h" #include "Magnum/GL/Extensions.h"
#include "Magnum/Math/Range.h" #include "Magnum/Math/Range.h"
namespace Magnum { namespace Magnum { namespace GL {
namespace { namespace {
/* Search the code for the following strings to see where they are implemented. */ /* Search the code for the following strings to see where they are implemented. */
@ -248,4 +248,4 @@ void Context::setupDriverWorkarounds() {
#undef _setRequiredVersion #undef _setRequiredVersion
} }
} }}

4
src/Magnum/GL/Implementation/maxTextureSize.cpp

@ -29,7 +29,7 @@
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
#include "Magnum/GL/Implementation/TextureState.h" #include "Magnum/GL/Implementation/TextureState.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
GLint maxTextureSideSize() { GLint maxTextureSideSize() {
GLint& value = Context::current().state().texture->maxSize; GLint& value = Context::current().state().texture->maxSize;
@ -75,4 +75,4 @@ GLint maxCubeMapTextureSideSize() {
return value; return value;
} }
}} }}}

4
src/Magnum/GL/Implementation/maxTextureSize.h

@ -27,7 +27,7 @@
#include "Magnum/GL/OpenGL.h" #include "Magnum/GL/OpenGL.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
GLint maxTextureSideSize(); GLint maxTextureSideSize();
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
@ -38,6 +38,6 @@ GLint maxTextureArrayLayers();
#endif #endif
GLint maxCubeMapTextureSideSize(); GLint maxCubeMapTextureSideSize();
}} }}}
#endif #endif

42
src/Magnum/GL/Mesh.cpp

@ -41,7 +41,7 @@
#include "Magnum/GL/Implementation/MeshState.h" #include "Magnum/GL/Implementation/MeshState.h"
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
namespace Magnum { namespace Magnum { namespace GL {
struct Mesh::AttributeLayout { struct Mesh::AttributeLayout {
explicit AttributeLayout(const Buffer& buffer, GLuint location, GLint size, GLenum type, DynamicAttribute::Kind kind, GLintptr offset, GLsizei stride, GLuint divisor) noexcept: buffer{Buffer::wrap(buffer.id())}, location{location}, size{size}, type{type}, kind{kind}, offset{offset}, stride{stride}, divisor{divisor} {} explicit AttributeLayout(const Buffer& buffer, GLuint location, GLint size, GLenum type, DynamicAttribute::Kind kind, GLintptr offset, GLsizei stride, GLuint divisor) noexcept: buffer{Buffer::wrap(buffer.id())}, location{location}, size{size}, type{type}, kind{kind}, offset{offset}, stride{stride}, divisor{divisor} {}
@ -238,7 +238,7 @@ Mesh& Mesh::addVertexBufferInstanced(Buffer& buffer, const UnsignedInt divisor,
Mesh& Mesh::setIndexBuffer(Buffer& buffer, GLintptr offset, IndexType type, UnsignedInt start, UnsignedInt end) { Mesh& Mesh::setIndexBuffer(Buffer& buffer, GLintptr offset, IndexType type, UnsignedInt start, UnsignedInt end) {
#ifdef MAGNUM_TARGET_WEBGL #ifdef MAGNUM_TARGET_WEBGL
CORRADE_ASSERT(buffer.targetHint() == Buffer::TargetHint::ElementArray, CORRADE_ASSERT(buffer.targetHint() == Buffer::TargetHint::ElementArray,
"Mesh::setIndexBuffer(): the buffer has unexpected target hint, expected" << Buffer::TargetHint::ElementArray << "but got" << buffer.targetHint(), *this); "GL::Mesh::setIndexBuffer(): the buffer has unexpected target hint, expected" << Buffer::TargetHint::ElementArray << "but got" << buffer.targetHint(), *this);
#endif #endif
_indexBuffer = &buffer; _indexBuffer = &buffer;
@ -298,7 +298,7 @@ void Mesh::drawInternal(Int count, Int baseVertex, Int instanceCount, GLintptr i
/* Indexed mesh */ /* Indexed mesh */
} else glDrawElementsBaseVertex(GLenum(_primitive), count, GLenum(_indexType), reinterpret_cast<GLvoid*>(indexOffset), baseVertex); } else glDrawElementsBaseVertex(GLenum(_primitive), count, GLenum(_indexType), reinterpret_cast<GLvoid*>(indexOffset), baseVertex);
#else #else
CORRADE_ASSERT(false, "Mesh::draw(): desktop OpenGL is required for base vertex specification in indexed meshes", ); CORRADE_ASSERT(false, "GL::Mesh::draw(): desktop OpenGL is required for base vertex specification in indexed meshes", );
#endif #endif
/* Indexed mesh */ /* Indexed mesh */
@ -355,7 +355,7 @@ void Mesh::drawInternal(Int count, Int baseVertex, Int instanceCount, GLintptr i
glDrawElementsInstancedBaseVertex(GLenum(_primitive), count, GLenum(_indexType), reinterpret_cast<GLvoid*>(indexOffset), instanceCount, baseVertex); glDrawElementsInstancedBaseVertex(GLenum(_primitive), count, GLenum(_indexType), reinterpret_cast<GLvoid*>(indexOffset), instanceCount, baseVertex);
} }
#else #else
CORRADE_ASSERT(false, "Mesh::draw(): OpenGL ES 3.2 or desktop GL is required for base vertex specification in indexed meshes", ); CORRADE_ASSERT(false, "GL::Mesh::draw(): OpenGL ES 3.2 or desktop GL is required for base vertex specification in indexed meshes", );
#endif #endif
/* Indexed mesh */ /* Indexed mesh */
@ -480,7 +480,7 @@ void Mesh::attributePointerInternal(AttributeLayout& attribute) {
void Mesh::attributePointerImplementationDefault(AttributeLayout& attribute) { void Mesh::attributePointerImplementationDefault(AttributeLayout& attribute) {
#ifdef MAGNUM_TARGET_WEBGL #ifdef MAGNUM_TARGET_WEBGL
CORRADE_ASSERT(attribute.buffer.targetHint() == Buffer::TargetHint::Array, CORRADE_ASSERT(attribute.buffer.targetHint() == Buffer::TargetHint::Array,
"Mesh::addVertexBuffer(): the buffer has unexpected target hint, expected" << Buffer::TargetHint::Array << "but got" << attribute.buffer.targetHint(), ); "GL::Mesh::addVertexBuffer(): the buffer has unexpected target hint, expected" << Buffer::TargetHint::Array << "but got" << attribute.buffer.targetHint(), );
#endif #endif
_attributes.push_back(attribute); _attributes.push_back(attribute);
@ -489,7 +489,7 @@ void Mesh::attributePointerImplementationDefault(AttributeLayout& attribute) {
void Mesh::attributePointerImplementationVAO(AttributeLayout& attribute) { void Mesh::attributePointerImplementationVAO(AttributeLayout& attribute) {
#ifdef MAGNUM_TARGET_WEBGL #ifdef MAGNUM_TARGET_WEBGL
CORRADE_ASSERT(attribute.buffer.targetHint() == Buffer::TargetHint::Array, CORRADE_ASSERT(attribute.buffer.targetHint() == Buffer::TargetHint::Array,
"Mesh::addVertexBuffer(): the buffer has unexpected target hint, expected" << Buffer::TargetHint::Array << "but got" << attribute.buffer.targetHint(), ); "GL::Mesh::addVertexBuffer(): the buffer has unexpected target hint, expected" << Buffer::TargetHint::Array << "but got" << attribute.buffer.targetHint(), );
#endif #endif
bindVAO(); bindVAO();
@ -633,7 +633,7 @@ void Mesh::drawElementsInstancedImplementationNV(const GLsizei count, const GLin
Debug& operator<<(Debug& debug, MeshPrimitive value) { Debug& operator<<(Debug& debug, MeshPrimitive value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case MeshPrimitive::value: return debug << "MeshPrimitive::" #value; #define _c(value) case MeshPrimitive::value: return debug << "GL::MeshPrimitive::" #value;
_c(Points) _c(Points)
_c(LineStrip) _c(LineStrip)
_c(LineLoop) _c(LineLoop)
@ -654,13 +654,13 @@ Debug& operator<<(Debug& debug, MeshPrimitive value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "MeshPrimitive(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::MeshPrimitive(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, Mesh::IndexType value) { Debug& operator<<(Debug& debug, Mesh::IndexType value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Mesh::IndexType::value: return debug << "Mesh::IndexType::" #value; #define _c(value) case Mesh::IndexType::value: return debug << "GL::Mesh::IndexType::" #value;
_c(UnsignedByte) _c(UnsignedByte)
_c(UnsignedShort) _c(UnsignedShort)
_c(UnsignedInt) _c(UnsignedInt)
@ -668,17 +668,17 @@ Debug& operator<<(Debug& debug, Mesh::IndexType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Mesh::IndexType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Mesh::IndexType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
} }}
namespace Corrade { namespace Utility { namespace Corrade { namespace Utility {
std::string ConfigurationValue<Magnum::MeshPrimitive>::toString(Magnum::MeshPrimitive value, ConfigurationValueFlags) { std::string ConfigurationValue<Magnum::GL::MeshPrimitive>::toString(Magnum::GL::MeshPrimitive value, ConfigurationValueFlags) {
switch(value) { switch(value) {
#define _c(value) case Magnum::MeshPrimitive::value: return #value; #define _c(value) case Magnum::GL::MeshPrimitive::value: return #value;
_c(Points) _c(Points)
_c(LineStrip) _c(LineStrip)
_c(LineLoop) _c(LineLoop)
@ -701,8 +701,8 @@ std::string ConfigurationValue<Magnum::MeshPrimitive>::toString(Magnum::MeshPrim
return {}; return {};
} }
Magnum::MeshPrimitive ConfigurationValue<Magnum::MeshPrimitive>::fromString(const std::string& stringValue, ConfigurationValueFlags) { Magnum::GL::MeshPrimitive ConfigurationValue<Magnum::GL::MeshPrimitive>::fromString(const std::string& stringValue, ConfigurationValueFlags) {
#define _c(value) if(stringValue == #value) return Magnum::MeshPrimitive::value; #define _c(value) if(stringValue == #value) return Magnum::GL::MeshPrimitive::value;
_c(LineStrip) _c(LineStrip)
_c(LineLoop) _c(LineLoop)
_c(Lines) _c(Lines)
@ -720,12 +720,12 @@ Magnum::MeshPrimitive ConfigurationValue<Magnum::MeshPrimitive>::fromString(cons
#endif #endif
#undef _c #undef _c
return Magnum::MeshPrimitive::Points; return Magnum::GL::MeshPrimitive::Points;
} }
std::string ConfigurationValue<Magnum::Mesh::IndexType>::toString(Magnum::Mesh::IndexType value, ConfigurationValueFlags) { std::string ConfigurationValue<Magnum::GL::Mesh::IndexType>::toString(Magnum::GL::Mesh::IndexType value, ConfigurationValueFlags) {
switch(value) { switch(value) {
#define _c(value) case Magnum::Mesh::IndexType::value: return #value; #define _c(value) case Magnum::GL::Mesh::IndexType::value: return #value;
_c(UnsignedByte) _c(UnsignedByte)
_c(UnsignedShort) _c(UnsignedShort)
_c(UnsignedInt) _c(UnsignedInt)
@ -735,14 +735,14 @@ std::string ConfigurationValue<Magnum::Mesh::IndexType>::toString(Magnum::Mesh::
return {}; return {};
} }
Magnum::Mesh::IndexType ConfigurationValue<Magnum::Mesh::IndexType>::fromString(const std::string& stringValue, ConfigurationValueFlags) { Magnum::GL::Mesh::IndexType ConfigurationValue<Magnum::GL::Mesh::IndexType>::fromString(const std::string& stringValue, ConfigurationValueFlags) {
#define _c(value) if(stringValue == #value) return Magnum::Mesh::IndexType::value; #define _c(value) if(stringValue == #value) return Magnum::GL::Mesh::IndexType::value;
_c(UnsignedByte) _c(UnsignedByte)
_c(UnsignedShort) _c(UnsignedShort)
_c(UnsignedInt) _c(UnsignedInt)
#undef _c #undef _c
return Magnum::Mesh::IndexType::UnsignedInt; return Magnum::GL::Mesh::IndexType::UnsignedInt;
} }
}} }}

50
src/Magnum/GL/Mesh.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::Mesh * @brief Class @ref Magnum::GL::Mesh
*/ */
#include <vector> #include <vector>
@ -38,7 +38,7 @@
#include "Magnum/GL/Attribute.h" #include "Magnum/GL/Attribute.h"
#include "Magnum/GL/GL.h" #include "Magnum/GL/GL.h"
namespace Magnum { namespace Magnum { namespace GL {
/** /**
* @brief Mesh primitive type * @brief Mesh primitive type
@ -140,7 +140,7 @@ namespace Implementation { struct MeshState; }
/** /**
@brief Mesh @brief Mesh
@section Mesh-configuration Mesh configuration @section GL-Mesh-configuration Mesh configuration
You have to specify at least primitive and vertex/index count using You have to specify at least primitive and vertex/index count using
@ref setPrimitive() and @ref setCount(). Then fill your vertex buffers with @ref setPrimitive() and @ref setCount(). Then fill your vertex buffers with
@ -202,19 +202,19 @@ this:
@snippet MagnumGL.cpp Mesh-dynamic @snippet MagnumGL.cpp Mesh-dynamic
@section Mesh-rendering Rendering meshes @section GL-Mesh-rendering Rendering meshes
Basic workflow is: bind specific framebuffer for drawing (if needed), set up Basic workflow is: bind specific framebuffer for drawing (if needed), set up
respective shader (see respective shader (see
@ref AbstractShaderProgram-rendering-workflow "AbstractShaderProgram documentation" @ref GL-AbstractShaderProgram-rendering-workflow "AbstractShaderProgram documentation"
for more infromation) and call @ref Mesh::draw(). for more infromation) and call @ref Mesh::draw().
@section Mesh-webgl-restrictions WebGL restrictions @section GL-Mesh-webgl-restrictions WebGL restrictions
@ref MAGNUM_TARGET_WEBGL "WebGL" puts some restrictions on vertex buffer @ref MAGNUM_TARGET_WEBGL "WebGL" puts some restrictions on vertex buffer
layout, see @ref addVertexBuffer() documentation for details. layout, see @ref addVertexBuffer() documentation for details.
@section Mesh-performance-optimization Performance optimizations @section GL-Mesh-performance-optimization Performance optimizations
If @extension{ARB,vertex_array_object} (part of OpenGL 3.0), OpenGL ES 3.0, If @extension{ARB,vertex_array_object} (part of OpenGL 3.0), OpenGL ES 3.0,
WebGL 2.0, @extension{OES,vertex_array_object} in OpenGL ES 2.0 or WebGL 2.0, @extension{OES,vertex_array_object} in OpenGL ES 2.0 or
@ -586,14 +586,14 @@ class MAGNUM_GL_EXPORT Mesh: public AbstractObject {
* (specified in implementation of given shader) and offsets between * (specified in implementation of given shader) and offsets between
* interleaved attributes. * interleaved attributes.
* *
* See @ref Mesh-configuration "class documentation" for simple usage * See @ref GL-Mesh-configuration "class documentation" for simple
* example. For more involved example imagine that you have buffer * usage example. For more involved example imagine that you have a
* with 76 bytes of some other data at the beginning (possibly material * buffer with 76 bytes of some other data at the beginning (possibly
* configuration) and then the interleaved vertex array. Each vertex * material configuration) and then the interleaved vertex array. Each
* consists of weight, position, texture coordinate and normal. You * vertex consists of a weight, position, texture coordinate and
* want to draw it with @ref Shaders::Phong, but it accepts only * a normal. You want to draw it with @ref Shaders::Phong, but it
* position and normal, so you have to skip weight and texture * accepts only a position and a normal, so you have to skip the weight
* coordinate in each vertex: * and the texture coordinate in each vertex:
* *
* @snippet MagnumGL.cpp Mesh-addVertexBuffer1 * @snippet MagnumGL.cpp Mesh-addVertexBuffer1
* *
@ -750,7 +750,7 @@ class MAGNUM_GL_EXPORT Mesh: public AbstractObject {
* Expects that the shader is compatible with this mesh and is fully * Expects that the shader is compatible with this mesh and is fully
* set up. If vertex/index count or instance count is `0`, no draw * set up. If vertex/index count or instance count is `0`, no draw
* commands are issued. See also * commands are issued. See also
* @ref AbstractShaderProgram-rendering-workflow "AbstractShaderProgram documentation" * @ref GL-AbstractShaderProgram-rendering-workflow "AbstractShaderProgram documentation"
* for more information. If @extension{ARB,vertex_array_object} (part * for more information. If @extension{ARB,vertex_array_object} (part
* of OpenGL 3.0), OpenGL ES 3.0, WebGL 2.0, @extension{OES,vertex_array_object} * of OpenGL 3.0), OpenGL ES 3.0, WebGL 2.0, @extension{OES,vertex_array_object}
* in OpenGL ES 2.0 or @webgl_extension{OES,vertex_array_object} in * in OpenGL ES 2.0 or @webgl_extension{OES,vertex_array_object} in
@ -985,10 +985,10 @@ class MAGNUM_GL_EXPORT Mesh: public AbstractObject {
std::vector<AttributeLayout> _attributes; std::vector<AttributeLayout> _attributes;
}; };
/** @debugoperatorenum{Magnum::MeshPrimitive} */ /** @debugoperatorenum{MeshPrimitive} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, MeshPrimitive value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, MeshPrimitive value);
/** @debugoperatorclassenum{Magnum::Mesh,Magnum::Mesh::IndexType} */ /** @debugoperatorclassenum{Mesh,Mesh::IndexType} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Mesh::IndexType value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Mesh::IndexType value);
inline GLuint Mesh::release() { inline GLuint Mesh::release() {
@ -997,12 +997,12 @@ inline GLuint Mesh::release() {
return id; return id;
} }
} }}
namespace Corrade { namespace Utility { namespace Corrade { namespace Utility {
/** @configurationvalue{Magnum::MeshPrimitive} */ /** @configurationvalue{Magnum::MeshPrimitive} */
template<> struct MAGNUM_GL_EXPORT ConfigurationValue<Magnum::MeshPrimitive> { template<> struct MAGNUM_GL_EXPORT ConfigurationValue<Magnum::GL::MeshPrimitive> {
ConfigurationValue() = delete; ConfigurationValue() = delete;
/** /**
@ -1010,18 +1010,18 @@ template<> struct MAGNUM_GL_EXPORT ConfigurationValue<Magnum::MeshPrimitive> {
* *
* If the value is invalid, returns empty string. * If the value is invalid, returns empty string.
*/ */
static std::string toString(Magnum::MeshPrimitive value, ConfigurationValueFlags); static std::string toString(Magnum::GL::MeshPrimitive value, ConfigurationValueFlags);
/** /**
* @brief Reads enum value as string * @brief Reads enum value as string
* *
* If the value is invalid, returns @ref Magnum::MeshPrimitive::Points "MeshPrimitive::Points". * If the value is invalid, returns @ref Magnum::MeshPrimitive::Points "MeshPrimitive::Points".
*/ */
static Magnum::MeshPrimitive fromString(const std::string& stringValue, ConfigurationValueFlags); static Magnum::GL::MeshPrimitive fromString(const std::string& stringValue, ConfigurationValueFlags);
}; };
/** @configurationvalue{Magnum::Mesh::IndexType} */ /** @configurationvalue{Magnum::Mesh::IndexType} */
template<> struct MAGNUM_GL_EXPORT ConfigurationValue<Magnum::Mesh::IndexType> { template<> struct MAGNUM_GL_EXPORT ConfigurationValue<Magnum::GL::Mesh::IndexType> {
ConfigurationValue() = delete; ConfigurationValue() = delete;
/** /**
@ -1029,14 +1029,14 @@ template<> struct MAGNUM_GL_EXPORT ConfigurationValue<Magnum::Mesh::IndexType> {
* *
* If the value is invalid, returns empty string. * If the value is invalid, returns empty string.
*/ */
static std::string toString(Magnum::Mesh::IndexType value, ConfigurationValueFlags); static std::string toString(Magnum::GL::Mesh::IndexType value, ConfigurationValueFlags);
/** /**
* @brief Read enum value as string * @brief Read enum value as string
* *
* If the value is invalid, returns @ref Magnum::Mesh::IndexType::UnsignedInt "Mesh::IndexType::UnsignedInt". * If the value is invalid, returns @ref Magnum::Mesh::IndexType::UnsignedInt "Mesh::IndexType::UnsignedInt".
*/ */
static Magnum::Mesh::IndexType fromString(const std::string& stringValue, ConfigurationValueFlags); static Magnum::GL::Mesh::IndexType fromString(const std::string& stringValue, ConfigurationValueFlags);
}; };
}} }}

12
src/Magnum/GL/MeshView.cpp

@ -34,7 +34,7 @@
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
#include "Magnum/GL/Implementation/MeshState.h" #include "Magnum/GL/Implementation/MeshState.h"
namespace Magnum { namespace Magnum { namespace GL {
void MeshView::draw(AbstractShaderProgram& shader, std::initializer_list<std::reference_wrapper<MeshView>> meshes) { void MeshView::draw(AbstractShaderProgram& shader, std::initializer_list<std::reference_wrapper<MeshView>> meshes) {
/* Why std::initializer_list doesn't have empty()? */ /* Why std::initializer_list doesn't have empty()? */
@ -45,7 +45,7 @@ void MeshView::draw(AbstractShaderProgram& shader, std::initializer_list<std::re
#ifndef CORRADE_NO_ASSERT #ifndef CORRADE_NO_ASSERT
const Mesh* original = &meshes.begin()->get()._original.get(); const Mesh* original = &meshes.begin()->get()._original.get();
for(MeshView& mesh: meshes) for(MeshView& mesh: meshes)
CORRADE_ASSERT(&mesh._original.get() == original, "MeshView::draw(): all meshes must be views of the same original mesh", ); CORRADE_ASSERT(&mesh._original.get() == original, "GL::MeshView::draw(): all meshes must be views of the same original mesh", );
#endif #endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -72,7 +72,7 @@ void MeshView::multiDrawImplementationDefault(std::initializer_list<std::referen
#endif #endif
std::size_t i = 0; std::size_t i = 0;
for(MeshView& mesh: meshes) { for(MeshView& mesh: meshes) {
CORRADE_ASSERT(mesh._instanceCount == 1, "MeshView::draw(): cannot draw multiple instanced meshes", ); CORRADE_ASSERT(mesh._instanceCount == 1, "GL::MeshView::draw(): cannot draw multiple instanced meshes", );
count[i] = mesh._count; count[i] = mesh._count;
indices[i] = reinterpret_cast<GLvoid*>(mesh._indexOffset); indices[i] = reinterpret_cast<GLvoid*>(mesh._indexOffset);
@ -82,7 +82,7 @@ void MeshView::multiDrawImplementationDefault(std::initializer_list<std::referen
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
hasBaseVertex = true; hasBaseVertex = true;
#else #else
CORRADE_ASSERT(!original._indexBuffer, "MeshView::draw(): desktop OpenGL is required for base vertex specification in indexed meshes", ); CORRADE_ASSERT(!original._indexBuffer, "GL::MeshView::draw(): desktop OpenGL is required for base vertex specification in indexed meshes", );
#endif #endif
} }
@ -128,7 +128,7 @@ void MeshView::multiDrawImplementationFallback(std::initializer_list<std::refere
/* Nothing to draw in this mesh */ /* Nothing to draw in this mesh */
if(!mesh._count) continue; if(!mesh._count) continue;
CORRADE_ASSERT(mesh._instanceCount == 1, "MeshView::draw(): cannot draw multiple instanced meshes", ); CORRADE_ASSERT(mesh._instanceCount == 1, "GL::MeshView::draw(): cannot draw multiple instanced meshes", );
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
mesh._original.get().drawInternal(mesh._count, mesh._baseVertex, 1, mesh._indexOffset, mesh._indexStart, mesh._indexEnd); mesh._original.get().drawInternal(mesh._count, mesh._baseVertex, 1, mesh._indexOffset, mesh._indexStart, mesh._indexEnd);
@ -170,4 +170,4 @@ void MeshView::draw(AbstractShaderProgram& shader, TransformFeedback& xfb, Unsig
} }
#endif #endif
} }}

6
src/Magnum/GL/MeshView.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::MeshView * @brief Class @ref Magnum::GL::MeshView
*/ */
#include <functional> #include <functional>
@ -36,7 +36,7 @@
#include "Magnum/GL/OpenGL.h" #include "Magnum/GL/OpenGL.h"
#include "Magnum/GL/visibility.h" #include "Magnum/GL/visibility.h"
namespace Magnum { namespace Magnum { namespace GL {
namespace Implementation { struct MeshState; } namespace Implementation { struct MeshState; }
@ -306,6 +306,6 @@ inline MeshView& MeshView::setIndexRange(Int first, UnsignedInt start, UnsignedI
return *this; return *this;
} }
} }}
#endif #endif

4
src/Magnum/GL/MultisampleTexture.cpp

@ -31,7 +31,7 @@
#include "Magnum/GL/Implementation/maxTextureSize.h" #include "Magnum/GL/Implementation/maxTextureSize.h"
namespace Magnum { namespace Implementation { namespace Magnum { namespace GL { namespace Implementation {
template<> Vector2i MAGNUM_GL_EXPORT maxMultisampleTextureSize<2>() { template<> Vector2i MAGNUM_GL_EXPORT maxMultisampleTextureSize<2>() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -56,5 +56,5 @@ template<> Vector3i MAGNUM_GL_EXPORT maxMultisampleTextureSize<3>() {
return {Vector2i{Implementation::maxTextureSideSize()}, Implementation::max3DTextureDepth()}; return {Vector2i{Implementation::maxTextureSideSize()}, Implementation::max3DTextureDepth()};
} }
}} }}}
#endif #endif

8
src/Magnum/GL/MultisampleTexture.h

@ -27,7 +27,7 @@
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/** @file /** @file
* @brief Class @ref Magnum::MultisampleTexture, typedef @ref Magnum::MultisampleTexture2D, @ref Magnum::MultisampleTexture2DArray * @brief Class @ref Magnum::GL::MultisampleTexture, typedef @ref Magnum::GL::MultisampleTexture2D, @ref Magnum::GL::MultisampleTexture2DArray
*/ */
#endif #endif
@ -36,7 +36,7 @@
#include "Magnum/Math/Vector3.h" #include "Magnum/Math/Vector3.h"
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
namespace Magnum { namespace Magnum { namespace GL {
namespace Implementation { namespace Implementation {
template<UnsignedInt> constexpr GLenum multisampleTextureTarget(); template<UnsignedInt> constexpr GLenum multisampleTextureTarget();
@ -72,7 +72,7 @@ Template class for 2D mulitsample texture and 2D multisample texture array.
Used only from shaders for manual multisample resolve and other operations. See Used only from shaders for manual multisample resolve and other operations. See
also @ref AbstractTexture documentation for more information. also @ref AbstractTexture documentation for more information.
@section MultisampleTexture-usage Usage @section GL-MultisampleTexture-usage Usage
As multisample textures have no sampler state, the only thing you need is to As multisample textures have no sampler state, the only thing you need is to
set storage: set storage:
@ -338,7 +338,7 @@ typedef MultisampleTexture<2> MultisampleTexture2D;
*/ */
typedef MultisampleTexture<3> MultisampleTexture2DArray; typedef MultisampleTexture<3> MultisampleTexture2DArray;
} }}
#else #else
#error this header is not available in OpenGL ES 2.0 and WebGL build #error this header is not available in OpenGL ES 2.0 and WebGL build
#endif #endif

4
src/Magnum/GL/OpenGL.cpp

@ -28,7 +28,7 @@
#include "Magnum/Types.h" #include "Magnum/Types.h"
#include "Magnum/GL/OpenGL.h" #include "Magnum/GL/OpenGL.h"
namespace Magnum { namespace Magnum { namespace GL {
/* Verify types */ /* Verify types */
static_assert(std::is_same<GLubyte, UnsignedByte>::value, "GLubyte is not the same as UnsignedByte"); static_assert(std::is_same<GLubyte, UnsignedByte>::value, "GLubyte is not the same as UnsignedByte");
@ -47,4 +47,4 @@ static_assert(std::is_same<GLdouble, Double>::value, "GLdouble is not the same a
static_assert(GL_FALSE == false, "GL_FALSE is not the same as false"); static_assert(GL_FALSE == false, "GL_FALSE is not the same as false");
static_assert(GL_TRUE == true, "GL_TRUE is not the same as true"); static_assert(GL_TRUE == true, "GL_TRUE is not the same as true");
} }}

4
src/Magnum/GL/OpenGLTester.cpp

@ -31,7 +31,7 @@
#include "Magnum/GL/DebugOutput.h" #include "Magnum/GL/DebugOutput.h"
#endif #endif
namespace Magnum { namespace Magnum { namespace GL {
OpenGLTester::OpenGLTester(): TestSuite::Tester{TestSuite::Tester::TesterConfiguration{}.setSkippedArgumentPrefixes({"magnum"})}, _windowlessApplication{{arguments().first, arguments().second}} { OpenGLTester::OpenGLTester(): TestSuite::Tester{TestSuite::Tester::TesterConfiguration{}.setSkippedArgumentPrefixes({"magnum"})}, _windowlessApplication{{arguments().first, arguments().second}} {
/* Try to create debug context, fallback to normal one if not possible. No /* Try to create debug context, fallback to normal one if not possible. No
@ -73,4 +73,4 @@ std::uint64_t OpenGLTester::gpuTimeBenchmarkEnd() {
} }
#endif #endif
} }}

16
src/Magnum/GL/OpenGLTester.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::OpenGLTester * @brief Class @ref Magnum::GL::OpenGLTester
*/ */
#include <Corrade/TestSuite/Tester.h> #include <Corrade/TestSuite/Tester.h>
@ -59,7 +59,7 @@
#include "Magnum/GL/TimeQuery.h" #include "Magnum/GL/TimeQuery.h"
#endif #endif
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Base class for OpenGL tests and benchmarks @brief Base class for OpenGL tests and benchmarks
@ -86,7 +86,7 @@ corrade_add_test(YourTest YourTest.cpp LIBRARIES Magnum::OpenGLTester)
See @ref building, @ref cmake and @ref testsuite for more information. See @ref building, @ref cmake and @ref testsuite for more information.
@section OpenGLTester-running Running the test executables @section GL-OpenGLTester-running Running the test executables
Implicitly, running the test executables requires presence of a GPU with OpenGL Implicitly, running the test executables requires presence of a GPU with OpenGL
drivers. In addition, on desktop, unless Magnum is built with drivers. In addition, on desktop, unless Magnum is built with
@ -105,7 +105,7 @@ on such drivers.
See @ref TestSuite-Tester-running for more information about running the tests See @ref TestSuite-Tester-running for more information about running the tests
on particular platforms. on particular platforms.
@section OpenGLTester-context OpenGL context creation @section GL-OpenGLTester-context OpenGL context creation
Upon construction the class creates an OpenGL context, meaning you don't have Upon construction the class creates an OpenGL context, meaning you don't have
to worry about OpenGL context being available during the tests. If the context to worry about OpenGL context being available during the tests. If the context
@ -116,7 +116,7 @@ misuses will propagate to following test cases. See
@ref TestSuite-Tester-command-line "command-line option overview" for a way @ref TestSuite-Tester-command-line "command-line option overview" for a way
to run single isolated test cases. to run single isolated test cases.
@section OpenGLTester-debug Debug context and error checking @section GL-OpenGLTester-debug Debug context and error checking
On platforms that support it, the OpenGL context is created with synchronous On platforms that support it, the OpenGL context is created with synchronous
debug output, meaning that every OpenGL error is directly reported to standard debug output, meaning that every OpenGL error is directly reported to standard
@ -125,7 +125,7 @@ upon encountering a GL error --- this should be done explicitly with
@ref MAGNUM_VERIFY_NO_ERROR() instead, as the debug output is not available on @ref MAGNUM_VERIFY_NO_ERROR() instead, as the debug output is not available on
all platforms and not all GL errors are fatal. all platforms and not all GL errors are fatal.
@section OpenGLTester-benchmarks GPU time benchmarks @section GL-OpenGLTester-benchmarks GPU time benchmarks
This class adds @ref BenchmarkType::GpuTime to the benchmark type enum, This class adds @ref BenchmarkType::GpuTime to the benchmark type enum,
allowing you to measure time spent on GPU as opposed to CPU or wall clock time. allowing you to measure time spent on GPU as opposed to CPU or wall clock time.
@ -266,7 +266,7 @@ class OpenGLTester: public TestSuite::Tester {
}; };
/** @hideinitializer /** @hideinitializer
@relatesalso Magnum::OpenGLTester @relatesalso Magnum::GL::OpenGLTester
@brief Verify that no OpenGL error occurred @brief Verify that no OpenGL error occurred
Equivalent to Equivalent to
@ -275,6 +275,6 @@ Equivalent to
*/ */
#define MAGNUM_VERIFY_NO_ERROR() CORRADE_COMPARE(Magnum::Renderer::error(), Magnum::Renderer::Error::NoError) #define MAGNUM_VERIFY_NO_ERROR() CORRADE_COMPARE(Magnum::Renderer::error(), Magnum::Renderer::Error::NoError)
} }}
#endif #endif

16
src/Magnum/GL/PixelFormat.cpp

@ -27,13 +27,13 @@
#include <Corrade/Utility/Debug.h> #include <Corrade/Utility/Debug.h>
namespace Magnum { namespace Magnum { namespace GL {
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug& operator<<(Debug& debug, const PixelFormat value) { Debug& operator<<(Debug& debug, const PixelFormat value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case PixelFormat::value: return debug << "PixelFormat::" #value; #define _c(value) case PixelFormat::value: return debug << "GL::PixelFormat::" #value;
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
_c(Red) _c(Red)
#endif #endif
@ -85,13 +85,13 @@ Debug& operator<<(Debug& debug, const PixelFormat value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "PixelFormat(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::PixelFormat(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const PixelType value) { Debug& operator<<(Debug& debug, const PixelType value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case PixelType::value: return debug << "PixelType::" #value; #define _c(value) case PixelType::value: return debug << "GL::PixelType::" #value;
_c(UnsignedByte) _c(UnsignedByte)
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_c(Byte) _c(Byte)
@ -142,13 +142,13 @@ Debug& operator<<(Debug& debug, const PixelType value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "PixelType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::PixelType(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const CompressedPixelFormat value) { Debug& operator<<(Debug& debug, const CompressedPixelFormat value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case CompressedPixelFormat::value: return debug << "CompressedPixelFormat::" #value; #define _c(value) case CompressedPixelFormat::value: return debug << "GL::CompressedPixelFormat::" #value;
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
_c(Red) _c(Red)
_c(RG) _c(RG)
@ -213,8 +213,8 @@ Debug& operator<<(Debug& debug, const CompressedPixelFormat value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "CompressedPixelFormat(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::CompressedPixelFormat(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
} }}

12
src/Magnum/GL/PixelFormat.h

@ -26,14 +26,14 @@
*/ */
/** @file /** @file
* @brief Enum @ref Magnum::PixelFormat, @ref Magnum::PixelType, @ref Magnum::CompressedPixelFormat * @brief Enum @ref Magnum::GL::PixelFormat, @ref Magnum::GL::PixelType, @ref Magnum::GL::CompressedPixelFormat
*/ */
#include "Magnum/Magnum.h" #include "Magnum/Magnum.h"
#include "Magnum/GL/OpenGL.h" #include "Magnum/GL/OpenGL.h"
#include "Magnum/GL/visibility.h" #include "Magnum/GL/visibility.h"
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Format of pixel data @brief Format of pixel data
@ -1234,15 +1234,15 @@ enum class CompressedPixelFormat: GLenum {
#endif #endif
}; };
/** @debugoperatorenum{Magnum::PixelFormat} */ /** @debugoperatorenum{PixelFormat} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, PixelFormat value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, PixelFormat value);
/** @debugoperatorenum{Magnum::PixelType} */ /** @debugoperatorenum{PixelType} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, PixelType value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, PixelType value);
/** @debugoperatorenum{Magnum::CompressedPixelFormat} */ /** @debugoperatorenum{CompressedPixelFormat} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, CompressedPixelFormat value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, CompressedPixelFormat value);
} }}
#endif #endif

4
src/Magnum/GL/PrimitiveQuery.cpp

@ -25,7 +25,7 @@
#include "PrimitiveQuery.h" #include "PrimitiveQuery.h"
namespace Magnum { namespace Magnum { namespace GL {
void PrimitiveQuery::begin() { void PrimitiveQuery::begin() {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -49,4 +49,4 @@ void PrimitiveQuery::end() {
#endif #endif
} }
} }}

6
src/Magnum/GL/PrimitiveQuery.h

@ -27,14 +27,14 @@
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
/** @file /** @file
* @brief Class @ref Magnum::PrimitiveQuery * @brief Class @ref Magnum::GL::PrimitiveQuery
*/ */
#endif #endif
#include "Magnum/GL/AbstractQuery.h" #include "Magnum/GL/AbstractQuery.h"
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Query for primitives @brief Query for primitives
@ -206,7 +206,7 @@ class MAGNUM_GL_EXPORT PrimitiveQuery: public AbstractQuery {
#endif #endif
}; };
} }}
#else #else
#error this header is not available in OpenGL ES 2.0 build #error this header is not available in OpenGL ES 2.0 build
#endif #endif

4
src/Magnum/GL/RectangleTexture.cpp

@ -34,7 +34,7 @@
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
#include "Magnum/GL/Implementation/TextureState.h" #include "Magnum/GL/Implementation/TextureState.h"
namespace Magnum { namespace Magnum { namespace GL {
Vector2i RectangleTexture::maxSize() { Vector2i RectangleTexture::maxSize() {
if(!Context::current().isExtensionSupported<Extensions::GL::ARB::texture_rectangle>()) if(!Context::current().isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
@ -88,5 +88,5 @@ CompressedBufferImage2D RectangleTexture::compressedSubImage(const Range2Di& ran
return std::move(image); return std::move(image);
} }
} }}
#endif #endif

8
src/Magnum/GL/RectangleTexture.h

@ -27,7 +27,7 @@
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** @file /** @file
* @brief Class @ref Magnum::RectangleTexture * @brief Class @ref Magnum::GL::RectangleTexture
*/ */
#endif #endif
@ -36,14 +36,14 @@
#include "Magnum/Math/Vector2.h" #include "Magnum/Math/Vector2.h"
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Rectangle texture @brief Rectangle texture
See also @ref AbstractTexture documentation for more information. See also @ref AbstractTexture documentation for more information.
@section RectangleTexture-usage Usage @section GL-RectangleTexture-usage Usage
Common usage is to fully configure all texture parameters and then set the Common usage is to fully configure all texture parameters and then set the
data from e.g. @ref Image2D. Example configuration: data from e.g. @ref Image2D. Example configuration:
@ -609,7 +609,7 @@ class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture {
explicit RectangleTexture(GLuint id, ObjectFlags flags) noexcept: AbstractTexture{id, GL_TEXTURE_RECTANGLE, flags} {} explicit RectangleTexture(GLuint id, ObjectFlags flags) noexcept: AbstractTexture{id, GL_TEXTURE_RECTANGLE, flags} {}
}; };
} }}
#else #else
#error this header is not available in OpenGL ES build #error this header is not available in OpenGL ES build
#endif #endif

4
src/Magnum/GL/Renderbuffer.cpp

@ -34,7 +34,7 @@
#include "Magnum/GL/Implementation/FramebufferState.h" #include "Magnum/GL/Implementation/FramebufferState.h"
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
namespace Magnum { namespace Magnum { namespace GL {
Int Renderbuffer::maxSize() { Int Renderbuffer::maxSize() {
GLint& value = Context::current().state().framebuffer->maxRenderbufferSize; GLint& value = Context::current().state().framebuffer->maxRenderbufferSize;
@ -183,4 +183,4 @@ void Renderbuffer::storageMultisampleImplementationDSAEXT(GLsizei samples, Rende
} }
#endif #endif
} }}

8
src/Magnum/GL/Renderbuffer.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::Renderbuffer * @brief Class @ref Magnum::GL::Renderbuffer
*/ */
#include <Corrade/Containers/ArrayView.h> #include <Corrade/Containers/ArrayView.h>
@ -35,7 +35,7 @@
#include "Magnum/GL/AbstractObject.h" #include "Magnum/GL/AbstractObject.h"
#include "Magnum/GL/GL.h" #include "Magnum/GL/GL.h"
namespace Magnum { namespace Magnum { namespace GL {
namespace Implementation { struct FramebufferState; } namespace Implementation { struct FramebufferState; }
@ -45,7 +45,7 @@ namespace Implementation { struct FramebufferState; }
Attachable to framebuffer as render target, see @ref Framebuffer documentation Attachable to framebuffer as render target, see @ref Framebuffer documentation
for more information. for more information.
@section Renderbuffer-performance-optimizations Performance optimizations @section GL-Renderbuffer-performance-optimizations Performance optimizations
The engine tracks currently bound renderbuffer to avoid unnecessary calls to The engine tracks currently bound renderbuffer to avoid unnecessary calls to
@fn_gl{BindRenderbuffer} in @ref setStorage(). Renderbuffer limits and @fn_gl{BindRenderbuffer} in @ref setStorage(). Renderbuffer limits and
@ -302,6 +302,6 @@ inline GLuint Renderbuffer::release() {
return id; return id;
} }
} }}
#endif #endif

6
src/Magnum/GL/RenderbufferFormat.h

@ -26,12 +26,12 @@
*/ */
/** @file /** @file
* @brief Enum @ref Magnum::RenderbufferFormat * @brief Enum @ref Magnum::GL::RenderbufferFormat
*/ */
#include "Magnum/GL/OpenGL.h" #include "Magnum/GL/OpenGL.h"
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Internal renderbuffer format @brief Internal renderbuffer format
@ -639,6 +639,6 @@ enum class RenderbufferFormat: GLenum {
#endif #endif
}; };
} }}
#endif #endif

16
src/Magnum/GL/Renderer.cpp

@ -33,7 +33,7 @@
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
#include "Magnum/GL/Implementation/RendererState.h" #include "Magnum/GL/Implementation/RendererState.h"
namespace Magnum { namespace Magnum { namespace GL {
void Renderer::enable(const Feature feature) { void Renderer::enable(const Feature feature) {
glEnable(GLenum(feature)); glEnable(GLenum(feature));
@ -235,7 +235,7 @@ Renderer::GraphicsResetStatus Renderer::graphicsResetStatusImplementationRobustn
Debug& operator<<(Debug& debug, const Renderer::Error value) { Debug& operator<<(Debug& debug, const Renderer::Error value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Renderer::Error::value: return debug << "Renderer::Error::" #value; #define _c(value) case Renderer::Error::value: return debug << "GL::Renderer::Error::" #value;
_c(NoError) _c(NoError)
_c(InvalidEnum) _c(InvalidEnum)
_c(InvalidValue) _c(InvalidValue)
@ -250,27 +250,27 @@ Debug& operator<<(Debug& debug, const Renderer::Error value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Renderer::Error(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Renderer::Error(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
Debug& operator<<(Debug& debug, const Renderer::ResetNotificationStrategy value) { Debug& operator<<(Debug& debug, const Renderer::ResetNotificationStrategy value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Renderer::ResetNotificationStrategy::value: return debug << "Renderer::ResetNotificationStrategy::" #value; #define _c(value) case Renderer::ResetNotificationStrategy::value: return debug << "GL::Renderer::ResetNotificationStrategy::" #value;
_c(NoResetNotification) _c(NoResetNotification)
_c(LoseContextOnReset) _c(LoseContextOnReset)
#undef _c #undef _c
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Renderer::ResetNotificationStrategy(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Renderer::ResetNotificationStrategy(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const Renderer::GraphicsResetStatus value) { Debug& operator<<(Debug& debug, const Renderer::GraphicsResetStatus value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Renderer::GraphicsResetStatus::value: return debug << "Renderer::GraphicsResetStatus::" #value; #define _c(value) case Renderer::GraphicsResetStatus::value: return debug << "GL::Renderer::GraphicsResetStatus::" #value;
_c(NoError) _c(NoError)
_c(GuiltyContextReset) _c(GuiltyContextReset)
_c(InnocentContextReset) _c(InnocentContextReset)
@ -279,9 +279,9 @@ Debug& operator<<(Debug& debug, const Renderer::GraphicsResetStatus value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Renderer::GraphicsResetStatus(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Renderer::GraphicsResetStatus(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
#endif #endif
} }}

12
src/Magnum/GL/Renderer.h

@ -26,7 +26,7 @@
*/ */
/** @file /** @file
* @brief Class @ref Magnum::Renderer * @brief Class @ref Magnum::GL::Renderer
*/ */
#include <Corrade/Containers/EnumSet.h> #include <Corrade/Containers/EnumSet.h>
@ -36,7 +36,7 @@
#include "Magnum/GL/OpenGL.h" #include "Magnum/GL/OpenGL.h"
#include "Magnum/GL/visibility.h" #include "Magnum/GL/visibility.h"
namespace Magnum { namespace Magnum { namespace GL {
namespace Implementation { struct RendererState; } namespace Implementation { struct RendererState; }
@ -1635,17 +1635,17 @@ class MAGNUM_GL_EXPORT Renderer {
CORRADE_ENUMSET_OPERATORS(Renderer::MemoryBarriers) CORRADE_ENUMSET_OPERATORS(Renderer::MemoryBarriers)
#endif #endif
/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::Error} */ /** @debugoperatorclassenum{Renderer,Renderer::Error} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Renderer::Error value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Renderer::Error value);
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::ResetNotificationStrategy} */ /** @debugoperatorclassenum{Renderer,Renderer::ResetNotificationStrategy} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Renderer::ResetNotificationStrategy value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Renderer::ResetNotificationStrategy value);
/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::GraphicsResetStatus} */ /** @debugoperatorclassenum{Renderer,Renderer::GraphicsResetStatus} */
MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Renderer::GraphicsResetStatus value); MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Renderer::GraphicsResetStatus value);
#endif #endif
} }}
#endif #endif

6
src/Magnum/GL/SampleQuery.h

@ -27,14 +27,14 @@
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
/** @file /** @file
* @brief Class @ref Magnum::SampleQuery * @brief Class @ref Magnum::GL::SampleQuery
*/ */
#endif #endif
#include "Magnum/GL/AbstractQuery.h" #include "Magnum/GL/AbstractQuery.h"
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
namespace Magnum { namespace Magnum { namespace GL {
/** /**
@brief Query for samples @brief Query for samples
@ -250,7 +250,7 @@ class SampleQuery: public AbstractQuery {
explicit SampleQuery(GLuint id, Target target, ObjectFlags flags) noexcept: AbstractQuery{id, GLenum(target), flags} {} explicit SampleQuery(GLuint id, Target target, ObjectFlags flags) noexcept: AbstractQuery{id, GLenum(target), flags} {}
}; };
} }}
#else #else
#error this header is not available in WebGL 1.0 build #error this header is not available in WebGL 1.0 build
#endif #endif

28
src/Magnum/GL/Sampler.cpp

@ -32,7 +32,7 @@
#include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/State.h"
#include "Magnum/GL/Implementation/TextureState.h" #include "Magnum/GL/Implementation/TextureState.h"
namespace Magnum { namespace Magnum { namespace GL {
/* Check correctness of binary OR in setMinificationFilter(). If nobody fucks /* Check correctness of binary OR in setMinificationFilter(). If nobody fucks
anything up, this assert should produce the same results on all dimensions, anything up, this assert should produce the same results on all dimensions,
@ -68,20 +68,20 @@ Float Sampler::maxMaxAnisotropy() {
Debug& operator<<(Debug& debug, const Sampler::Filter value) { Debug& operator<<(Debug& debug, const Sampler::Filter value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Sampler::Filter::value: return debug << "Sampler::Filter::" #value; #define _c(value) case Sampler::Filter::value: return debug << "GL::Sampler::Filter::" #value;
_c(Nearest) _c(Nearest)
_c(Linear) _c(Linear)
#undef _c #undef _c
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Sampler::Filter(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Sampler::Filter(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const Sampler::Mipmap value) { Debug& operator<<(Debug& debug, const Sampler::Mipmap value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Sampler::Mipmap::value: return debug << "Sampler::Mipmap::" #value; #define _c(value) case Sampler::Mipmap::value: return debug << "GL::Sampler::Mipmap::" #value;
_c(Base) _c(Base)
_c(Nearest) _c(Nearest)
_c(Linear) _c(Linear)
@ -89,13 +89,13 @@ Debug& operator<<(Debug& debug, const Sampler::Mipmap value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Sampler::Mipmap(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Sampler::Mipmap(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const Sampler::Wrapping value) { Debug& operator<<(Debug& debug, const Sampler::Wrapping value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Sampler::Wrapping::value: return debug << "Sampler::Wrapping::" #value; #define _c(value) case Sampler::Wrapping::value: return debug << "GL::Sampler::Wrapping::" #value;
_c(Repeat) _c(Repeat)
_c(MirroredRepeat) _c(MirroredRepeat)
_c(ClampToEdge) _c(ClampToEdge)
@ -109,27 +109,27 @@ Debug& operator<<(Debug& debug, const Sampler::Wrapping value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Sampler::Wrapping(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")"; return debug << "GL::Sampler::Wrapping(" << Debug::nospace << reinterpret_cast<void*>(GLint(value)) << Debug::nospace << ")";
} }
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
Debug& operator<<(Debug& debug, const Sampler::CompareMode value) { Debug& operator<<(Debug& debug, const Sampler::CompareMode value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Sampler::CompareMode::value: return debug << "Sampler::CompareMode::" #value; #define _c(value) case Sampler::CompareMode::value: return debug << "GL::Sampler::CompareMode::" #value;
_c(None) _c(None)
_c(CompareRefToTexture) _c(CompareRefToTexture)
#undef _c #undef _c
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Sampler::CompareMode(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Sampler::CompareMode(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
Debug& operator<<(Debug& debug, const Sampler::CompareFunction value) { Debug& operator<<(Debug& debug, const Sampler::CompareFunction value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Sampler::CompareFunction::value: return debug << "Sampler::CompareFunction::" #value; #define _c(value) case Sampler::CompareFunction::value: return debug << "GL::Sampler::CompareFunction::" #value;
_c(Never) _c(Never)
_c(Always) _c(Always)
_c(Less) _c(Less)
@ -142,7 +142,7 @@ Debug& operator<<(Debug& debug, const Sampler::CompareFunction value) {
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Sampler::CompareFunction(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Sampler::CompareFunction(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
@ -150,16 +150,16 @@ Debug& operator<<(Debug& debug, const Sampler::CompareFunction value) {
Debug& operator<<(Debug& debug, const Sampler::DepthStencilMode value) { Debug& operator<<(Debug& debug, const Sampler::DepthStencilMode value) {
switch(value) { switch(value) {
/* LCOV_EXCL_START */ /* LCOV_EXCL_START */
#define _c(value) case Sampler::DepthStencilMode::value: return debug << "Sampler::DepthStencilMode::" #value; #define _c(value) case Sampler::DepthStencilMode::value: return debug << "GL::Sampler::DepthStencilMode::" #value;
_c(DepthComponent) _c(DepthComponent)
_c(StencilIndex) _c(StencilIndex)
#undef _c #undef _c
/* LCOV_EXCL_STOP */ /* LCOV_EXCL_STOP */
} }
return debug << "Sampler::DepthStencilMode(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")"; return debug << "GL::Sampler::DepthStencilMode(" << Debug::nospace << reinterpret_cast<void*>(GLenum(value)) << Debug::nospace << ")";
} }
#endif #endif
#endif #endif
} }}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save