diff --git a/doc/building.dox b/doc/building.dox index 27a3af344..86221666c 100644 --- a/doc/building.dox +++ b/doc/building.dox @@ -509,9 +509,9 @@ more information): There are also extensions to @ref Corrade::TestSuite::Tester for testing GPU code: -- `WITH_OPENGLTESTER` --- The @ref OpenGLTester class. Enables also building - of the GL library and one of the windowless application libraries based on - the target platform. +- `WITH_OPENGLTESTER` --- The @ref GL::OpenGLTester class. Enables also + building of the GL library and one of the windowless application libraries + based on the target platform. Magnum also contains a set of dependency-less plugins for importing essential 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. 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 platform and also guide how to enable given library for building and how to use it with CMake. diff --git a/doc/changelog.dox b/doc/changelog.dox index a0234ecd0..4819c8d73 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -124,6 +124,10 @@ See also: @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 - `setData()` functions in the @ref Image and @ref CompressedImage classes are deprecated because they don't offer anything extra over simple diff --git a/doc/cmake.dox b/doc/cmake.dox index 12fbb499f..dfd1899c8 100644 --- a/doc/cmake.dox +++ b/doc/cmake.dox @@ -131,7 +131,7 @@ information): There are also extensions to @ref Corrade::TestSuite::Tester for testing GPU code: -- `OpenGLTester` --- @ref OpenGLTester class +- `OpenGLTester` --- @ref GL::OpenGLTester class The library also contains a set of plugins for importing essential file formats. Additional plugins are provided in separate plugin repository, see diff --git a/doc/developers.dox b/doc/developers.dox index 92ae40d2b..05294c891 100644 --- a/doc/developers.dox +++ b/doc/developers.dox @@ -486,7 +486,7 @@ in inverse --- but usually @ref developers-deprecation "deprecate first". 11. Add new version enum value: - to `src/Magnum/Version.h` - 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 specify GLSL version in `src/Magnum/Shader.cpp` - to the list in `src/Magnum/Platform/magnum-info.cpp` diff --git a/doc/method-chaining.dox b/doc/method-chaining.dox index 51a56881e..214475b56 100644 --- a/doc/method-chaining.dox +++ b/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 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 -in conjunction with other functions anyway. +@ref GL::Framebuffer::clear() or @ref GL::Mesh::draw(), as these won't be +commonly used in conjunction with other functions anyway. 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 diff --git a/doc/namespaces.dox b/doc/namespaces.dox index dfa02feb6..e3199d33e 100644 --- a/doc/namespaces.dox +++ b/doc/namespaces.dox @@ -24,16 +24,16 @@ */ /** @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 @brief Root namespace Contains classes for interacting with OpenGL. -All of this library except @ref OpenGLTester is built as part of Magnum by -default. To use this library with CMake, you need to request the `Magnum` -package and link to the `Magnum::Magnum` target: +This library is built as part of Magnum by default. To use this library with +CMake, you need to find the `Magnum` package and link to the `Magnum::Magnum` +target: @code{.cmake} 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. */ +/** @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 * @brief Namespace @ref Magnum::MeshTools */ diff --git a/doc/opengl-mapping.dox b/doc/opengl-mapping.dox index 65ae0b338..55b7f6206 100644 --- a/doc/opengl-mapping.dox +++ b/doc/opengl-mapping.dox @@ -51,8 +51,8 @@ Legend: OpenGL function | Matching API --------------------------------------- | ------------ @fn_gl{ActiveShaderProgram} | not needed as @fn_gl{ProgramUniform} calls are used -@fn_gl{ActiveTexture} | @ref AbstractTexture::bind() -@fn_gl{AttachShader} | @ref AbstractShaderProgram::attachShader() +@fn_gl{ActiveTexture} | @ref GL::AbstractTexture::bind() +@fn_gl{AttachShader} | @ref GL::AbstractShaderProgram::attachShader() @subsection opengl-mapping-functions-b B @@ -60,33 +60,33 @@ OpenGL function | Matching API OpenGL function | Matching API --------------------------------------- | ------------ -@fn_gl{BeginConditionalRender}, `glEndConditionalRender()` | @ref SampleQuery::beginConditionalRender(), \n @ref SampleQuery::endConditionalRender() -@fn_gl{BeginQuery}, `glEndQuery()` | @ref PrimitiveQuery::begin(), \n @ref SampleQuery::begin(), \n @ref TimeQuery::begin(), \n @ref AbstractQuery::end() -@fn_gl{BeginQueryIndexed}, `glEndQueryIndexed()` | @ref PrimitiveQuery::begin(UnsignedInt), \n @ref PrimitiveQuery::end() -@fn_gl{BeginTransformFeedback}, `glEndTransformFeedback()` | @ref TransformFeedback::begin(), @ref TransformFeedback::end() -@fn_gl{BindAttribLocation} | @ref AbstractShaderProgram::bindAttributeLocation() -@fn_gl{BindBuffer} | not needed, handled internally in @ref 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{BindFragDataLocation} | @ref AbstractShaderProgram::bindFragmentDataLocation() -@fn_gl{BindFragDataLocationIndexed} | @ref AbstractShaderProgram::bindFragmentDataLocationIndexed() -@fn_gl{BindFramebuffer} | @ref 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{BeginConditionalRender}, `glEndConditionalRender()` | @ref GL::SampleQuery::beginConditionalRender(), \n @ref GL::SampleQuery::endConditionalRender() +@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 GL::PrimitiveQuery::begin(UnsignedInt), \n @ref GL::PrimitiveQuery::end() +@fn_gl{BeginTransformFeedback}, `glEndTransformFeedback()` | @ref GL::TransformFeedback::begin(), @ref GL::TransformFeedback::end() +@fn_gl{BindAttribLocation} | @ref GL::AbstractShaderProgram::bindAttributeLocation() +@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 GL::Buffer::bind(), \n @ref GL::Buffer::unbind(), \n @ref GL::TransformFeedback::attachBuffer(), \n @ref GL::TransformFeedback::attachBuffers() +@fn_gl{BindFragDataLocation} | @ref GL::AbstractShaderProgram::bindFragmentDataLocation() +@fn_gl{BindFragDataLocationIndexed} | @ref GL::AbstractShaderProgram::bindFragmentDataLocationIndexed() +@fn_gl{BindFramebuffer} | @ref GL::Framebuffer::bind() +@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{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{BindTexture}, \n @fn_gl{BindTextureUnit}, \n @fn_gl{BindTextures}, \n @fn_gl_extension{BindMultiTexture,EXT,direct_state_access} | @ref AbstractTexture::bind() -@fn_gl{BindTransformFeedback} | not needed, handled internally in @ref TransformFeedback -@fn_gl{BindVertexArray} | not needed, handled internally in @ref Mesh +@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 GL::TransformFeedback +@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_extension{BlendBarrier,KHR,blend_equation_advanced} | @ref Renderer::blendBarrier() -@fn_gl{BlendColor} | @ref Renderer::setBlendColor() -@fn_gl{BlendEquation}, \n @fn_gl{BlendEquationSeparate} | @ref Renderer::setBlendEquation() -@fn_gl{BlendFunc}, \n @fn_gl{BlendFuncSeparate} | @ref Renderer::setBlendFunction() -@fn_gl{BlitFramebuffer}, \n `glBlitNamedFramebuffer()` | @ref AbstractFramebuffer::blit() -@fn_gl{BufferData}, \n `glNamedBufferData()`, \n @fn_gl_extension{NamedBufferData,EXT,direct_state_access} | @ref Buffer::setData() +@fn_gl_extension{BlendBarrier,KHR,blend_equation_advanced} | @ref GL::Renderer::blendBarrier() +@fn_gl{BlendColor} | @ref GL::Renderer::setBlendColor() +@fn_gl{BlendEquation}, \n @fn_gl{BlendEquationSeparate} | @ref GL::Renderer::setBlendEquation() +@fn_gl{BlendFunc}, \n @fn_gl{BlendFuncSeparate} | @ref GL::Renderer::setBlendFunction() +@fn_gl{BlitFramebuffer}, \n `glBlitNamedFramebuffer()` | @ref GL::AbstractFramebuffer::blit() +@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{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 @@ -94,31 +94,31 @@ 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{Clear} | @ref AbstractFramebuffer::clear() -@fn_gl{ClearBuffer}, \n `glClearNamedFramebuffer()` | @ref AbstractFramebuffer::clearDepth(), @ref AbstractFramebuffer::clearStencil(), @ref AbstractFramebuffer::clearDepthStencil(), @ref DefaultFramebuffer::clearColor(), @ref Framebuffer::clearColor() +@fn_gl{Clear} | @ref GL::AbstractFramebuffer::clear() +@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{ClearBufferSubData}, \n `glClearNamedBufferSubData()`, \n @fn_gl_extension{ClearNamedBufferSubData,EXT,direct_state_access} | | -@fn_gl{ClearColor} | @ref Renderer::setClearColor() -@fn_gl{ClearDepth} | @ref Renderer::setClearDepth() -@fn_gl{ClearStencil} | @ref Renderer::setClearStencil() +@fn_gl{ClearColor} | @ref GL::Renderer::setClearColor() +@fn_gl{ClearDepth} | @ref GL::Renderer::setClearDepth() +@fn_gl{ClearStencil} | @ref GL::Renderer::setClearStencil() @fn_gl{ClearTexImage} | | @fn_gl{ClearTexSubImage} | | @fn_gl{ClientWaitSync} | | @fn_gl{ClipControl} | | -@fn_gl{ColorMask} | @ref Renderer::setColorMask() -@fn_gl{CompileShader} | @ref 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{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{CopyBufferSubData}, \n `glCopyNamedBufferSubData()`, \n @fn_gl_extension{NamedCopyBufferSubData,EXT,direct_state_access} | @ref Buffer::copy() +@fn_gl{ColorMask} | @ref GL::Renderer::setColorMask() +@fn_gl{CompileShader} | @ref GL::Shader::compile() +@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 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 GL::Buffer::copy() @fn_gl{CopyImageSubData} | | -@fn_gl{CopyTexImage1D}, \n @fn_gl{CopyTexImage2D} | @ref 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{CreateProgram}, @fn_gl{DeleteProgram} | @ref AbstractShaderProgram constructor and destructor -@fn_gl{CreateShader}, @fn_gl{DeleteShader} | @ref Shader constructor and destructor +@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 GL::Framebuffer::copySubImage() +@fn_gl{CreateProgram}, @fn_gl{DeleteProgram} | @ref GL::AbstractShaderProgram constructor and destructor +@fn_gl{CreateShader}, @fn_gl{DeleteShader} | @ref GL::Shader constructor and destructor @fn_gl{CreateShaderProgram} | | -@fn_gl{CullFace} | @ref Renderer::setFaceCullingMode() +@fn_gl{CullFace} | @ref GL::Renderer::setFaceCullingMode() @subsection opengl-mapping-functions-d D @@ -126,22 +126,22 @@ OpenGL function | Matching API OpenGL function | Matching API --------------------------------------- | ------------ -@fn_gl{DebugMessageCallback} | @ref DebugOutput::setCallback() -@fn_gl{DebugMessageControl} | @ref 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{DepthFunc} | @ref Renderer::setDepthFunction() -@fn_gl{DepthMask} | @ref Renderer::setDepthMask() +@fn_gl{DebugMessageCallback} | @ref GL::DebugOutput::setCallback() +@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 GL::DebugMessage::insert() +@fn_gl{DepthFunc} | @ref GL::Renderer::setDepthFunction() +@fn_gl{DepthMask} | @ref GL::Renderer::setDepthMask() @fn_gl{DepthRange} | | @fn_gl{DepthRangeArray} | | @fn_gl{DepthRangeIndexed} | | @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{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{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{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{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 GL::Mesh::draw(AbstractShaderProgram&, TransformFeedback&, UnsignedInt), \n @ref GL::MeshView::draw(AbstractShaderProgram&, TransformFeedback&, UnsignedInt) @subsection opengl-mapping-functions-e E @@ -149,8 +149,8 @@ OpenGL function | Matching API OpenGL function | Matching API --------------------------------------- | ------------ -@fn_gl{Enable}, `glDisable()` | @ref 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{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 GL::Mesh::addVertexBuffer() @subsection opengl-mapping-functions-f F @@ -159,16 +159,16 @@ OpenGL function | Matching API OpenGL function | Matching API --------------------------------------- | ------------ @fn_gl{FenceSync}, @fn_gl{DeleteSync} | | -@fn_gl{Finish} | @ref Renderer::finish() -@fn_gl{Flush} | @ref Renderer::flush() -@fn_gl{FlushMappedBufferRange}, \n `glFlushMappedNamedBufferRange()`, \n @fn_gl_extension{FlushMappedNamedBufferRange,EXT,direct_state_access} | @ref Buffer::flushMappedRange() +@fn_gl{Finish} | @ref GL::Renderer::finish() +@fn_gl{Flush} | @ref GL::Renderer::flush() +@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_gl{FramebufferRenderbuffer}, \n `glNamedFramebufferRenderbuffer()`, \n @fn_gl_extension{NamedFramebufferRenderbuffer,EXT,direct_state_access} | @ref Framebuffer::attachRenderbuffer(), \n @ref Framebuffer::detach() -@fn_gl{FramebufferTexture}, \n `glNamedFramebufferTexture()`, \n @fn_gl_extension{NamedFramebufferTexture,EXT,direct_state_access} | @ref 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_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 GL::Framebuffer::attachLayeredTexture() +@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_gl{FramebufferTextureLayer}, \n `glNamedFramebufferTextureLayer()`, \n @fn_gl_extension{NamedFramebufferTextureLayer,EXT,direct_state_access} | @ref Framebuffer::attachTextureLayer(), \n @ref Framebuffer::attachCubeMapTexture() -@fn_gl{FrontFace} | @ref Renderer::setFrontFace() +@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 GL::Renderer::setFrontFace() @subsection opengl-mapping-functions-g G @@ -176,37 +176,37 @@ 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{GenFramebuffers}, \n @fn_gl{CreateFramebuffers}, \n @fn_gl{DeleteFramebuffers} | @ref Framebuffer 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 GL::Framebuffer constructor and destructor @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{GenRenderbuffers}, \n @fn_gl{CreateRenderbuffers}, \n @fn_gl{DeleteRenderbuffers} | @ref Renderbuffer 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 GL::Renderbuffer constructor and destructor @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{GenVertexArrays}, \n @fn_gl{CreateVertexArrays}, \n @fn_gl{DeleteVertexArrays} | @ref 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{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 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_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{GetAttachedShaders} | not queryable, @ref AbstractShaderProgram::attachShader() setter only -@fn_gl{GetAttribLocation} | not queryable, @ref AbstractShaderProgram::bindAttributeLocation() setter only -@fn_gl{GetBufferParameter}, \n `glGetNamedBufferParameter()`, \n @fn_gl_extension{GetNamedBufferParameter,EXT,direct_state_access} | @ref 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_gl{GetBufferSubData}, \n `glGetNamedBufferSubData()`, \n @fn_gl_extension{GetNamedBufferSubData,EXT,direct_state_access} | @ref Buffer::data(), \n @ref 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{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{GetAttachedShaders} | not queryable, @ref GL::AbstractShaderProgram::attachShader() 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 GL::Buffer::size() +@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 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 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 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{GetError} | @ref Renderer::error() -@fn_gl{GetFragDataIndex}, @fn_gl{GetFragDataLocation} | not queryable, @ref AbstractShaderProgram::bindFragmentDataLocation() and \n @ref 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{GetFramebufferParameter}, \n `glGetNamedFramebufferParameter()`, \n @fn_gl_extension{GetNamedFramebufferParameter,EXT,direct_state_access} | not queryable, @ref DefaultFramebuffer and \n @ref Framebuffer setters only -@fn_gl{GetGraphicsResetStatus}, \n @fn_gl_extension{GetGraphicsResetStatus,ARB,robustness} | @ref Renderer::graphicsResetStatus() +@fn_gl{GetError} | @ref GL::Renderer::error() +@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 GL::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 GL::Renderer::graphicsResetStatus() @fn_gl_extension{GetImageHandle,ARB,bindless_texture} | | @fn_gl{GetInternalformat} | | @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{GetProgram}, \n @fn_gl{GetProgramInfoLog} | @ref AbstractShaderProgram::link(), \n @ref AbstractShaderProgram::validate() +@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 GL::AbstractShaderProgram::link(), \n @ref GL::AbstractShaderProgram::validate() @fn_gl{GetProgramBinary} | | @fn_gl{GetProgramInterface} | | @fn_gl{GetProgramPipeline} | | @@ -218,32 +218,32 @@ OpenGL function | Matching API @fn_gl{GetProgramResourceName} | | @fn_gl{GetProgramStage} | | @fn_gl{GetQueryIndexed} | | -@fn_gl{GetQueryObject} | @ref AbstractQuery::result() +@fn_gl{GetQueryObject} | @ref GL::AbstractQuery::result() @fn_gl{GetQueryBufferObject} | | @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{GetShader}, \n @fn_gl{GetShaderInfoLog} | @ref Shader::compile() +@fn_gl{GetShader}, \n @fn_gl{GetShaderInfoLog} | @ref GL::Shader::compile() @fn_gl{GetShaderPrecisionFormat} | | -@fn_gl{GetShaderSource} | not queryable but tracked in @ref 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{GetShaderSource} | not queryable but tracked in @ref GL::Shader::sources() +@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{GetSubroutineUniformLocation} | | @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{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{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 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_extension{GetTextureHandle,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{GetTransformFeedback} | not queryable, @ref TransformFeedback::attachBuffer() and @ref TransformFeedback::attachBuffers() setters only -@fn_gl{GetTransformFeedbackVarying} | not queryable, @ref 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{GetUniformBlockIndex} | @ref AbstractShaderProgram::uniformBlockIndex() +@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 GL::TransformFeedback::attachBuffer() and @ref GL::TransformFeedback::attachBuffers() setters 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 GL::AbstractShaderProgram::setUniform() setter only +@fn_gl{GetUniformBlockIndex} | @ref GL::AbstractShaderProgram::uniformBlockIndex() @fn_gl{GetUniformIndices} | | -@fn_gl{GetUniformLocation} | @ref AbstractShaderProgram::uniformLocation() +@fn_gl{GetUniformLocation} | @ref GL::AbstractShaderProgram::uniformLocation() @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 @@ -251,7 +251,7 @@ 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 @@ -259,14 +259,14 @@ OpenGL function | Matching API OpenGL function | Matching API --------------------------------------- | ------------ -@fn_gl{InvalidateBufferData} | @ref Buffer::invalidateData() -@fn_gl{InvalidateBufferSubData} | @ref Buffer::invalidateSubData() -@fn_gl{InvalidateFramebuffer}, \n `glInvalidateNamedFramebufferData()`, \n @fn_gl_extension{DiscardFramebuffer,EXT,discard_framebuffer} | @ref DefaultFramebuffer::invalidate(), \n @ref Framebuffer::invalidate() -@fn_gl{InvalidateSubFramebuffer}, \n `glInvalidateNamedFramebufferSubData()` | @ref DefaultFramebuffer::invalidate(), \n @ref 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{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{InvalidateBufferData} | @ref GL::Buffer::invalidateData() +@fn_gl{InvalidateBufferSubData} | @ref GL::Buffer::invalidateSubData() +@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 GL::DefaultFramebuffer::invalidate(), \n @ref GL::Framebuffer::invalidate() +@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 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{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{IsTextureHandleResident,ARB,bindless_texture} | | @@ -276,9 +276,9 @@ OpenGL function | Matching API OpenGL function | Matching API --------------------------------------- | ------------ -@fn_gl{LineWidth} | @ref Renderer::setLineWidth() -@fn_gl{LinkProgram} | @ref AbstractShaderProgram::link() -@fn_gl{LogicOp} | @ref Renderer::setLogicOperation() +@fn_gl{LineWidth} | @ref GL::Renderer::setLineWidth() +@fn_gl{LinkProgram} | @ref GL::AbstractShaderProgram::link() +@fn_gl{LogicOp} | @ref GL::Renderer::setLogicOperation() @subsection opengl-mapping-functions-m M @@ -290,10 +290,10 @@ OpenGL function | Matching API @fn_gl_extension{MakeImageHandleNonResident,ARB,bindless_texture} | | @fn_gl_extension{MakeTextureHandleResident,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{MemoryBarrier}, \n `glMemoryBarrierByRegion()` | @ref Renderer::setMemoryBarrier(), \n @ref Renderer::setMemoryBarrierByRegion() +@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 GL::Renderer::setMemoryBarrier(), \n @ref GL::Renderer::setMemoryBarrierByRegion() @fn_gl{MinSampleShading} | | -@fn_gl{MultiDrawArrays}, \n @fn_gl{MultiDrawElements}, \n @fn_gl{MultiDrawElementsBaseVertex} | @ref MeshView::draw(AbstractShaderProgram&, std::initializer_list>) +@fn_gl{MultiDrawArrays}, \n @fn_gl{MultiDrawElements}, \n @fn_gl{MultiDrawElementsBaseVertex} | @ref GL::MeshView::draw(AbstractShaderProgram&, std::initializer_list>) @fn_gl{MultiDrawArraysIndirectCount}, \n @fn_gl{MultiDrawElementsIndirectCount} | | @subsection opengl-mapping-functions-o O @@ -302,7 +302,7 @@ 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 @@ -311,20 +311,20 @@ OpenGL function | Matching API OpenGL function | Matching API --------------------------------------- | ------------ @fn_gl{PatchParameter} | | -@fn_gl{PauseTransformFeedback}, @fn_gl{ResumeTransformFeedback} | @ref TransformFeedback::pause(), @ref 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{PauseTransformFeedback}, @fn_gl{ResumeTransformFeedback} | @ref GL::TransformFeedback::pause(), @ref GL::TransformFeedback::resume() +@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{PointSize} | @ref Renderer::setPointSize() -@fn_gl{PolygonMode} | @ref Renderer::setPolygonMode() -@fn_gl{PolygonOffset} | @ref Renderer::setPolygonOffset() +@fn_gl{PointSize} | @ref GL::Renderer::setPointSize() +@fn_gl{PolygonMode} | @ref GL::Renderer::setPolygonMode() +@fn_gl{PolygonOffset} | @ref GL::Renderer::setPolygonOffset() @fn_gl{PolygonOffsetClamp} | | @fn_gl_extension{PrimitiveBoundingBox,EXT,primitive_bounding_box}, \n @fn_gl_extension{PrimitiveBoundingBox,ARB,primitive_bounding_box} | | @fn_gl{PrimitiveRestartIndex} | | @fn_gl{ProgramBinary} | | -@fn_gl{ProgramParameter} | @ref AbstractShaderProgram::setRetrievableBinary(), \n @ref AbstractShaderProgram::setSeparable() -@fn_gl{ProvokingVertex} | @ref Renderer::setProvokingVertex() -@fn_gl{PushDebugGroup}, \n @fn_gl_extension{PushGroupMarker,EXT,debug_marker} | @ref DebugGroup::push() -@fn_gl{PopDebugGroup}, \n @fn_gl_extension{PopGroupMarker,EXT,debug_marker} | @ref DebugGroup::pop() +@fn_gl{ProgramParameter} | @ref GL::AbstractShaderProgram::setRetrievableBinary(), \n @ref GL::AbstractShaderProgram::setSeparable() +@fn_gl{ProvokingVertex} | @ref GL::Renderer::setProvokingVertex() +@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 GL::DebugGroup::pop() @subsection opengl-mapping-functions-q Q @@ -332,7 +332,7 @@ 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 @@ -340,11 +340,11 @@ 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{ReadPixels}, \n `glReadnPixels()`, \n @fn_gl_extension{ReadnPixels,ARB,robustness} | @ref DefaultFramebuffer::read(), \n @ref Framebuffer::read() +@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 GL::DefaultFramebuffer::read(), \n @ref GL::Framebuffer::read() @fn_gl{ReleaseShaderCompiler} | | -@fn_gl{RenderbufferStorage}, \n `glNamedRenderbufferStorage()`, \n @fn_gl_extension{NamedRenderbufferStorage,EXT,direct_state_access} | @ref Renderbuffer::setStorage() -@fn_gl{RenderbufferStorageMultisample}, \n `glNamedRenderbufferStorageMultisample()`, \n @fn_gl_extension{NamedRenderbufferStorageMultisample,EXT,direct_state_access} | @ref Renderbuffer::setStorageMultisample() +@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 GL::Renderbuffer::setStorageMultisample() @subsection opengl-mapping-functions-s S @@ -355,16 +355,16 @@ OpenGL function | Matching API @fn_gl{SampleCoverage} | | @fn_gl{SampleMaski} | | @fn_gl{SamplerParameter} | | -@fn_gl{Scissor} | @ref Renderer::setScissor() +@fn_gl{Scissor} | @ref GL::Renderer::setScissor() @fn_gl{ScissorArray} | | @fn_gl{ScissorIndexed} | | @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{SpecializeShader} | | -@fn_gl{StencilFunc}, \n @fn_gl{StencilFuncSeparate} | @ref Renderer::setStencilFunction() -@fn_gl{StencilMask}, \n @fn_gl{StencilMaskSeparate} | @ref Renderer::setStencilMask() -@fn_gl{StencilOp}, \n @fn_gl{StencilOpSeparate} | @ref Renderer::setStencilOperation() +@fn_gl{StencilFunc}, \n @fn_gl{StencilFuncSeparate} | @ref GL::Renderer::setStencilFunction() +@fn_gl{StencilMask}, \n @fn_gl{StencilMaskSeparate} | @ref GL::Renderer::setStencilMask() +@fn_gl{StencilOp}, \n @fn_gl{StencilOpSeparate} | @ref GL::Renderer::setStencilOperation() @subsection opengl-mapping-functions-t T @@ -372,18 +372,18 @@ 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{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{TexImage2DMultisample}, \n @fn_gl{TexImage3DMultisample} | @ref MultisampleTexture::setStorage() +@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 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 GL::MultisampleTexture::setStorage() @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{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{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{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{TextureBarrier} | @ref Renderer::setTextureBarrier() +@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 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 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 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 GL::Renderer::setTextureBarrier() @fn_gl{TextureView} | | -@fn_gl{TransformFeedbackBufferBase}, \n @fn_gl{TransformFeedbackBufferRange} | @ref TransformFeedback::attachBuffer(), \n @ref TransformFeedback::attachBuffers() -@fn_gl{TransformFeedbackVaryings} | @ref AbstractShaderProgram::setTransformFeedbackOutputs() +@fn_gl{TransformFeedbackBufferBase}, \n @fn_gl{TransformFeedbackBufferRange} | @ref GL::TransformFeedback::attachBuffer(), \n @ref GL::TransformFeedback::attachBuffers() +@fn_gl{TransformFeedbackVaryings} | @ref GL::AbstractShaderProgram::setTransformFeedbackOutputs() @subsection opengl-mapping-functions-u U @@ -391,11 +391,11 @@ 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{UniformBlockBinding} | @ref AbstractShaderProgram::setUniformBlockBinding() +@fn_gl{UniformBlockBinding} | @ref GL::AbstractShaderProgram::setUniformBlockBinding() @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} | | @subsection opengl-mapping-functions-v V @@ -404,16 +404,16 @@ 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{VertexArrayElementBuffer} | | @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{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{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{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{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{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{BLEND_COLOR} | not queryable, @ref 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_EQUATION_ALPHA}, \n @def_gl{BLEND_EQUATION_RGB} | not queryable, @ref 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{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_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{CONTEXT_FLAGS} | @ref Context::flags() -@def_gl{CONTEXT_PROFILE_MASK} | @ref Context::isCoreProfile() +@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 GL::Renderer::setBlendFunction() 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 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 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 GL::Renderer::setColorMask(), \n @ref GL::Renderer::setDepthMask() and \n @ref GL::Renderer::setStencilMask() setters only +@def_gl{CONTEXT_FLAGS} | @ref GL::Context::flags() +@def_gl{CONTEXT_PROFILE_MASK} | @ref GL::Context::isCoreProfile() @def_gl{CURRENT_PROGRAM} | not queryable but tracked internally @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{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{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} | | @@ -457,121 +457,121 @@ glGet() parameter | Matching API @def_gl{LAYER_PROVOKING_VERTEX} | | @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} | not queryable, @ref Renderer::setLineWidth() setter only -@def_gl{LOGIC_OP_MODE} | not queryable, @ref Renderer::setLogicOperation() setter only -@def_gl{MAJOR_VERSION}, \n @def_gl{MINOR_VERSION} | @ref 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_COUNTERS`, \n @def_gl{MAX_COMBINED_ATOMIC_COUNTERS} | @ref Shader::maxAtomicCounters(), \n @ref Shader::maxCombinedAtomicCounters() -`GL_MAX_*_IMAGE_UNIFORMS`, \n @def_gl{MAX_COMBINED_IMAGE_UNIFORMS} | @ref Shader::maxImageUniforms(), \n @ref Shader::maxCombinedImageUniforms() -`GL_MAX_*_SHADER_STORAGE_BLOCKS`, \n @def_gl{MAX_COMBINED_SHADER_STORAGE_BLOCKS} | @ref Shader::maxShaderStorageBlocks(), \n @ref 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_*_UNIFORM_BLOCKS`, \n @def_gl{MAX_COMBINED_UNIFORM_BLOCKS} | @ref Shader::maxUniformBlocks(), \n @ref 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_COMBINED_*_UNIFORM_COMPONENTS` | @ref 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_ATOMIC_COUNTER_BUFFER_SIZE} | @ref AbstractShaderProgram::maxAtomicCounterBufferSize() -@def_gl{MAX_ATOMIC_COUNTER_BUFFER_BINDINGS} | @ref Buffer::maxAtomicCounterBindings() +@def_gl{LINE_WIDTH} | not queryable, @ref GL::Renderer::setLineWidth() 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 GL::Context::version() +`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 GL::Shader::maxAtomicCounters(), \n @ref GL::Shader::maxCombinedAtomicCounters() +`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 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 GL::Shader::maxTextureImageUnits(), \n @ref GL::Shader::maxCombinedTextureImageUnits() +`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 GL::Shader::maxUniformComponents() +`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 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 GL::AbstractShaderProgram::maxAtomicCounterBufferSize() +@def_gl{MAX_ATOMIC_COUNTER_BUFFER_BINDINGS} | @ref GL::Buffer::maxAtomicCounterBindings() @def_gl{MAX_CLIP_DISTANCES} | | -@def_gl{MAX_COLOR_ATTACHMENTS} | @ref 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_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 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_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_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_SIZE,ARB,compute_variable_group_size} | | -@def_gl{MAX_COMPUTE_WORK_GROUP_COUNT} | @ref AbstractShaderProgram::maxComputeWorkGroupCount() -@def_gl{MAX_COMPUTE_WORK_GROUP_INVOCATIONS} | @ref AbstractShaderProgram::maxComputeWorkGroupInvocations() -@def_gl{MAX_COMPUTE_WORK_GROUP_SIZE} | @ref AbstractShaderProgram::maxComputeWorkGroupSize() +@def_gl{MAX_COMPUTE_WORK_GROUP_COUNT} | @ref GL::AbstractShaderProgram::maxComputeWorkGroupCount() +@def_gl{MAX_COMPUTE_WORK_GROUP_INVOCATIONS} | @ref GL::AbstractShaderProgram::maxComputeWorkGroupInvocations() +@def_gl{MAX_COMPUTE_WORK_GROUP_SIZE} | @ref GL::AbstractShaderProgram::maxComputeWorkGroupSize() @def_gl{MAX_CULL_DISTANCES} | | -@def_gl{MAX_DEBUG_LOGGED_MESSAGES} | @ref DebugOutput::maxLoggedMessages() -@def_gl{MAX_DEBUG_MESSAGE_LENGTH} | @ref DebugOutput::maxMessageLength() -@def_gl{MAX_DEBUG_GROUP_STACK_DEPTH} | @ref DebugGroup::maxStackDepth() -@def_gl{MAX_DRAW_BUFFERS} | @ref AbstractFramebuffer::maxDrawBuffers() -@def_gl{MAX_DUAL_SOURCE_DRAW_BUFFERS} | @ref AbstractFramebuffer::maxDualSourceDrawBuffers() -@def_gl{MAX_ELEMENT_INDEX} | @ref Mesh::maxElementIndex() -@def_gl{MAX_ELEMENTS_INDICES} | @ref Mesh::maxElementsIndices() -@def_gl{MAX_ELEMENTS_VERTICES} | @ref Mesh::maxElementsVertices() +@def_gl{MAX_DEBUG_LOGGED_MESSAGES} | @ref GL::DebugOutput::maxLoggedMessages() +@def_gl{MAX_DEBUG_MESSAGE_LENGTH} | @ref GL::DebugOutput::maxMessageLength() +@def_gl{MAX_DEBUG_GROUP_STACK_DEPTH} | @ref GL::DebugGroup::maxStackDepth() +@def_gl{MAX_DRAW_BUFFERS} | @ref GL::AbstractFramebuffer::maxDrawBuffers() +@def_gl{MAX_DUAL_SOURCE_DRAW_BUFFERS} | @ref GL::AbstractFramebuffer::maxDualSourceDrawBuffers() +@def_gl{MAX_ELEMENT_INDEX} | @ref GL::Mesh::maxElementIndex() +@def_gl{MAX_ELEMENTS_INDICES} | @ref GL::Mesh::maxElementsIndices() +@def_gl{MAX_ELEMENTS_VERTICES} | @ref GL::Mesh::maxElementsVertices() @def_gl{MAX_FRAMEBUFFER_HEIGHT} | | @def_gl{MAX_FRAMEBUFFER_LAYERS} | | @def_gl{MAX_FRAMEBUFFER_SAMPLES} | | @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_SHADER_INVOCATIONS} | | -@def_gl{MAX_IMAGE_SAMPLES} | @ref AbstractShaderProgram::maxImageSamples() -@def_gl{MAX_IMAGE_UNITS} | @ref AbstractShaderProgram::maxImageUnits() -@def_gl{MAX_LABEL_LENGTH} | @ref AbstractObject::maxLabelLength() +@def_gl{MAX_IMAGE_SAMPLES} | @ref GL::AbstractShaderProgram::maxImageSamples() +@def_gl{MAX_IMAGE_UNITS} | @ref GL::AbstractShaderProgram::maxImageUnits() +@def_gl{MAX_LABEL_LENGTH} | @ref GL::AbstractObject::maxLabelLength() @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_SERVER_WAIT_TIMEOUT} | | -@def_gl{MAX_SHADER_STORAGE_BLOCK_SIZE} | @ref AbstractShaderProgram::maxShaderStorageBlockSize() -@def_gl{MAX_SHADER_STORAGE_BUFFER_BINDINGS} | @ref Buffer::maxShaderStorageBindings() +@def_gl{MAX_SHADER_STORAGE_BLOCK_SIZE} | @ref GL::AbstractShaderProgram::maxShaderStorageBlockSize() +@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_3D_TEXTURE_SIZE,ARB,sparse_texture} | | @def_gl_extension{MAX_SPARSE_ARRAY_TEXTURE_LAYERS,ARB,sparse_texture} | | @def_gl{MAX_TESS_GEN_LEVEL} | | @def_gl{MAX_TESS_PATCH_COMPONENTS} | | -@def_gl{MAX_TEXTURE_BUFFER_SIZE} | @ref BufferTexture::maxSize() -@def_gl{MAX_TEXTURE_LOD_BIAS} | @ref AbstractTexture::maxLodBias() -@def_gl{MAX_TEXTURE_MAX_ANISOTROPY} | @ref Sampler::maxMaxAnisotropy() -@def_gl{MAX_TRANSFORM_FEEDBACK_BUFFERS} | @ref TransformFeedback::maxBuffers() -@def_gl{MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS} | @ref TransformFeedback::maxInterleavedComponents() -@def_gl{MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS} | @ref TransformFeedback::maxSeparateAttributes() -@def_gl{MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS} | @ref TransformFeedback::maxSeparateComponents() -@def_gl{MAX_UNIFORM_BLOCK_SIZE} | @ref AbstractShaderProgram::maxUniformBlockSize() -@def_gl{MAX_UNIFORM_BUFFER_BINDINGS} | @ref Buffer::maxUniformBindings() -@def_gl{MAX_UNIFORM_LOCATIONS} | @ref AbstractShaderProgram::maxUniformLocations() -@def_gl{MAX_VERTEX_ATTRIBS} | @ref AbstractShaderProgram::maxVertexAttributes() +@def_gl{MAX_TEXTURE_BUFFER_SIZE} | @ref GL::BufferTexture::maxSize() +@def_gl{MAX_TEXTURE_LOD_BIAS} | @ref GL::AbstractTexture::maxLodBias() +@def_gl{MAX_TEXTURE_MAX_ANISOTROPY} | @ref GL::Sampler::maxMaxAnisotropy() +@def_gl{MAX_TRANSFORM_FEEDBACK_BUFFERS} | @ref GL::TransformFeedback::maxBuffers() +@def_gl{MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS} | @ref GL::TransformFeedback::maxInterleavedComponents() +@def_gl{MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS} | @ref GL::TransformFeedback::maxSeparateAttributes() +@def_gl{MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS} | @ref GL::TransformFeedback::maxSeparateComponents() +@def_gl{MAX_UNIFORM_BLOCK_SIZE} | @ref GL::AbstractShaderProgram::maxUniformBlockSize() +@def_gl{MAX_UNIFORM_BUFFER_BINDINGS} | @ref GL::Buffer::maxUniformBindings() +@def_gl{MAX_UNIFORM_LOCATIONS} | @ref GL::AbstractShaderProgram::maxUniformLocations() +@def_gl{MAX_VERTEX_ATTRIBS} | @ref GL::AbstractShaderProgram::maxVertexAttributes() @def_gl{MAX_VERTEX_ATTRIB_STRIDE} | | @def_gl{MAX_VERTEX_ATTRIB_BINDINGS} | | @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_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_MAP_BUFFER_ALIGNMENT} | @ref 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_MAP_BUFFER_ALIGNMENT} | @ref GL::Buffer::minMapAlignment() +@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_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_SHADER_BINARY_FORMATS}, \n @def_gl{SHADER_BINARY_FORMATS} | | @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{POINT_FADE_THRESHOLD_SIZE} | | @def_gl{POINT_SIZE_GRANULARITY}, \n @def_gl{POINT_SIZE_RANGE} | | -@def_gl{POINT_SIZE} | not queryable, @ref Renderer::setPointSize() setter only -@def_gl{POLYGON_OFFSET_FACTOR}, \n @def_gl{POLYGON_OFFSET_UNITS} | not queryable, @ref Renderer::setPolygonOffset() 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 GL::Renderer::setPolygonOffset() setter only @def_gl{PRIMITIVE_RESTART_INDEX} | 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{SAMPLER_BINDING} | not queryable -@def_gl{SAMPLES} | @ref Renderbuffer::maxSamples() +@def_gl{SAMPLES} | @ref GL::Renderbuffer::maxSamples() @def_gl{SAMPLE_BUFFERS} | | @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_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{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_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_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 GL::Renderer::setStencilOperation() setter only @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{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{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{VIEWPORT_BOUNDS_RANGE} | | @def_gl{VIEWPORT_INDEX_PROVOKING_VERTEX} | | @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() */ diff --git a/doc/opengl-workarounds.dox b/doc/opengl-workarounds.dox index 211adfaec..3ea3fdb4a 100644 --- a/doc/opengl-workarounds.dox +++ b/doc/opengl-workarounds.dox @@ -49,7 +49,7 @@ Using driver workarounds: These identifiers correspond to the strings in the below listing. For debugging and diagnostic purpose it's possible to disable particular workarounds by 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 diff --git a/doc/opengl-wrapping.dox b/doc/opengl-wrapping.dox index 375c10992..87873865d 100644 --- a/doc/opengl-wrapping.dox +++ b/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 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 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 @@ -52,11 +52,11 @@ moved-from state may result in OpenGL errors being generated, in some cases even application crashes. Besides the default behavior, it is possible to construct the object without -creating the underlying OpenGL object using the @ref NoCreate tag. Constructing -the object this way does not require any active context and its state is then -equivalent to the moved-from state. It is useful in case you need to construct -the object before creating context (such as class members) or if you know you -would overwrite it later with another object: +creating the underlying OpenGL object using the @ref NoCreate tag. +Constructing the object this way does not require any active context and its +state is then equivalent to the moved-from state. It is useful in case you need +to construct the object before creating context (such as class members) or if +you know you would overwrite it later with another object: @snippet MagnumGL.cpp opengl-wrapping-nocreate @@ -71,7 +71,7 @@ instance using @cpp wrap() @ce. @snippet MagnumGL.cpp opengl-wrapping-transfer 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. 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 tracks OpenGL state such as currently bound objects, activated renderer 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 @@ -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 GL version/extension is required. The information is also aggregated on @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 @@ -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 if these extensions are not available, the functionality is emulated through classic bind-to-edit approach. Other examples of extension-dependent -functionality is @ref DebugMessage "debug output" which is simply no-op when -required extensions are not available, @ref Texture::setStorage() emulation on -platforms that don't support it etc. The goal is to abstract away the (mostly -unimportant) differences for easier porting. +functionality is @ref GL::DebugMessage "debug output" which is simply no-op +when required extensions are not available, @ref GL::Texture::setStorage() +emulation on platforms that don't support it etc. The goal is to abstract away +the (mostly unimportant) differences for easier porting. @snippet MagnumGL.cpp opengl-wrapping-dsa diff --git a/doc/platforms-android.dox b/doc/platforms-android.dox index 541315eb3..180c878ed 100644 --- a/doc/platforms-android.dox +++ b/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 continue from there. Besides plain command-line apps it's also possible to 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. @section platforms-android-apps Building and installing graphics apps diff --git a/doc/platforms-gl.dox b/doc/platforms-gl.dox index bf6f4bec7..ddc9aa09f 100644 --- a/doc/platforms-gl.dox +++ b/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 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 - @ref TextureFormat::RGB32F is not possible even on NVidia. Use RGBA formats - instead. + to @ref GL::TextureFormat::RGB8 on iOS (but it works elsewhere); rendering + to @ref GL::TextureFormat::RGB32F is not possible even on NVidia. Use RGBA + formats instead. - 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 sure to match the component count. diff --git a/doc/platforms-html5.dox b/doc/platforms-html5.dox index f36c36c3e..de120a592 100644 --- a/doc/platforms-html5.dox +++ b/doc/platforms-html5.dox @@ -56,10 +56,11 @@ other target hints for UBOs etc.): @snippet MagnumGL.cpp Buffer-webgl -See @ref Buffer-webgl-restrictions "Buffer", @ref Mesh-webgl-restrictions "Mesh", -@ref Texture::setSubImage() "*Texture::setSubImage()", -@ref Mesh::addVertexBuffer(), @ref Renderer::setStencilFunction(), -@ref Renderer::setStencilMask() and @ref Renderer::setBlendFunction() +See @ref GL-Buffer-webgl-restrictions "GL::Buffer", +@ref GL-Mesh-webgl-restrictions "GL::Mesh", +@ref GL::Texture::setSubImage() "GL::*Texture::setSubImage()", +@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 WebGL specification provide even more detail: diff --git a/doc/platforms-macos.dox b/doc/platforms-macos.dox index 78493a90d..ca6588936 100644 --- a/doc/platforms-macos.dox +++ b/doc/platforms-macos.dox @@ -76,12 +76,12 @@ HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja @section platforms-macos-troubleshooting Troubleshooting -- @ref AbstractShaderProgram::validate() expects that the shader has a - properly configured framebuffer bound along with proper @ref Renderer +- @ref GL::AbstractShaderProgram::validate() expects that the shader has a + properly configured framebuffer bound along with proper @ref GL::Renderer setup. That is often hard to achieve, so the function cannot be portably used for shader validity testing. -- `GL_TIMESTAMP` used by @ref TimeQuery::timestamp() is not implemented on - macOS and gives zero results. +- `GL_TIMESTAMP` used by @ref GL::TimeQuery::timestamp() is not implemented + on macOS and gives zero results. */ diff --git a/doc/portability.dox b/doc/portability.dox index 2257c6fe8..9d73d78ff 100644 --- a/doc/portability.dox +++ b/doc/portability.dox @@ -74,15 +74,16 @@ which you can use for platform-aware code. @section portability-extensions Extension-aware code 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 -@ref Context::isExtensionSupported() and decide based on that: +@ref GL::Context::isExtensionSupported() and decide based on that: @snippet MagnumGL.cpp portability-extensions -You can also decide on particular OpenGL version using @ref Context::isVersionSupported(), -but remember that some features from that version might be available even if -the drivers don't fully expose that version. +You can also decide on particular OpenGL version using +@ref GL::Context::isVersionSupported(), but remember that some features from +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 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 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 -@ref AbstractShaderProgram-performance-optimization "AbstractShaderProgram", -@ref AbstractTexture-performance-optimization "AbstractTexture" or -@ref Mesh-performance-optimization "Mesh". See also @ref opengl-required-extensions. +@ref GL-AbstractShaderProgram-performance-optimization "AbstractShaderProgram", +@ref GL-AbstractTexture-performance-optimization "AbstractTexture" or +@ref GL-Mesh-performance-optimization "Mesh". See also @ref opengl-required-extensions. @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 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:

@@ -136,14 +137,14 @@ void main() { 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 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: @snippet MagnumGL.cpp portability-shaders-bind -See also @ref AbstractShaderProgram class documentation for information about -specifying attribute location, uniform location and texture binding unit in -various OpenGL versions. +See also @ref GL::AbstractShaderProgram class documentation for information +about specifying attribute location, uniform location and texture binding unit +in various OpenGL versions. 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 diff --git a/doc/shaders.dox b/doc/shaders.dox index f8dd5564f..2b17427cb 100644 --- a/doc/shaders.dox +++ b/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 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 -examples. Example mesh configuration for @ref Shaders::Phong shader: +position in the buffer. See @ref GL::Mesh::addVertexBuffer() for details and +usage examples. Example mesh configuration for @ref Shaders::Phong shader: @snippet MagnumShaders.cpp shaders-setup diff --git a/doc/troubleshooting.dox b/doc/troubleshooting.dox index d14808c28..ed7062b02 100644 --- a/doc/troubleshooting.dox +++ b/doc/troubleshooting.dox @@ -52,47 +52,49 @@ things: If you are experiencing so-called "black screen of death", weird behavior or 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 - @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 @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. -- If using framebuffer objects, @ref Framebuffer::checkStatus() "check that they are complete". -- Change @ref Renderer::setClearColor() "framebuffer clear color" to +- If using framebuffer objects, + @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. -- If nothing is drawn, use @ref PrimitiveQuery to check that at least some - primitives were generated. Use @ref SampleQuery to check whether fragments - were drawn. +- If nothing is drawn, use @ref GL::PrimitiveQuery to check that at least + some primitives were generated. Use @ref GL::SampleQuery to check whether + fragments were drawn. - Verify that the mesh is properly set up --- nonzero vertex/index count, - matching type in buffer and @ref Mesh::addVertexBuffer() "vertex specification", - properly set up @ref Mesh::setIndexBuffer() "index buffer" and index count - for indexed mesh. If you specified index range, be sure that all indices - fall into it, otherwise you would get undefined behavior. -- Try disabling @ref Renderer::Feature::DepthTest "depth test", - @ref Renderer::Feature::FaceCulling "face culling" and other renderer + matching type in buffer and @ref GL::Mesh::addVertexBuffer() "vertex specification", + properly set up @ref GL::Mesh::setIndexBuffer() "index buffer" and index + count for indexed mesh. If you specified index range, be sure that all + indices fall into it, otherwise you would get undefined behavior. +- Try disabling @ref GL::Renderer::Feature::DepthTest "depth test", + @ref GL::Renderer::Feature::FaceCulling "face culling" and other renderer features that might affect the fragments. - 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 proper places. -- @ref AbstractShaderProgram::validate() "Validate the shader", check that - all used uniforms and attributes have proper locations. Try reducing it - until it is able to draw something, possibly also with some simpler mesh. +- @ref GL::AbstractShaderProgram::validate() "Validate the shader", check + that all used uniforms and attributes have proper locations. Try reducing + 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 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 - tracker. The other library also needs to be aware of this fact (either - setting all state explicitly every time or having similar ability to reset - its state tracker), otherwise you may need to save and restore GL state - manually for that library to work. + Magnum. You can use @ref GL::Context::resetState() to reset the internal + state tracker. The other library also needs to be aware of this fact + (either setting all state explicitly every time or having similar ability + to reset its state tracker), otherwise you may need to save and restore GL + state manually for that library to work. @section troubleshooting-debugging Debugging rendering -- Enable @ref DebugMessage "debug output" to see additional performance hints - and implementation-dependent information. -- Use @ref TimeQuery to find hot spots in the rendering code. -- @ref DebugMessage::insert() "Mark relevant parts of code" to find them +- Enable @ref GL::DebugMessage "debug output" to see additional performance + hints and implementation-dependent information. +- Use @ref GL::TimeQuery to find hot spots in the rendering code. +- @ref GL::DebugMessage::insert() "Mark relevant parts of code" to find them easier in the debugger. - Use ApiTrace to trace the program call by call, verify buffer and texture contents, vertex binding and count of generated primitives, rendered diff --git a/src/Magnum/DebugTools/Test/CompareImageTest.cpp b/src/Magnum/DebugTools/Test/CompareImageTest.cpp index e113b22de..f916ee356 100644 --- a/src/Magnum/DebugTools/Test/CompareImageTest.cpp +++ b/src/Magnum/DebugTools/Test/CompareImageTest.cpp @@ -305,7 +305,7 @@ void CompareImageTest::compareDifferentFormat() { 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() { @@ -321,7 +321,7 @@ void CompareImageTest::compareDifferentType() { 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() { diff --git a/src/Magnum/GL/AbstractFramebuffer.cpp b/src/Magnum/GL/AbstractFramebuffer.cpp index cf80654d7..f9b5c3dda 100644 --- a/src/Magnum/GL/AbstractFramebuffer.cpp +++ b/src/Magnum/GL/AbstractFramebuffer.cpp @@ -45,7 +45,7 @@ #include "Magnum/GL/Implementation/FramebufferState.h" #include "Magnum/GL/Implementation/State.h" -namespace Magnum { +namespace Magnum { namespace GL { Vector2i AbstractFramebuffer::maxViewportSize() { Vector2i& value = Context::current().state().framebuffer->maxViewportSize; @@ -298,7 +298,7 @@ void AbstractFramebuffer::read(const Range2Di& rectangle, Image2D& image) { bindInternal(FramebufferTarget::Read); /* 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 data{image.release()}; if(data.size() < dataSize) data = Containers::Array{dataSize}; @@ -325,7 +325,7 @@ void AbstractFramebuffer::read(const Range2Di& rectangle, BufferImage2D& image, bindInternal(FramebufferTarget::Read); /* 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) image.setData(image.storage(), image.format(), image.type(), rectangle.size(), {nullptr, dataSize}, usage); else @@ -344,7 +344,7 @@ BufferImage2D AbstractFramebuffer::read(const Range2Di& rectangle, BufferImage2D #ifndef MAGNUM_TARGET_GLES 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); texture.bindInternal(); 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 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); Context::current().state().framebuffer->copySub1DImplementation(rectangle, texture, level, offset); } @@ -677,4 +677,4 @@ void AbstractFramebuffer::copySub3DImplementationDSAEXT(const Range2Di& rectangl } #endif -} +}} diff --git a/src/Magnum/GL/AbstractFramebuffer.h b/src/Magnum/GL/AbstractFramebuffer.h index 84677e2ab..b96b5c24e 100644 --- a/src/Magnum/GL/AbstractFramebuffer.h +++ b/src/Magnum/GL/AbstractFramebuffer.h @@ -26,7 +26,7 @@ */ /** @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 @@ -35,7 +35,7 @@ #include "Magnum/GL/AbstractObject.h" #include "Magnum/Math/Range.h" -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Mask for framebuffer clearing @@ -143,7 +143,7 @@ namespace Implementation { struct FramebufferState; } 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 unnecessary calls to @fn_gl_keyword{BindFramebuffer} and @fn_gl{Viewport} when @@ -822,6 +822,6 @@ CORRADE_ENUMSET_OPERATORS(FramebufferClearMask) CORRADE_ENUMSET_OPERATORS(FramebufferBlitMask) #endif -} +}} #endif diff --git a/src/Magnum/GL/AbstractObject.cpp b/src/Magnum/GL/AbstractObject.cpp index 9ec47f725..065dbf646 100644 --- a/src/Magnum/GL/AbstractObject.cpp +++ b/src/Magnum/GL/AbstractObject.cpp @@ -35,7 +35,7 @@ #include "Magnum/GL/Implementation/DebugState.h" #endif -namespace Magnum { +namespace Magnum { namespace GL { #ifndef MAGNUM_TARGET_WEBGL namespace { @@ -198,4 +198,4 @@ std::string AbstractObject::getLabelImplementationExt(const GLenum identifier, c } #endif -} +}} diff --git a/src/Magnum/GL/AbstractObject.h b/src/Magnum/GL/AbstractObject.h index 7e293dafa..4a1792563 100644 --- a/src/Magnum/GL/AbstractObject.h +++ b/src/Magnum/GL/AbstractObject.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::AbstractObject + * @brief Class @ref Magnum::GL::AbstractObject */ #include @@ -36,7 +36,7 @@ #include "Magnum/GL/OpenGL.h" #include "Magnum/GL/visibility.h" -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { struct DebugState; } @@ -131,6 +131,6 @@ class MAGNUM_GL_EXPORT AbstractObject { CORRADE_ENUMSET_OPERATORS(ObjectFlags) -} +}} #endif diff --git a/src/Magnum/GL/AbstractQuery.cpp b/src/Magnum/GL/AbstractQuery.cpp index 38b51ab95..b8878b0fd 100644 --- a/src/Magnum/GL/AbstractQuery.cpp +++ b/src/Magnum/GL/AbstractQuery.cpp @@ -34,7 +34,7 @@ #include "Magnum/GL/Implementation/QueryState.h" #include "Magnum/GL/Implementation/State.h" -namespace Magnum { +namespace Magnum { namespace GL { AbstractQuery::AbstractQuery(GLenum target): _target{target}, _flags{ObjectFlag::DeleteOnDestruction} { (this->*Context::current().state().query->createImplementation)(); @@ -161,4 +161,4 @@ void AbstractQuery::end() { #endif } -} +}} diff --git a/src/Magnum/GL/AbstractQuery.h b/src/Magnum/GL/AbstractQuery.h index bd33764cb..f6179ff2a 100644 --- a/src/Magnum/GL/AbstractQuery.h +++ b/src/Magnum/GL/AbstractQuery.h @@ -27,7 +27,7 @@ #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) /** @file - * @brief Class @ref Magnum::AbstractQuery + * @brief Class @ref Magnum::GL::AbstractQuery */ #endif @@ -40,7 +40,7 @@ #include "Magnum/configure.h" #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { struct QueryState; } @@ -224,7 +224,7 @@ inline GLuint AbstractQuery::release() { return id; } -} +}} #else #error this header is not available in WebGL 1.0 build #endif diff --git a/src/Magnum/GL/AbstractShaderProgram.cpp b/src/Magnum/GL/AbstractShaderProgram.cpp index b9d2e98f5..4fb4a10a9 100644 --- a/src/Magnum/GL/AbstractShaderProgram.cpp +++ b/src/Magnum/GL/AbstractShaderProgram.cpp @@ -37,7 +37,7 @@ #include "Magnum/GL/Implementation/State.h" #include "Magnum/Math/RectangularMatrix.h" -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { /* Defined in Implementation/driverSpecific.cpp */ @@ -440,7 +440,7 @@ bool AbstractShaderProgram::link(std::initializer_list name) { const GLint location = glGetUniformLocation(_id, name); 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; } @@ -448,7 +448,7 @@ Int AbstractShaderProgram::uniformLocationInternal(const Containers::ArrayView name) { const GLuint index = glGetUniformBlockIndex(_id, name); 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; } #endif @@ -1103,4 +1103,4 @@ void AbstractShaderProgram::uniformImplementationDSAEXT(const GLint location, co } #endif -} +}} diff --git a/src/Magnum/GL/AbstractShaderProgram.h b/src/Magnum/GL/AbstractShaderProgram.h index 7eb022350..adf3e2847 100644 --- a/src/Magnum/GL/AbstractShaderProgram.h +++ b/src/Magnum/GL/AbstractShaderProgram.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::AbstractShaderProgram + * @brief Class @ref Magnum::GL::AbstractShaderProgram */ #include @@ -42,14 +42,14 @@ #include #endif -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { struct ShaderProgramState; } /** @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 functions and properties: @@ -89,7 +89,7 @@ functions and properties: @snippet MagnumGL.cpp AbstractShaderProgram-xfb -@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 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} 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 code, e.g.: @@ -190,7 +190,7 @@ uniform mat3 normalMatrix; @requires_gles Explicit uniform location is not supported in WebGL. Use @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 shader code, e.g.: @@ -240,7 +240,7 @@ layout(std140) uniform material { @requires_gles Explicit uniform block binding is not supported in WebGL. Use @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 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_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 shader code, e.g.: @@ -295,7 +295,7 @@ uniform sampler2D specularTexture; @requires_gles Explicit texture binding unit is not supported in WebGL. Use @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 shader code, e.g.: @@ -339,24 +339,24 @@ out vec3 velocity; in OpenGL ES or WebGL. @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 -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 -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 specific framebuffer (if needed) and then call @ref Mesh::draw(). Example: @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 setting functions as needed. After setting up required parameters call @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 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 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 @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} * @deprecated_gl Preferred usage is to specify attribute location * 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. */ void bindAttributeLocation(UnsignedInt location, const std::string& name) { @@ -837,7 +837,7 @@ class MAGNUM_GL_EXPORT AbstractShaderProgram: public AbstractObject { * @see @fn_gl_keyword{BindFragDataLocationIndexed} * @deprecated_gl Preferred usage is to specify attribute location * 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. * @requires_gl33 Extension @extension{ARB,blend_func_extended} * @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} * @deprecated_gl Preferred usage is to specify attribute location * 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. * @requires_gl30 Extension @extension{EXT,gpu_shader4} * @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} * @deprecated_gl Preferred usage is to specify transform feedback * 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. * @requires_gl30 Extension @extension{EXT,transform_feedback} * @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} * @deprecated_gl Preferred usage is to specify uniform location * 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. */ 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. * @deprecated_gl Preferred usage is to specify uniform block binding * 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. */ 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. * @deprecated_gl Preferred usage is to specify uniform block binding * 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. */ void setUniformBlockBinding(UnsignedInt index, UnsignedInt binding) { @@ -1300,6 +1300,6 @@ class MAGNUM_GL_EXPORT AbstractShaderProgram: public AbstractObject { #endif }; -} +}} #endif diff --git a/src/Magnum/GL/AbstractTexture.cpp b/src/Magnum/GL/AbstractTexture.cpp index 07dd3441d..0b298ca49 100644 --- a/src/Magnum/GL/AbstractTexture.cpp +++ b/src/Magnum/GL/AbstractTexture.cpp @@ -44,7 +44,7 @@ #include "Magnum/Math/Color.h" #include "Magnum/Math/Range.h" -namespace Magnum { +namespace Magnum { namespace GL { #ifndef MAGNUM_TARGET_GLES2 Float AbstractTexture::maxLodBias() { @@ -1691,7 +1691,7 @@ void AbstractTexture::invalidateSubImageImplementationARB(GLint level, const Vec #ifndef MAGNUM_TARGET_GLES template void AbstractTexture::image(GLint level, Image& image) { const Math::Vector size = DataHelper::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 */ Containers::Array data{image.release()}; @@ -1710,7 +1710,7 @@ template void MAGNUM_GL_EXPORT AbstractTexture::image<3>(GLint, Image<3>&); template void AbstractTexture::image(GLint level, BufferImage& image, BufferUsage usage) { const Math::Vector size = DataHelper::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 */ if(image.dataSize() < dataSize) @@ -1737,7 +1737,7 @@ template void AbstractTexture::compressedImage(const GLi GLint textureDataSize; (this->*Context::current().state().texture->getLevelParameterivImplementation)(level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &textureDataSize); dataSize = textureDataSize; - } else dataSize = Implementation::compressedImageDataSizeFor(image, size); + } else dataSize = Magnum::Implementation::compressedImageDataSizeFor(image, size); /* Internal texture format */ GLint format; @@ -1768,7 +1768,7 @@ template void AbstractTexture::compressedImage(const GLi GLint textureDataSize; (this->*Context::current().state().texture->getLevelParameterivImplementation)(level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &textureDataSize); dataSize = textureDataSize; - } else dataSize = Implementation::compressedImageDataSizeFor(image, size); + } else dataSize = Magnum::Implementation::compressedImageDataSizeFor(image, size); /* Internal texture format */ GLint format; @@ -1793,7 +1793,7 @@ template void AbstractTexture::subImage(const GLint leve createIfNotAlready(); const Math::Vector 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 paddedSize = Vector3i::pad(size, 1); @@ -1816,7 +1816,7 @@ template void AbstractTexture::subImage(const GLint leve createIfNotAlready(); const Math::Vector 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 paddedSize = Vector3i::pad(size, 1); @@ -1860,7 +1860,7 @@ template void AbstractTexture::compressedSubImage(const std::size_t dataSize; if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) dataSize = compressedSubImageSize(TextureFormat(format), size); - else dataSize = Implementation::compressedImageDataSizeFor(image, size); + else dataSize = Magnum::Implementation::compressedImageDataSizeFor(image, size); /* Reallocate only if needed */ Containers::Array data{image.release()}; @@ -1894,7 +1894,7 @@ template void AbstractTexture::compressedSubImage(const std::size_t dataSize; if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) dataSize = compressedSubImageSize(TextureFormat(format), size); - else dataSize = Implementation::compressedImageDataSizeFor(image, size); + else dataSize = Magnum::Implementation::compressedImageDataSizeFor(image, size); /* Reallocate only if needed */ if(image.dataSize() < dataSize) @@ -2001,7 +2001,7 @@ void AbstractTexture::DataHelper<1>::setCompressedImage(AbstractTexture& texture Buffer::unbindInternal(Buffer::TargetHint::PixelUnpack); image.storage().applyUnpack(); 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) { @@ -2015,7 +2015,7 @@ void AbstractTexture::DataHelper<1>::setCompressedImage(AbstractTexture& texture image.buffer().bindInternal(Buffer::TargetHint::PixelUnpack); image.storage().applyUnpack(); 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) { @@ -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) { Buffer::unbindInternal(Buffer::TargetHint::PixelUnpack); 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) { @@ -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) { image.buffer().bindInternal(Buffer::TargetHint::PixelUnpack); 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 @@ -2050,7 +2050,7 @@ void AbstractTexture::DataHelper<2>::setImage(AbstractTexture& texture, const GL image.storage().applyUnpack(); (texture.*Context::current().state().texture->image2DImplementation)(target, level, internalFormat, image.size(), image.format(), image.type(), image.data() #ifdef MAGNUM_TARGET_GLES2 - + Implementation::pixelStorageSkipOffset(image) + + Magnum::Implementation::pixelStorageSkipOffset(image) #endif , image.storage()); } @@ -2065,7 +2065,7 @@ void AbstractTexture::DataHelper<2>::setCompressedImage(AbstractTexture& texture image.storage().applyUnpack(); #endif 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 @@ -2084,7 +2084,7 @@ void AbstractTexture::DataHelper<2>::setCompressedImage(AbstractTexture& texture image.storage().applyUnpack(); #endif 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 @@ -2095,7 +2095,7 @@ void AbstractTexture::DataHelper<2>::setSubImage(AbstractTexture& texture, const image.storage().applyUnpack(); (texture.*Context::current().state().texture->subImage2DImplementation)(level, offset, image.size(), image.format(), image.type(), image.data() #ifdef MAGNUM_TARGET_GLES2 - + Implementation::pixelStorageSkipOffset(image) + + Magnum::Implementation::pixelStorageSkipOffset(image) #endif , image.storage()); } @@ -2109,7 +2109,7 @@ void AbstractTexture::DataHelper<2>::setCompressedSubImage(AbstractTexture& text to reset anything */ image.storage().applyUnpack(); #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 @@ -2126,7 +2126,7 @@ void AbstractTexture::DataHelper<2>::setCompressedSubImage(AbstractTexture& text to reset anything */ image.storage().applyUnpack(); #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 @@ -2138,7 +2138,7 @@ void AbstractTexture::DataHelper<3>::setImage(AbstractTexture& texture, const GL image.storage().applyUnpack(); (texture.*Context::current().state().texture->image3DImplementation)(level, internalFormat, image.size(), image.format(), image.type(), image.data() #ifdef MAGNUM_TARGET_GLES2 - + Implementation::pixelStorageSkipOffset(image) + + Magnum::Implementation::pixelStorageSkipOffset(image) #endif , image.storage()); } @@ -2154,9 +2154,9 @@ void AbstractTexture::DataHelper<3>::setCompressedImage(AbstractTexture& texture #endif texture.bindInternal(); #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 - 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 @@ -2177,7 +2177,7 @@ void AbstractTexture::DataHelper<3>::setCompressedImage(AbstractTexture& texture image.storage().applyUnpack(); #endif 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 @@ -2189,7 +2189,7 @@ void AbstractTexture::DataHelper<3>::setSubImage(AbstractTexture& texture, const image.storage().applyUnpack(); (texture.*Context::current().state().texture->subImage3DImplementation)(level, offset, image.size(), image.format(), image.type(), image.data() #ifdef MAGNUM_TARGET_GLES2 - + Implementation::pixelStorageSkipOffset(image) + + Magnum::Implementation::pixelStorageSkipOffset(image) #endif , image.storage()); } @@ -2203,7 +2203,7 @@ void AbstractTexture::DataHelper<3>::setCompressedSubImage(AbstractTexture& text to reset anything */ image.storage().applyUnpack(); #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 @@ -2221,7 +2221,7 @@ void AbstractTexture::DataHelper<3>::setCompressedSubImage(AbstractTexture& text to reset anything */ image.storage().applyUnpack(); #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 @@ -2267,4 +2267,4 @@ void AbstractTexture::DataHelper<3>::setWrapping(AbstractTexture& texture, const #endif #endif -} +}} diff --git a/src/Magnum/GL/AbstractTexture.h b/src/Magnum/GL/AbstractTexture.h index f81e375bf..72b34b804 100644 --- a/src/Magnum/GL/AbstractTexture.h +++ b/src/Magnum/GL/AbstractTexture.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::AbstractTexture + * @brief Class @ref Magnum::GL::AbstractTexture */ #include @@ -37,7 +37,7 @@ #include "Magnum/GL/GL.h" #include "Magnum/GL/Sampler.h" -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { struct TextureState; @@ -61,13 +61,13 @@ Encapsulates one OpenGL texture object. See @ref Texture, @ref TextureArray, @ref BufferTexture and @ref MultisampleTexture documentation for more 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 submitted to @ref Texture::setSubImage() "*Texture::setSubImage()", see its 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 units to avoid unnecessary calls to @fn_gl_keyword{ActiveTexture}, @@ -829,6 +829,6 @@ inline GLuint AbstractTexture::release() { return id; } -} +}} #endif diff --git a/src/Magnum/GL/Attribute.cpp b/src/Magnum/GL/Attribute.cpp index 88dfe98e0..4772bfece 100644 --- a/src/Magnum/GL/Attribute.cpp +++ b/src/Magnum/GL/Attribute.cpp @@ -28,7 +28,7 @@ #include #include -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { UnsignedInt FloatAttribute::size(GLint components, DataType dataType) { switch(dataType) { @@ -143,116 +143,116 @@ Debug& operator<<(Debug& debug, SizedAttribute<1, 1>::Components value) { switch(value) { /* LCOV_EXCL_START */ case SizedAttribute<1, 1>::Components::One: - return debug << "Attribute::Components::One"; + return debug << "GL::Attribute::Components::One"; /* LCOV_EXCL_STOP */ } - return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, SizedAttribute<1, 2>::Components value) { switch(value) { /* LCOV_EXCL_START */ case SizedAttribute<1, 2>::Components::One: - return debug << "Attribute::Components::One"; + return debug << "GL::Attribute::Components::One"; case SizedAttribute<1, 2>::Components::Two: - return debug << "Attribute::Components::Two"; + return debug << "GL::Attribute::Components::Two"; /* LCOV_EXCL_STOP */ } - return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, SizedAttribute<1, 3>::Components value) { switch(value) { /* LCOV_EXCL_START */ case SizedAttribute<1, 3>::Components::One: - return debug << "Attribute::Components::One"; + return debug << "GL::Attribute::Components::One"; case SizedAttribute<1, 3>::Components::Two: - return debug << "Attribute::Components::Two"; + return debug << "GL::Attribute::Components::Two"; case SizedAttribute<1, 3>::Components::Three: - return debug << "Attribute::Components::Three"; + return debug << "GL::Attribute::Components::Three"; /* LCOV_EXCL_STOP */ } - return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, SizedAttribute<1, 4>::Components value) { switch(value) { /* LCOV_EXCL_START */ case SizedAttribute<1, 4>::Components::One: - return debug << "Attribute::Components::One"; + return debug << "GL::Attribute::Components::One"; case SizedAttribute<1, 4>::Components::Two: - return debug << "Attribute::Components::Two"; + return debug << "GL::Attribute::Components::Two"; case SizedAttribute<1, 4>::Components::Three: - return debug << "Attribute::Components::Three"; + return debug << "GL::Attribute::Components::Three"; case SizedAttribute<1, 4>::Components::Four: - return debug << "Attribute::Components::Four"; + return debug << "GL::Attribute::Components::Four"; /* LCOV_EXCL_STOP */ } - return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, SizedMatrixAttribute<2>::Components value) { switch(value) { /* LCOV_EXCL_START */ case SizedMatrixAttribute<2>::Components::Two: - return debug << "Attribute::Components::Two"; + return debug << "GL::Attribute::Components::Two"; /* LCOV_EXCL_STOP */ } - return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, SizedMatrixAttribute<3>::Components value) { switch(value) { /* LCOV_EXCL_START */ case SizedMatrixAttribute<3>::Components::Three: - return debug << "Attribute::Components::Three"; + return debug << "GL::Attribute::Components::Three"; /* LCOV_EXCL_STOP */ } - return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, SizedMatrixAttribute<4>::Components value) { switch(value) { /* LCOV_EXCL_START */ case SizedMatrixAttribute<4>::Components::Four: - return debug << "Attribute::Components::Four"; + return debug << "GL::Attribute::Components::Four"; /* LCOV_EXCL_STOP */ } - return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, Attribute>::Components value) { switch(value) { /* LCOV_EXCL_START */ case Attribute>::Components::One: - return debug << "Attribute::Components::One"; + return debug << "GL::Attribute::Components::One"; case Attribute>::Components::Two: - return debug << "Attribute::Components::Two"; + return debug << "GL::Attribute::Components::Two"; case Attribute>::Components::Three: - return debug << "Attribute::Components::Three"; + return debug << "GL::Attribute::Components::Three"; case Attribute>::Components::Four: - return debug << "Attribute::Components::Four"; + return debug << "GL::Attribute::Components::Four"; #ifndef MAGNUM_TARGET_GLES case Attribute>::Components::BGRA: - return debug << "Attribute::Components::BGRA"; + return debug << "GL::Attribute::Components::BGRA"; #endif /* LCOV_EXCL_STOP */ } - return debug << "Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::Components(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, FloatAttribute::DataType value) { switch(value) { /* 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(Byte) _c(UnsignedShort) @@ -268,14 +268,14 @@ Debug& operator<<(Debug& debug, FloatAttribute::DataType value) { /* LCOV_EXCL_STOP */ } - return debug << "Attribute::DataType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::DataType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #ifndef MAGNUM_TARGET_GLES2 Debug& operator<<(Debug& debug, IntAttribute::DataType value) { switch(value) { /* 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(Byte) _c(UnsignedShort) @@ -286,7 +286,7 @@ Debug& operator<<(Debug& debug, IntAttribute::DataType value) { /* LCOV_EXCL_STOP */ } - return debug << "Attribute::DataType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::DataType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif @@ -294,20 +294,20 @@ Debug& operator<<(Debug& debug, IntAttribute::DataType value) { Debug& operator<<(Debug& debug, DoubleAttribute::DataType value) { switch(value) { /* 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) #undef _c /* LCOV_EXCL_STOP */ } - return debug << "Attribute::DataType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::DataType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif Debug& operator<<(Debug& debug, Attribute>::DataType value) { switch(value) { /* LCOV_EXCL_START */ - #define _c(value) case Attribute>::DataType::value: return debug << "Attribute::DataType::" #value; + #define _c(value) case Attribute>::DataType::value: return debug << "GL::Attribute::DataType::" #value; _c(UnsignedByte) _c(Byte) _c(UnsignedShort) @@ -324,13 +324,13 @@ Debug& operator<<(Debug& debug, Attribute>::DataType valu /* LCOV_EXCL_STOP */ } - return debug << "Attribute::DataType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::DataType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, Attribute>::DataType value) { switch(value) { /* LCOV_EXCL_START */ - #define _c(value) case Attribute>::DataType::value: return debug << "Attribute::DataType::" #value; + #define _c(value) case Attribute>::DataType::value: return debug << "GL::Attribute::DataType::" #value; _c(UnsignedByte) _c(Byte) _c(UnsignedShort) @@ -350,7 +350,7 @@ Debug& operator<<(Debug& debug, Attribute>::DataType valu /* LCOV_EXCL_STOP */ } - return debug << "Attribute::DataType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Attribute::DataType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } -}} +}}} diff --git a/src/Magnum/GL/Attribute.h b/src/Magnum/GL/Attribute.h index 59f257635..7fb390a74 100644 --- a/src/Magnum/GL/Attribute.h +++ b/src/Magnum/GL/Attribute.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Attribute + * @brief Class @ref Magnum::GL::Attribute */ #include @@ -35,7 +35,7 @@ #include "Magnum/GL/OpenGL.h" #include "Magnum/GL/visibility.h" -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { template 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 -- @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. -See @ref AbstractShaderProgram-subclassing for example usage in shaders and -@ref Mesh-configuration for example usage when adding vertex buffers to mesh. +See @ref GL-AbstractShaderProgram-subclassing for example usage in shaders and +@ref GL-Mesh-configuration for example usage when adding vertex buffers to +mesh. */ template class Attribute { public: @@ -305,10 +306,10 @@ template class Attribute { }; #ifdef DOXYGEN_GENERATING_OUTPUT -/** @debugoperatorclassenum{Magnum::Attribute,Magnum::Attribute::Components} */ +/** @debugoperatorclassenum{Attribute,Attribute::Components} */ template Debug& operator<<(Debug& debug, Attribute::Components); -/** @debugoperatorclassenum{Magnum::Attribute,Magnum::Attribute::DataType} */ +/** @debugoperatorclassenum{Attribute,Attribute::DataType} */ template Debug& operator<<(Debug& debug, Attribute::DataType); #endif @@ -795,6 +796,6 @@ template struct Attribute>: Attribute(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Buffer::TargetHint(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #ifndef MAGNUM_TARGET_GLES2 Debug& operator<<(Debug& debug, Buffer::Target 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 _c(AtomicCounter) _c(ShaderStorage) @@ -626,9 +626,9 @@ Debug& operator<<(Debug& debug, Buffer::Target value) { #undef _c } - return debug << "Buffer::Target(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Buffer::Target(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif #endif -} +}} diff --git a/src/Magnum/GL/Buffer.h b/src/Magnum/GL/Buffer.h index 277c6a071..85a2d7ba9 100644 --- a/src/Magnum/GL/Buffer.h +++ b/src/Magnum/GL/Buffer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Buffer, enum @ref Magnum::BufferUsage + * @brief Class @ref Magnum::GL::Buffer, enum @ref Magnum::GL::BufferUsage */ #include @@ -45,7 +45,7 @@ #include #endif -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Buffer usage @@ -141,7 +141,7 @@ namespace Implementation { struct BufferState; } Encapsulates one OpenGL buffer object and provides functions for convenient 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() 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 -@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 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 -@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 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 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 @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 * @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) * 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) #endif -/** @debugoperatorclassenum{Magnum::Buffer,Magnum::Buffer::TargetHint} */ +/** @debugoperatorclassenum{Buffer,Buffer::TargetHint} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Buffer::TargetHint value); #ifndef MAGNUM_TARGET_GLES2 -/** @debugoperatorclassenum{Magnum::Buffer,Magnum::Buffer::Target} */ +/** @debugoperatorclassenum{Buffer,Buffer::Target} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Buffer::Target value); #endif @@ -1376,6 +1376,6 @@ template Containers::Array inline Buffer::subData(const GLintptr off CORRADE_IGNORE_DEPRECATED_POP #endif -} +}} #endif diff --git a/src/Magnum/GL/BufferImage.cpp b/src/Magnum/GL/BufferImage.cpp index df0645aff..b1fc22eea 100644 --- a/src/Magnum/GL/BufferImage.cpp +++ b/src/Magnum/GL/BufferImage.cpp @@ -27,16 +27,16 @@ #include "Magnum/GL/PixelFormat.h" -namespace Magnum { +namespace Magnum { namespace GL { #ifndef MAGNUM_TARGET_GLES2 template BufferImage::BufferImage(const PixelStorage storage, const PixelFormat format, const PixelType type, const VectorTypeFor& size, Containers::ArrayView 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); } template BufferImage::BufferImage(const PixelStorage storage, const PixelFormat format, const PixelType type, const VectorTypeFor& 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 BufferImage::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 void BufferImage::setData(const Pix /* Keep the old storage if zero-sized nullptr buffer was passed */ 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 { - 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); _dataSize = data.size(); } @@ -132,4 +132,4 @@ template class MAGNUM_GL_EXPORT CompressedBufferImage<3>; #endif #endif -} +}} diff --git a/src/Magnum/GL/BufferImage.h b/src/Magnum/GL/BufferImage.h index a78586af0..147be6f9b 100644 --- a/src/Magnum/GL/BufferImage.h +++ b/src/Magnum/GL/BufferImage.h @@ -27,7 +27,7 @@ #ifndef MAGNUM_TARGET_GLES2 /** @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 @@ -36,7 +36,7 @@ #include "Magnum/GL/Buffer.h" #include "Magnum/Math/Vector4.h" -namespace Magnum { +namespace Magnum { namespace GL { #ifndef MAGNUM_TARGET_GLES2 /** @@ -160,7 +160,7 @@ template class BufferImage { * See @ref PixelStorage::dataProperties() for more information. */ std::tuple, VectorTypeFor, std::size_t> dataProperties() const { - return Implementation::imageDataProperties(*this); + return Magnum::Implementation::imageDataProperties(*this); } /** @brief Currently allocated data size */ @@ -366,7 +366,7 @@ template class CompressedBufferImage { * WebGL. */ std::tuple, VectorTypeFor, std::size_t> dataProperties() const { - return Implementation::compressedImageDataProperties(*this); + return Magnum::Implementation::compressedImageDataProperties(*this); } #endif @@ -489,6 +489,6 @@ template inline void CompressedBufferImage:: #error this header is not available in OpenGL ES 2.0 build #endif -} +}} #endif diff --git a/src/Magnum/GL/BufferTexture.cpp b/src/Magnum/GL/BufferTexture.cpp index ef702a0e1..cce2a71b2 100644 --- a/src/Magnum/GL/BufferTexture.cpp +++ b/src/Magnum/GL/BufferTexture.cpp @@ -32,7 +32,7 @@ #include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/TextureState.h" -namespace Magnum { +namespace Magnum { namespace GL { Int BufferTexture::maxSize() { #ifndef MAGNUM_TARGET_GLES @@ -124,5 +124,5 @@ void BufferTexture::setBufferRangeImplementationDSAEXT(BufferTextureFormat inter } #endif -} +}} #endif diff --git a/src/Magnum/GL/BufferTexture.h b/src/Magnum/GL/BufferTexture.h index c313a7a80..80e8ed955 100644 --- a/src/Magnum/GL/BufferTexture.h +++ b/src/Magnum/GL/BufferTexture.h @@ -27,14 +27,14 @@ #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) /** @file - * @brief Class @ref Magnum::BufferTexture + * @brief Class @ref Magnum::GL::BufferTexture */ #endif #include "Magnum/GL/AbstractTexture.h" #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Buffer texture @@ -42,7 +42,7 @@ namespace Magnum { This texture is, unlike classic textures such as @ref Texture, used as simple 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 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 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 @extension{EXT,direct_state_access} is available, @ref setBuffer() functions use DSA to avoid unnecessary calls to @fn_gl{ActiveTexture} and @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. @see @ref Texture, @ref TextureArray, @ref CubeMapTexture, @@ -242,7 +242,7 @@ class MAGNUM_GL_EXPORT BufferTexture: public AbstractTexture { #endif }; -} +}} #else #error this header is not available in OpenGL ES 2.0 and WebGL build #endif diff --git a/src/Magnum/GL/BufferTextureFormat.h b/src/Magnum/GL/BufferTextureFormat.h index f861afee0..f9fbd1e56 100644 --- a/src/Magnum/GL/BufferTextureFormat.h +++ b/src/Magnum/GL/BufferTextureFormat.h @@ -27,14 +27,14 @@ #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) /** @file - * @brief Enum @ref Magnum::BufferTextureFormat + * @brief Enum @ref Magnum::GL::BufferTextureFormat */ #endif #include "Magnum/GL/OpenGL.h" #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Internal buffer texture format @@ -171,7 +171,7 @@ enum class BufferTextureFormat: GLenum { RGBA32F = GL_RGBA32F }; -} +}} #else #error this header is not available in OpenGL ES 2.0 and WebGL build #endif diff --git a/src/Magnum/GL/Context.cpp b/src/Magnum/GL/Context.cpp index adad03dfe..8d8116aa7 100644 --- a/src/Magnum/GL/Context.cpp +++ b/src/Magnum/GL/Context.cpp @@ -61,7 +61,7 @@ #include "Magnum/GL/Implementation/TransformFeedbackState.h" #endif -namespace Magnum { +namespace Magnum { namespace GL { const std::vector& Extension::extensions(Version version) { #define _extension(prefix, vendor, extension) \ @@ -445,7 +445,7 @@ namespace { bool Context::hasCurrent() { return currentContext; } Context& Context::current() { - CORRADE_ASSERT(currentContext, "Context::current(): no current context", *currentContext); + CORRADE_ASSERT(currentContext, "GL::Context::current(): no current context", *currentContext); return *currentContext; } @@ -521,7 +521,7 @@ bool Context::tryCreate() { #else const std::string version = versionString(); if(version.find("WebGL 2") == std::string::npos) { - Error() << "Context: unsupported version string:" << version; + Error{} << "GL::Context: unsupported version string:" << version; return false; } majorVersion = 3; @@ -543,7 +543,7 @@ bool Context::tryCreate() { { #ifndef MAGNUM_TARGET_GLES2 CORRADE_ASSERT(versionNumberError == Renderer::Error::InvalidEnum, - "Context: cannot retrieve OpenGL version:" << versionNumberError, false); + "GL::Context: cannot retrieve OpenGL version:" << versionNumberError, false); #endif /* Allow ES2 context on driver that reports ES3 as supported */ @@ -567,20 +567,20 @@ bool Context::tryCreate() { minorVersion = 0; #endif } else { - Error() << "Context: unsupported version string:" << version; + Error{} << "GL::Context: unsupported version string:" << version; return false; } } #endif /* Compose the version enum */ - _version = Magnum::version(majorVersion, minorVersion); + _version = GL::version(majorVersion, minorVersion); /* Check that version retrieval went right */ #ifndef CORRADE_NO_ASSERT const auto error = Renderer::error(); CORRADE_ASSERT(error == Renderer::Error::NoError, - "Context: cannot retrieve OpenGL version:" << error, false); + "GL::Context: cannot retrieve OpenGL version:" << error, false); #endif /* Check that the version is supported (now it probably is, but be sure) */ @@ -593,9 +593,9 @@ bool Context::tryCreate() { #endif { #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 - Error() << "Context: unsupported OpenGL ES version" << std::make_pair(majorVersion, minorVersion); + Error{} << "GL::Context: unsupported OpenGL ES version" << std::make_pair(majorVersion, minorVersion); #endif /* Reset the version so the context is not marked as successfully created */ @@ -678,7 +678,7 @@ bool Context::tryCreate() { setupDriverWorkarounds(); /* 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; /* 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) { switch(value) { /* 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(NoError) #ifndef MAGNUM_TARGET_GLES2 @@ -896,11 +896,11 @@ Debug& operator<<(Debug& debug, const Context::Flag value) { /* LCOV_EXCL_STOP */ } - return debug << "Context::Flag(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Context::Flag(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } 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::NoError, #ifndef MAGNUM_TARGET_GLES2 @@ -913,7 +913,7 @@ Debug& operator<<(Debug& debug, const Context::Flags value) { Debug& operator<<(Debug& debug, const Context::DetectedDriver value) { switch(value) { /* 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 _c(Amd) #endif @@ -932,11 +932,11 @@ Debug& operator<<(Debug& debug, const Context::DetectedDriver value) { /* LCOV_EXCL_STOP */ } - return debug << "Context::DetectedDriver(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Context::DetectedDriver(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } 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 Context::DetectedDriver::Amd, #endif @@ -955,4 +955,4 @@ Debug& operator<<(Debug& debug, const Context::DetectedDrivers value) { } #endif -} +}} diff --git a/src/Magnum/GL/Context.h b/src/Magnum/GL/Context.h index 0ea1f3b73..531b25d79 100644 --- a/src/Magnum/GL/Context.h +++ b/src/Magnum/GL/Context.h @@ -26,7 +26,7 @@ */ /** @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 @@ -45,6 +45,10 @@ namespace Magnum { +namespace Platform { class Context; } + +namespace GL { + namespace Implementation { struct ContextState; struct State; @@ -61,8 +65,6 @@ namespace Implementation { }; } -namespace Platform { class Context; } - /** @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 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 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) #ifndef MAGNUM_TARGET_WEBGL -/** @debugoperatorclassenum{Magnum::Context,Magnum::Context::Flag} */ +/** @debugoperatorclassenum{Context,Context::Flag} */ 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); #endif -/** @debugoperatorclassenum{Magnum::Context,Magnum::Context::DetectedDriver} */ +/** @debugoperatorclassenum{Context,Context::DetectedDriver} */ 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); /** @hideinitializer @@ -700,7 +702,7 @@ Example usage: @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 CORRADE_INTERNAL_ASSERT() */ @@ -718,7 +720,7 @@ Example usage: /** @hideinitializer @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) Useful for initial checks on availability of required features. @@ -745,6 +747,6 @@ Example usage: } while(0) #endif -} +}} #endif diff --git a/src/Magnum/GL/CubeMapTexture.cpp b/src/Magnum/GL/CubeMapTexture.cpp index 254339b4b..72bb2afbc 100644 --- a/src/Magnum/GL/CubeMapTexture.cpp +++ b/src/Magnum/GL/CubeMapTexture.cpp @@ -34,7 +34,7 @@ #include "Magnum/GL/Implementation/State.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 && 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(); 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 */ Containers::Array data{image.release()}; @@ -86,7 +86,7 @@ void CubeMapTexture::image(const Int level, BufferImage3D& image, const BufferUs createIfNotAlready(); 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 */ if(image.dataSize() < dataSize) @@ -115,7 +115,7 @@ void CubeMapTexture::compressedImage(const Int level, CompressedImage3D& image) if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) { dataOffset = 0; 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 */ GLint format; @@ -148,7 +148,7 @@ void CubeMapTexture::compressedImage(const Int level, CompressedBufferImage3D& i if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) { dataOffset = 0; 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 */ GLint format; @@ -172,7 +172,7 @@ CompressedBufferImage3D CubeMapTexture::compressedImage(const Int level, Compres void CubeMapTexture::image(const CubeMapCoordinate coordinate, const Int level, Image2D& image) { 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 */ Containers::Array 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) { 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 */ if(image.dataSize() < dataSize) @@ -219,7 +219,7 @@ void CubeMapTexture::compressedImage(const CubeMapCoordinate coordinate, const I if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) dataSize = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level); else - dataSize = Implementation::compressedImageDataSizeFor(image, size); + dataSize = Magnum::Implementation::compressedImageDataSizeFor(image, size); /* Internal texture format */ GLint format; @@ -250,7 +250,7 @@ void CubeMapTexture::compressedImage(const CubeMapCoordinate coordinate, const I if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) dataSize = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level); else - dataSize = Implementation::compressedImageDataSizeFor(image, size); + dataSize = Magnum::Implementation::compressedImageDataSizeFor(image, size); /* Internal texture format */ GLint format; @@ -315,7 +315,7 @@ CubeMapTexture& CubeMapTexture::setCompressedSubImage(const Int level, const Vec Buffer::unbindInternal(Buffer::TargetHint::PixelUnpack); 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; } @@ -324,7 +324,7 @@ CubeMapTexture& CubeMapTexture::setCompressedSubImage(const Int level, const Vec image.buffer().bindInternal(Buffer::TargetHint::PixelUnpack); 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; } #endif @@ -336,7 +336,7 @@ CubeMapTexture& CubeMapTexture::setSubImage(const CubeMapCoordinate coordinate, image.storage().applyUnpack(); (this->*Context::current().state().texture->cubeSubImageImplementation)(coordinate, level, offset, image.size(), image.format(), image.type(), image.data() #ifdef MAGNUM_TARGET_GLES2 - + Implementation::pixelStorageSkipOffset(image) + + Magnum::Implementation::pixelStorageSkipOffset(image) #endif ); return *this; @@ -360,7 +360,7 @@ CubeMapTexture& CubeMapTexture::setCompressedSubImage(const CubeMapCoordinate co to reset anything */ image.storage().applyUnpack(); #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; } @@ -372,7 +372,7 @@ CubeMapTexture& CubeMapTexture::setCompressedSubImage(const CubeMapCoordinate co to reset anything */ image.storage().applyUnpack(); #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; } #endif @@ -544,4 +544,4 @@ void CubeMapTexture::compressedSubImageImplementationDSAEXT(const CubeMapCoordin } #endif -} +}} diff --git a/src/Magnum/GL/CubeMapTexture.h b/src/Magnum/GL/CubeMapTexture.h index 789f210b6..1100f3aac 100644 --- a/src/Magnum/GL/CubeMapTexture.h +++ b/src/Magnum/GL/CubeMapTexture.h @@ -26,14 +26,14 @@ */ /** @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/GL/AbstractTexture.h" #include "Magnum/Math/Vector2.h" -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Cube map coordinate @@ -65,7 +65,7 @@ turned upside down (+Y is top): | +Y | +----+ -@section CubeMapTexture-usage Basic usage +@section GL-CubeMapTexture-usage Basic usage See @ref Texture documentation for introduction. @@ -1120,6 +1120,6 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { #endif }; -} +}} #endif diff --git a/src/Magnum/GL/CubeMapTextureArray.cpp b/src/Magnum/GL/CubeMapTextureArray.cpp index c93543181..027c5bb66 100644 --- a/src/Magnum/GL/CubeMapTextureArray.cpp +++ b/src/Magnum/GL/CubeMapTextureArray.cpp @@ -32,7 +32,7 @@ #include "Magnum/GL/Extensions.h" #include "Magnum/GL/Implementation/maxTextureSize.h" -namespace Magnum { +namespace Magnum { namespace GL { Vector3i CubeMapTextureArray::maxSize() { #ifndef MAGNUM_TARGET_GLES @@ -89,5 +89,5 @@ CompressedBufferImage3D CubeMapTextureArray::compressedSubImage(const Int level, } #endif -} +}} #endif diff --git a/src/Magnum/GL/CubeMapTextureArray.h b/src/Magnum/GL/CubeMapTextureArray.h index 8a08c6eba..b6a93d97d 100644 --- a/src/Magnum/GL/CubeMapTextureArray.h +++ b/src/Magnum/GL/CubeMapTextureArray.h @@ -27,7 +27,7 @@ #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) /** @file - * @brief Class @ref Magnum::CubeMapTextureArray + * @brief Class @ref Magnum::GL::CubeMapTextureArray */ #endif @@ -36,14 +36,14 @@ #include "Magnum/Math/Vector3.h" #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Cube map texture array See @ref CubeMapTexture documentation for introduction. -@section CubeMapTextureArray-usage Usage +@section GL-CubeMapTextureArray-usage Usage 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} {} }; -} +}} #else #error this header is not available in OpenGL ES 2.0 and WebGL build #endif diff --git a/src/Magnum/GL/DebugOutput.cpp b/src/Magnum/GL/DebugOutput.cpp index ec092b361..98885692e 100644 --- a/src/Magnum/GL/DebugOutput.cpp +++ b/src/Magnum/GL/DebugOutput.cpp @@ -34,7 +34,7 @@ #include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/DebugState.h" -namespace Magnum { +namespace Magnum { namespace GL { namespace { @@ -202,7 +202,7 @@ void DebugOutput::callbackImplementationKhrES(const Callback callback, const voi Debug& operator<<(Debug& debug, const DebugOutput::Source value) { switch(value) { /* 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(WindowSystem) _c(ShaderCompiler) @@ -213,13 +213,13 @@ Debug& operator<<(Debug& debug, const DebugOutput::Source value) { /* LCOV_EXCL_STOP */ } - return debug << "DebugOutput::Source(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::DebugOutput::Source(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, const DebugOutput::Type value) { switch(value) { /* 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(DeprecatedBehavior) _c(UndefinedBehavior) @@ -233,12 +233,12 @@ Debug& operator<<(Debug& debug, const DebugOutput::Type value) { /* LCOV_EXCL_STOP */ } - return debug << "DebugOutput::Type(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::DebugOutput::Type(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, const DebugOutput::Severity 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(Medium) _c(Low) @@ -246,7 +246,7 @@ Debug& operator<<(Debug& debug, const DebugOutput::Severity value) { #undef _c } - return debug << "DebugOutput::Severity(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::DebugOutput::Severity(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif @@ -282,19 +282,19 @@ void DebugMessage::insertImplementationGremedy(Source, Type, UnsignedInt, DebugO Debug& operator<<(Debug& debug, const DebugMessage::Source value) { switch(value) { /* 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(Application) #undef _c /* LCOV_EXCL_STOP */ } - return debug << "DebugMessage::Source(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::DebugMessage::Source(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, const DebugMessage::Type 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(DeprecatedBehavior) _c(UndefinedBehavior) @@ -305,7 +305,7 @@ Debug& operator<<(Debug& debug, const DebugMessage::Type value) { #undef _c } - return debug << "DebugMessage::Type(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::DebugMessage::Type(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif @@ -327,13 +327,13 @@ Int DebugGroup::maxStackDepth() { } void DebugGroup::pushInternal(const Source source, const UnsignedInt id, const Containers::ArrayView 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); _active = true; } 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(); _active = false; } @@ -378,16 +378,16 @@ void DebugGroup::popImplementationExt() { Debug& operator<<(Debug& debug, const DebugGroup::Source value) { switch(value) { /* 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(Application) #undef _c /* LCOV_EXCL_STOP */ } - return debug << "DebugGroup::Source(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::DebugGroup::Source(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif -} +}} #endif diff --git a/src/Magnum/GL/DebugOutput.h b/src/Magnum/GL/DebugOutput.h index e1cab3031..e2449775b 100644 --- a/src/Magnum/GL/DebugOutput.h +++ b/src/Magnum/GL/DebugOutput.h @@ -27,7 +27,7 @@ #ifndef MAGNUM_TARGET_WEBGL /** @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 @@ -39,7 +39,7 @@ #include "Magnum/GL/visibility.h" #ifndef MAGNUM_TARGET_WEBGL -namespace Magnum { +namespace Magnum { namespace GL { 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 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 @extension{KHR,debug} (desktop/ES extension, covered also by @@ -412,13 +412,13 @@ class MAGNUM_GL_EXPORT DebugOutput { #endif }; -/** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Source} */ +/** @debugoperatorclassenum{DebugOutput,DebugOutput::Source} */ 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); -/** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Severity} */ +/** @debugoperatorclassenum{DebugOutput,DebugOutput::Severity} */ 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 gDEBugger. -@section DebugMessage-usage Basic usage +@section GL-DebugMessage-usage Basic usage 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 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 @ref insert() and the debug output is either not supported or turned off, the @@ -595,10 +595,10 @@ class MAGNUM_GL_EXPORT DebugMessage { #endif }; -/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Source} */ +/** @debugoperatorclassenum{DebugMessage,DebugMessage::Source} */ 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); /** @@ -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 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. @@ -644,7 +644,7 @@ no-op. similarly for @ref pop(). So if you want to have nested debug groups, you 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 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 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 @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; }; -/** @debugoperatorclassenum{Magnum::DebugGroup,Magnum::DebugGroup::Source} */ +/** @debugoperatorclassenum{DebugGroup,DebugGroup::Source} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugGroup::Source value); -} +}} #else #error this header is not available in WebGL build #endif diff --git a/src/Magnum/GL/DefaultFramebuffer.cpp b/src/Magnum/GL/DefaultFramebuffer.cpp index 6763b9acd..391a64819 100644 --- a/src/Magnum/GL/DefaultFramebuffer.cpp +++ b/src/Magnum/GL/DefaultFramebuffer.cpp @@ -35,7 +35,7 @@ #include "Magnum/Math/Color.h" #endif -namespace Magnum { +namespace Magnum { namespace GL { DefaultFramebuffer defaultFramebuffer; @@ -138,7 +138,7 @@ void DefaultFramebuffer::initializeContextBasedFunctionality(Context& context) { Debug& operator<<(Debug& debug, const DefaultFramebuffer::Status value) { switch(value) { /* 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) #ifndef MAGNUM_TARGET_WEBGL _c(Undefined) @@ -147,8 +147,8 @@ Debug& operator<<(Debug& debug, const DefaultFramebuffer::Status value) { /* LCOV_EXCL_STOP */ } - return debug << "DefaultFramebuffer::Status(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::DefaultFramebuffer::Status(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif -} +}} diff --git a/src/Magnum/GL/DefaultFramebuffer.h b/src/Magnum/GL/DefaultFramebuffer.h index c57cff2b7..79bf190b9 100644 --- a/src/Magnum/GL/DefaultFramebuffer.h +++ b/src/Magnum/GL/DefaultFramebuffer.h @@ -26,12 +26,12 @@ */ /** @file - * @brief Class @ref Magnum::DefaultFramebuffer + * @brief Class @ref Magnum::GL::DefaultFramebuffer */ #include "Magnum/GL/AbstractFramebuffer.h" -namespace Magnum { +namespace Magnum { namespace GL { /** @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 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 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 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 @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 */ 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); -} +}} #endif diff --git a/src/Magnum/GL/Extensions.h b/src/Magnum/GL/Extensions.h index fa320f14d..0e1fe24b7 100644 --- a/src/Magnum/GL/Extensions.h +++ b/src/Magnum/GL/Extensions.h @@ -26,12 +26,12 @@ */ /** @file - * @brief Namespace @ref Magnum::Extensions + * @brief Namespace @ref Magnum::GL::Extensions */ #include "Magnum/GL/Version.h" -namespace Magnum { +namespace Magnum { namespace GL { /* Standard Android build system thinks that it's okay to define unmangled unprefixed macros. I think that whoever did that needs to be punished, @@ -475,6 +475,6 @@ namespace ANDROID { } -} +}} #endif diff --git a/src/Magnum/GL/Framebuffer.cpp b/src/Magnum/GL/Framebuffer.cpp index 8491b6783..8cd1c080d 100644 --- a/src/Magnum/GL/Framebuffer.cpp +++ b/src/Magnum/GL/Framebuffer.cpp @@ -56,7 +56,7 @@ #include "Magnum/Math/Color.h" #endif -namespace Magnum { +namespace Magnum { namespace GL { const Framebuffer::DrawAttachment Framebuffer::DrawAttachment::None = Framebuffer::DrawAttachment(GL_NONE); 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) { switch(value) { /* 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(IncompleteAttachment) _c(IncompleteMissingAttachment) @@ -441,8 +441,8 @@ Debug& operator<<(Debug& debug, const Framebuffer::Status value) { /* LCOV_EXCL_STOP */ } - return debug << "Framebuffer::Status(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Framebuffer::Status(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif -} +}} diff --git a/src/Magnum/GL/Framebuffer.h b/src/Magnum/GL/Framebuffer.h index f0a491aab..b9cbd41d9 100644 --- a/src/Magnum/GL/Framebuffer.h +++ b/src/Magnum/GL/Framebuffer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Framebuffer + * @brief Class @ref Magnum::GL::Framebuffer */ #include @@ -38,7 +38,7 @@ #undef Status #endif -namespace Magnum { +namespace Magnum { namespace GL { /** @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 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 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 @@ -69,9 +69,9 @@ framebuffer, then bind the default and render the textures on screen: @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 @extension{EXT,direct_state_access} desktop extension is available, functions @@ -939,7 +939,7 @@ class MAGNUM_GL_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractO #endif }; -/** @debugoperatorclassenum{Magnum::Framebuffer,Magnum::Framebuffer::Status} */ +/** @debugoperatorclassenum{Framebuffer,Framebuffer::Status} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Framebuffer::Status value); inline Framebuffer::Framebuffer(Framebuffer&& other) noexcept { @@ -964,6 +964,6 @@ inline GLuint Framebuffer::release() { return id; } -} +}} #endif diff --git a/src/Magnum/GL/GL.h b/src/Magnum/GL/GL.h index 5d9aea44c..def15e6f9 100644 --- a/src/Magnum/GL/GL.h +++ b/src/Magnum/GL/GL.h @@ -35,7 +35,7 @@ typedef unsigned int GLenum; /* Needed for *Format and *Type enums */ #endif -namespace Magnum { +namespace Magnum { namespace GL { #ifndef DOXYGEN_GENERATING_OUTPUT /* FramebufferClear[Mask], FramebufferBlit[Mask], FramebufferBlitFilter, @@ -90,26 +90,6 @@ enum class ImageFormat: GLenum; enum class ImageAccess: GLenum; #endif -template class Image; -typedef Image<1> Image1D; -typedef Image<2> Image2D; -typedef Image<3> Image3D; - -template class CompressedImage; -typedef CompressedImage<1> CompressedImage1D; -typedef CompressedImage<2> CompressedImage2D; -typedef CompressedImage<3> CompressedImage3D; - -template class ImageView; -typedef ImageView<1> ImageView1D; -typedef ImageView<2> ImageView2D; -typedef ImageView<3> ImageView3D; - -template class CompressedImageView; -typedef CompressedImageView<1> CompressedImageView1D; -typedef CompressedImageView<2> CompressedImageView2D; -typedef CompressedImageView<3> CompressedImageView3D; - enum class MeshPrimitive: GLenum; class Mesh; @@ -126,11 +106,6 @@ enum class PixelFormat: GLenum; enum class PixelType: GLenum; enum class CompressedPixelFormat: GLenum; -class PixelStorage; -#ifndef MAGNUM_TARGET_GLES -class CompressedPixelStorage; -#endif - /* ObjectFlag, ObjectFlags are used only in conjunction with *::wrap() function */ class PrimitiveQuery; @@ -173,7 +148,7 @@ class TransformFeedback; enum class Version: Int; #endif -} +}} #endif diff --git a/src/Magnum/GL/ImageFormat.h b/src/Magnum/GL/ImageFormat.h index e4ac1fa1f..3b9c30282 100644 --- a/src/Magnum/GL/ImageFormat.h +++ b/src/Magnum/GL/ImageFormat.h @@ -27,14 +27,14 @@ #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) /** @file - * @brief Enum @ref Magnum::ImageAccess, @ref Magnum::ImageFormat + * @brief Enum @ref Magnum::GL::ImageAccess, @ref Magnum::GL::ImageFormat */ #endif #include "Magnum/GL/OpenGL.h" #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Image access @@ -309,7 +309,7 @@ enum class ImageFormat: GLenum { #endif }; -} +}} #else #error this header is not available in OpenGL ES 2.0 and WebGL build #endif diff --git a/src/Magnum/GL/Implementation/BufferState.cpp b/src/Magnum/GL/Implementation/BufferState.cpp index d9d047796..5572f8377 100644 --- a/src/Magnum/GL/Implementation/BufferState.cpp +++ b/src/Magnum/GL/Implementation/BufferState.cpp @@ -31,7 +31,7 @@ #include "Magnum/GL/Extensions.h" #include "Magnum/GL/Implementation/State.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { const Buffer::TargetHint BufferState::targetForIndex[] = { Buffer::TargetHint::Array, @@ -193,4 +193,4 @@ void BufferState::reset() { std::fill_n(bindings, std::size_t{TargetCount}, State::DisengagedBinding); } -}} +}}} diff --git a/src/Magnum/GL/Implementation/BufferState.h b/src/Magnum/GL/Implementation/BufferState.h index a606c5214..3f0dffcb4 100644 --- a/src/Magnum/GL/Implementation/BufferState.h +++ b/src/Magnum/GL/Implementation/BufferState.h @@ -27,7 +27,7 @@ #include "Magnum/GL/Buffer.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { struct BufferState { enum: std::size_t { @@ -88,6 +88,6 @@ struct BufferState { #endif }; -}} +}}} #endif diff --git a/src/Magnum/GL/Implementation/ContextState.cpp b/src/Magnum/GL/Implementation/ContextState.cpp index f65121077..facb9cf8c 100644 --- a/src/Magnum/GL/Implementation/ContextState.cpp +++ b/src/Magnum/GL/Implementation/ContextState.cpp @@ -27,7 +27,7 @@ #include "Magnum/GL/Context.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { ContextState::ContextState(Context& context, std::vector&) { #ifndef MAGNUM_TARGET_GLES @@ -41,4 +41,4 @@ ContextState::ContextState(Context& context, std::vector&) { #endif } -}} +}}} diff --git a/src/Magnum/GL/Implementation/ContextState.h b/src/Magnum/GL/Implementation/ContextState.h index 15ab9bfe0..e5f354c13 100644 --- a/src/Magnum/GL/Implementation/ContextState.h +++ b/src/Magnum/GL/Implementation/ContextState.h @@ -37,7 +37,7 @@ #include "Magnum/GL/Context.h" #endif -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { struct ContextState { explicit ContextState(Context& context, std::vector& extensions); @@ -53,6 +53,6 @@ struct ContextState { #endif }; -}} +}}} #endif diff --git a/src/Magnum/GL/Implementation/DebugState.cpp b/src/Magnum/GL/Implementation/DebugState.cpp index 1cffc34b9..321409c0b 100644 --- a/src/Magnum/GL/Implementation/DebugState.cpp +++ b/src/Magnum/GL/Implementation/DebugState.cpp @@ -29,7 +29,7 @@ #include "Magnum/GL/Context.h" #include "Magnum/GL/Extensions.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { DebugState::DebugState(Context& context, std::vector& extensions): maxLabelLength{0}, @@ -109,4 +109,4 @@ DebugState::DebugState(Context& context, std::vector& extensions): } } -}} +}}} diff --git a/src/Magnum/GL/Implementation/DebugState.h b/src/Magnum/GL/Implementation/DebugState.h index 13480b620..e597a0a3c 100644 --- a/src/Magnum/GL/Implementation/DebugState.h +++ b/src/Magnum/GL/Implementation/DebugState.h @@ -35,7 +35,7 @@ #error this header is not available in WebGL build #endif -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { struct DebugState { explicit DebugState(Context& context, std::vector& extensions); @@ -53,6 +53,6 @@ struct DebugState { DebugOutput::Callback messageCallback; }; -}} +}}} #endif diff --git a/src/Magnum/GL/Implementation/FramebufferState.cpp b/src/Magnum/GL/Implementation/FramebufferState.cpp index 285233a00..dbbd99bbe 100644 --- a/src/Magnum/GL/Implementation/FramebufferState.cpp +++ b/src/Magnum/GL/Implementation/FramebufferState.cpp @@ -31,7 +31,7 @@ #include "State.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { constexpr const Range2Di FramebufferState::DisengagedViewport; @@ -355,4 +355,4 @@ void FramebufferState::reset() { viewport = DisengagedViewport; } -}} +}}} diff --git a/src/Magnum/GL/Implementation/FramebufferState.h b/src/Magnum/GL/Implementation/FramebufferState.h index 1bd6d4c51..d1d12b0a5 100644 --- a/src/Magnum/GL/Implementation/FramebufferState.h +++ b/src/Magnum/GL/Implementation/FramebufferState.h @@ -37,7 +37,7 @@ #include "Magnum/GL/Renderbuffer.h" #endif -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { struct FramebufferState { constexpr static const Range2Di DisengagedViewport{{}, {-1, -1}}; @@ -118,6 +118,6 @@ struct FramebufferState { Vector2i maxViewportSize; }; -}} +}}} #endif diff --git a/src/Magnum/GL/Implementation/MeshState.cpp b/src/Magnum/GL/Implementation/MeshState.cpp index 1c98d1f15..0facba4fe 100644 --- a/src/Magnum/GL/Implementation/MeshState.cpp +++ b/src/Magnum/GL/Implementation/MeshState.cpp @@ -31,7 +31,7 @@ #include "State.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { MeshState::MeshState(Context& context, ContextState& contextState, std::vector& extensions): currentVAO(0) #ifndef MAGNUM_TARGET_GLES2 @@ -185,4 +185,4 @@ void MeshState::reset() { currentVAO = State::DisengagedBinding; } -}} +}}} diff --git a/src/Magnum/GL/Implementation/MeshState.h b/src/Magnum/GL/Implementation/MeshState.h index c01f56153..ce3feb9a4 100644 --- a/src/Magnum/GL/Implementation/MeshState.h +++ b/src/Magnum/GL/Implementation/MeshState.h @@ -30,7 +30,7 @@ #include "Magnum/GL/Mesh.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { struct ContextState; @@ -76,6 +76,6 @@ struct MeshState { #endif }; -}} +}}} #endif diff --git a/src/Magnum/GL/Implementation/QueryState.cpp b/src/Magnum/GL/Implementation/QueryState.cpp index 8291d78e6..42fea3ca7 100644 --- a/src/Magnum/GL/Implementation/QueryState.cpp +++ b/src/Magnum/GL/Implementation/QueryState.cpp @@ -29,7 +29,7 @@ #include "Magnum/GL/Context.h" #include "Magnum/GL/Extensions.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { QueryState::QueryState(Context& context, std::vector& extensions) { /* Create implementation */ @@ -50,4 +50,4 @@ QueryState::QueryState(Context& context, std::vector& extensions) { #endif } -}} +}}} diff --git a/src/Magnum/GL/Implementation/QueryState.h b/src/Magnum/GL/Implementation/QueryState.h index 2f0abc786..d5392a19a 100644 --- a/src/Magnum/GL/Implementation/QueryState.h +++ b/src/Magnum/GL/Implementation/QueryState.h @@ -41,7 +41,7 @@ #error this header is not available in WebGL 1.0 build #endif -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { struct QueryState { explicit QueryState(Context& context, std::vector& extensions); @@ -51,6 +51,6 @@ struct QueryState { void(AbstractQuery::*createImplementation)(); }; -}} +}}} #endif diff --git a/src/Magnum/GL/Implementation/RendererState.cpp b/src/Magnum/GL/Implementation/RendererState.cpp index e25db1d34..fd934d424 100644 --- a/src/Magnum/GL/Implementation/RendererState.cpp +++ b/src/Magnum/GL/Implementation/RendererState.cpp @@ -28,7 +28,7 @@ #include "Magnum/GL/Context.h" #include "Magnum/GL/Extensions.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { RendererState::RendererState(Context& context, std::vector& extensions) #ifndef MAGNUM_TARGET_WEBGL @@ -118,4 +118,4 @@ void RendererState::PixelStorage::reset() { #endif } -}} +}}} diff --git a/src/Magnum/GL/Implementation/RendererState.h b/src/Magnum/GL/Implementation/RendererState.h index a636268e0..1689f4fb9 100644 --- a/src/Magnum/GL/Implementation/RendererState.h +++ b/src/Magnum/GL/Implementation/RendererState.h @@ -31,7 +31,7 @@ #include "Magnum/GL/Renderer.h" #include "Magnum/Math/Vector3.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { struct RendererState { explicit RendererState(Context& context, std::vector& extensions); @@ -71,6 +71,6 @@ struct RendererState { PixelStorage packPixelStorage, unpackPixelStorage; }; -}} +}}} #endif diff --git a/src/Magnum/GL/Implementation/ShaderProgramState.cpp b/src/Magnum/GL/Implementation/ShaderProgramState.cpp index 6fd76b247..fe12ca92f 100644 --- a/src/Magnum/GL/Implementation/ShaderProgramState.cpp +++ b/src/Magnum/GL/Implementation/ShaderProgramState.cpp @@ -31,7 +31,7 @@ #include "State.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { ShaderProgramState::ShaderProgramState(Context& context, std::vector& extensions): current(0), maxVertexAttributes(0) #ifndef MAGNUM_TARGET_GLES2 @@ -227,4 +227,4 @@ void ShaderProgramState::reset() { current = State::DisengagedBinding; } -}} +}}} diff --git a/src/Magnum/GL/Implementation/ShaderProgramState.h b/src/Magnum/GL/Implementation/ShaderProgramState.h index b5126c708..6bb7d60b8 100644 --- a/src/Magnum/GL/Implementation/ShaderProgramState.h +++ b/src/Magnum/GL/Implementation/ShaderProgramState.h @@ -36,7 +36,7 @@ #include "Magnum/GL/AbstractShaderProgram.h" #endif -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { struct ShaderProgramState { explicit ShaderProgramState(Context& context, std::vector& extensions); @@ -119,6 +119,6 @@ struct ShaderProgramState { #endif }; -}} +}}} #endif diff --git a/src/Magnum/GL/Implementation/ShaderState.cpp b/src/Magnum/GL/Implementation/ShaderState.cpp index 10852439f..aca34e9bf 100644 --- a/src/Magnum/GL/Implementation/ShaderState.cpp +++ b/src/Magnum/GL/Implementation/ShaderState.cpp @@ -31,7 +31,7 @@ #include "Magnum/GL/Context.h" #endif -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { ShaderState::ShaderState(Context& context, std::vector&): maxVertexOutputComponents{}, maxFragmentInputComponents{}, @@ -61,4 +61,4 @@ ShaderState::ShaderState(Context& context, std::vector&): #endif } -}} +}}} diff --git a/src/Magnum/GL/Implementation/ShaderState.h b/src/Magnum/GL/Implementation/ShaderState.h index d439f5551..621b10ca6 100644 --- a/src/Magnum/GL/Implementation/ShaderState.h +++ b/src/Magnum/GL/Implementation/ShaderState.h @@ -38,7 +38,7 @@ #include "Magnum/GL/Shader.h" #endif -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { struct ShaderState { explicit ShaderState(Context& context, std::vector& extensions); @@ -86,6 +86,6 @@ struct ShaderState { #endif }; -}} +}}} #endif diff --git a/src/Magnum/GL/Implementation/State.cpp b/src/Magnum/GL/Implementation/State.cpp index 3f6ba33a6..5becdaa4e 100644 --- a/src/Magnum/GL/Implementation/State.cpp +++ b/src/Magnum/GL/Implementation/State.cpp @@ -47,7 +47,7 @@ #include "Magnum/GL/Implementation/TransformFeedbackState.h" #endif -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { State::State(Context& context, std::ostream* const out) { /* 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; -}} +}}} diff --git a/src/Magnum/GL/Implementation/State.h b/src/Magnum/GL/Implementation/State.h index 294d68140..54ee52dce 100644 --- a/src/Magnum/GL/Implementation/State.h +++ b/src/Magnum/GL/Implementation/State.h @@ -30,7 +30,7 @@ #include "Magnum/GL/GL.h" #include "Magnum/GL/OpenGL.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { struct BufferState; struct ContextState; @@ -77,6 +77,6 @@ struct State { #endif }; -}} +}}} #endif diff --git a/src/Magnum/GL/Implementation/TextureState.cpp b/src/Magnum/GL/Implementation/TextureState.cpp index 4e2dc3c5f..386196ccd 100644 --- a/src/Magnum/GL/Implementation/TextureState.cpp +++ b/src/Magnum/GL/Implementation/TextureState.cpp @@ -37,7 +37,7 @@ #include "State.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { TextureState::TextureState(Context& context, std::vector& extensions): maxSize{}, #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) @@ -493,4 +493,4 @@ void TextureState::reset() { #endif } -}} +}}} diff --git a/src/Magnum/GL/Implementation/TextureState.h b/src/Magnum/GL/Implementation/TextureState.h index 07a561c4d..dc826f279 100644 --- a/src/Magnum/GL/Implementation/TextureState.h +++ b/src/Magnum/GL/Implementation/TextureState.h @@ -45,7 +45,7 @@ #endif #endif -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { struct TextureState { explicit TextureState(Context& context, std::vector& extensions); @@ -157,6 +157,6 @@ struct TextureState { #endif }; -}} +}}} #endif diff --git a/src/Magnum/GL/Implementation/TransformFeedbackState.cpp b/src/Magnum/GL/Implementation/TransformFeedbackState.cpp index 3ef02741b..e3a29dff5 100644 --- a/src/Magnum/GL/Implementation/TransformFeedbackState.cpp +++ b/src/Magnum/GL/Implementation/TransformFeedbackState.cpp @@ -5,7 +5,7 @@ #include "Magnum/GL/TransformFeedback.h" #include "Magnum/GL/Implementation/State.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { TransformFeedbackState::TransformFeedbackState(Context& context, std::vector& extensions): maxInterleavedComponents{0}, maxSeparateAttributes{0}, maxSeparateComponents{0} #ifndef MAGNUM_TARGET_GLES @@ -42,4 +42,4 @@ void TransformFeedbackState::reset() { binding = State::DisengagedBinding; } -}} +}}} diff --git a/src/Magnum/GL/Implementation/TransformFeedbackState.h b/src/Magnum/GL/Implementation/TransformFeedbackState.h index f670e4990..ec5b82f29 100644 --- a/src/Magnum/GL/Implementation/TransformFeedbackState.h +++ b/src/Magnum/GL/Implementation/TransformFeedbackState.h @@ -42,7 +42,7 @@ #error this header is not available in OpenGL ES 2.0 build #endif -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { struct TransformFeedbackState { explicit TransformFeedbackState(Context& context, std::vector& extensions); @@ -66,6 +66,6 @@ struct TransformFeedbackState { void(TransformFeedback::*attachBasesImplementation)(GLuint, std::initializer_list); }; -}} +}}} #endif diff --git a/src/Magnum/GL/Implementation/driverSpecific.cpp b/src/Magnum/GL/Implementation/driverSpecific.cpp index 80ae3acd6..5ba0bd134 100644 --- a/src/Magnum/GL/Implementation/driverSpecific.cpp +++ b/src/Magnum/GL/Implementation/driverSpecific.cpp @@ -29,7 +29,7 @@ #include "Magnum/GL/Extensions.h" #include "Magnum/Math/Range.h" -namespace Magnum { +namespace Magnum { namespace GL { namespace { /* Search the code for the following strings to see where they are implemented. */ @@ -248,4 +248,4 @@ void Context::setupDriverWorkarounds() { #undef _setRequiredVersion } -} +}} diff --git a/src/Magnum/GL/Implementation/maxTextureSize.cpp b/src/Magnum/GL/Implementation/maxTextureSize.cpp index f176a72bb..6204ce771 100644 --- a/src/Magnum/GL/Implementation/maxTextureSize.cpp +++ b/src/Magnum/GL/Implementation/maxTextureSize.cpp @@ -29,7 +29,7 @@ #include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/TextureState.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { GLint maxTextureSideSize() { GLint& value = Context::current().state().texture->maxSize; @@ -75,4 +75,4 @@ GLint maxCubeMapTextureSideSize() { return value; } -}} +}}} diff --git a/src/Magnum/GL/Implementation/maxTextureSize.h b/src/Magnum/GL/Implementation/maxTextureSize.h index 3ea93d31e..3950387a3 100644 --- a/src/Magnum/GL/Implementation/maxTextureSize.h +++ b/src/Magnum/GL/Implementation/maxTextureSize.h @@ -27,7 +27,7 @@ #include "Magnum/GL/OpenGL.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { GLint maxTextureSideSize(); #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) @@ -38,6 +38,6 @@ GLint maxTextureArrayLayers(); #endif GLint maxCubeMapTextureSideSize(); -}} +}}} #endif diff --git a/src/Magnum/GL/Mesh.cpp b/src/Magnum/GL/Mesh.cpp index 0987854a7..4552d717b 100644 --- a/src/Magnum/GL/Mesh.cpp +++ b/src/Magnum/GL/Mesh.cpp @@ -41,7 +41,7 @@ #include "Magnum/GL/Implementation/MeshState.h" #include "Magnum/GL/Implementation/State.h" -namespace Magnum { +namespace Magnum { namespace GL { 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} {} @@ -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) { #ifdef MAGNUM_TARGET_WEBGL 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 _indexBuffer = &buffer; @@ -298,7 +298,7 @@ void Mesh::drawInternal(Int count, Int baseVertex, Int instanceCount, GLintptr i /* Indexed mesh */ } else glDrawElementsBaseVertex(GLenum(_primitive), count, GLenum(_indexType), reinterpret_cast(indexOffset), baseVertex); #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 /* 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(indexOffset), instanceCount, baseVertex); } #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 /* Indexed mesh */ @@ -480,7 +480,7 @@ void Mesh::attributePointerInternal(AttributeLayout& attribute) { void Mesh::attributePointerImplementationDefault(AttributeLayout& attribute) { #ifdef MAGNUM_TARGET_WEBGL 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 _attributes.push_back(attribute); @@ -489,7 +489,7 @@ void Mesh::attributePointerImplementationDefault(AttributeLayout& attribute) { void Mesh::attributePointerImplementationVAO(AttributeLayout& attribute) { #ifdef MAGNUM_TARGET_WEBGL 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 bindVAO(); @@ -633,7 +633,7 @@ void Mesh::drawElementsInstancedImplementationNV(const GLsizei count, const GLin Debug& operator<<(Debug& debug, MeshPrimitive value) { switch(value) { /* 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(LineStrip) _c(LineLoop) @@ -654,13 +654,13 @@ Debug& operator<<(Debug& debug, MeshPrimitive value) { /* LCOV_EXCL_STOP */ } - return debug << "MeshPrimitive(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::MeshPrimitive(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, Mesh::IndexType value) { switch(value) { /* 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(UnsignedShort) _c(UnsignedInt) @@ -668,17 +668,17 @@ Debug& operator<<(Debug& debug, Mesh::IndexType value) { /* LCOV_EXCL_STOP */ } - return debug << "Mesh::IndexType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Mesh::IndexType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif -} +}} namespace Corrade { namespace Utility { -std::string ConfigurationValue::toString(Magnum::MeshPrimitive value, ConfigurationValueFlags) { +std::string ConfigurationValue::toString(Magnum::GL::MeshPrimitive value, ConfigurationValueFlags) { switch(value) { - #define _c(value) case Magnum::MeshPrimitive::value: return #value; + #define _c(value) case Magnum::GL::MeshPrimitive::value: return #value; _c(Points) _c(LineStrip) _c(LineLoop) @@ -701,8 +701,8 @@ std::string ConfigurationValue::toString(Magnum::MeshPrim return {}; } -Magnum::MeshPrimitive ConfigurationValue::fromString(const std::string& stringValue, ConfigurationValueFlags) { - #define _c(value) if(stringValue == #value) return Magnum::MeshPrimitive::value; +Magnum::GL::MeshPrimitive ConfigurationValue::fromString(const std::string& stringValue, ConfigurationValueFlags) { + #define _c(value) if(stringValue == #value) return Magnum::GL::MeshPrimitive::value; _c(LineStrip) _c(LineLoop) _c(Lines) @@ -720,12 +720,12 @@ Magnum::MeshPrimitive ConfigurationValue::fromString(cons #endif #undef _c - return Magnum::MeshPrimitive::Points; + return Magnum::GL::MeshPrimitive::Points; } -std::string ConfigurationValue::toString(Magnum::Mesh::IndexType value, ConfigurationValueFlags) { +std::string ConfigurationValue::toString(Magnum::GL::Mesh::IndexType value, ConfigurationValueFlags) { 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(UnsignedShort) _c(UnsignedInt) @@ -735,14 +735,14 @@ std::string ConfigurationValue::toString(Magnum::Mesh:: return {}; } -Magnum::Mesh::IndexType ConfigurationValue::fromString(const std::string& stringValue, ConfigurationValueFlags) { - #define _c(value) if(stringValue == #value) return Magnum::Mesh::IndexType::value; +Magnum::GL::Mesh::IndexType ConfigurationValue::fromString(const std::string& stringValue, ConfigurationValueFlags) { + #define _c(value) if(stringValue == #value) return Magnum::GL::Mesh::IndexType::value; _c(UnsignedByte) _c(UnsignedShort) _c(UnsignedInt) #undef _c - return Magnum::Mesh::IndexType::UnsignedInt; + return Magnum::GL::Mesh::IndexType::UnsignedInt; } }} diff --git a/src/Magnum/GL/Mesh.h b/src/Magnum/GL/Mesh.h index bd77db458..a8d49dc00 100644 --- a/src/Magnum/GL/Mesh.h +++ b/src/Magnum/GL/Mesh.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Mesh + * @brief Class @ref Magnum::GL::Mesh */ #include @@ -38,7 +38,7 @@ #include "Magnum/GL/Attribute.h" #include "Magnum/GL/GL.h" -namespace Magnum { +namespace Magnum { namespace GL { /** * @brief Mesh primitive type @@ -140,7 +140,7 @@ namespace Implementation { struct MeshState; } /** @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 @ref setPrimitive() and @ref setCount(). Then fill your vertex buffers with @@ -202,19 +202,19 @@ this: @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 respective shader (see -@ref AbstractShaderProgram-rendering-workflow "AbstractShaderProgram documentation" +@ref GL-AbstractShaderProgram-rendering-workflow "AbstractShaderProgram documentation" 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 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, 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 * interleaved attributes. * - * See @ref Mesh-configuration "class documentation" for simple usage - * example. For more involved example imagine that you have buffer - * with 76 bytes of some other data at the beginning (possibly material - * configuration) and then the interleaved vertex array. Each vertex - * consists of weight, position, texture coordinate and normal. You - * want to draw it with @ref Shaders::Phong, but it accepts only - * position and normal, so you have to skip weight and texture - * coordinate in each vertex: + * See @ref GL-Mesh-configuration "class documentation" for simple + * usage example. For more involved example imagine that you have a + * buffer with 76 bytes of some other data at the beginning (possibly + * material configuration) and then the interleaved vertex array. Each + * vertex consists of a weight, position, texture coordinate and + * a normal. You want to draw it with @ref Shaders::Phong, but it + * accepts only a position and a normal, so you have to skip the weight + * and the texture coordinate in each vertex: * * @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 * set up. If vertex/index count or instance count is `0`, no draw * 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 * 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 @@ -985,10 +985,10 @@ class MAGNUM_GL_EXPORT Mesh: public AbstractObject { std::vector _attributes; }; -/** @debugoperatorenum{Magnum::MeshPrimitive} */ +/** @debugoperatorenum{MeshPrimitive} */ 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); inline GLuint Mesh::release() { @@ -997,12 +997,12 @@ inline GLuint Mesh::release() { return id; } -} +}} namespace Corrade { namespace Utility { /** @configurationvalue{Magnum::MeshPrimitive} */ -template<> struct MAGNUM_GL_EXPORT ConfigurationValue { +template<> struct MAGNUM_GL_EXPORT ConfigurationValue { ConfigurationValue() = delete; /** @@ -1010,18 +1010,18 @@ template<> struct MAGNUM_GL_EXPORT ConfigurationValue { * * 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 * * 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} */ -template<> struct MAGNUM_GL_EXPORT ConfigurationValue { +template<> struct MAGNUM_GL_EXPORT ConfigurationValue { ConfigurationValue() = delete; /** @@ -1029,14 +1029,14 @@ template<> struct MAGNUM_GL_EXPORT ConfigurationValue { * * 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 * * 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); }; }} diff --git a/src/Magnum/GL/MeshView.cpp b/src/Magnum/GL/MeshView.cpp index f413f20de..b10a9a3fd 100644 --- a/src/Magnum/GL/MeshView.cpp +++ b/src/Magnum/GL/MeshView.cpp @@ -34,7 +34,7 @@ #include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/MeshState.h" -namespace Magnum { +namespace Magnum { namespace GL { void MeshView::draw(AbstractShaderProgram& shader, std::initializer_list> meshes) { /* Why std::initializer_list doesn't have empty()? */ @@ -45,7 +45,7 @@ void MeshView::draw(AbstractShaderProgram& shader, std::initializer_listget()._original.get(); 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 #ifndef MAGNUM_TARGET_GLES @@ -72,7 +72,7 @@ void MeshView::multiDrawImplementationDefault(std::initializer_list(mesh._indexOffset); @@ -82,7 +82,7 @@ void MeshView::multiDrawImplementationDefault(std::initializer_list @@ -36,7 +36,7 @@ #include "Magnum/GL/OpenGL.h" #include "Magnum/GL/visibility.h" -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { struct MeshState; } @@ -306,6 +306,6 @@ inline MeshView& MeshView::setIndexRange(Int first, UnsignedInt start, UnsignedI return *this; } -} +}} #endif diff --git a/src/Magnum/GL/MultisampleTexture.cpp b/src/Magnum/GL/MultisampleTexture.cpp index 2fc2af327..3f05f5efa 100644 --- a/src/Magnum/GL/MultisampleTexture.cpp +++ b/src/Magnum/GL/MultisampleTexture.cpp @@ -31,7 +31,7 @@ #include "Magnum/GL/Implementation/maxTextureSize.h" -namespace Magnum { namespace Implementation { +namespace Magnum { namespace GL { namespace Implementation { template<> Vector2i MAGNUM_GL_EXPORT maxMultisampleTextureSize<2>() { #ifndef MAGNUM_TARGET_GLES @@ -56,5 +56,5 @@ template<> Vector3i MAGNUM_GL_EXPORT maxMultisampleTextureSize<3>() { return {Vector2i{Implementation::maxTextureSideSize()}, Implementation::max3DTextureDepth()}; } -}} +}}} #endif diff --git a/src/Magnum/GL/MultisampleTexture.h b/src/Magnum/GL/MultisampleTexture.h index dde7a80c2..5242e8bcb 100644 --- a/src/Magnum/GL/MultisampleTexture.h +++ b/src/Magnum/GL/MultisampleTexture.h @@ -27,7 +27,7 @@ #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) /** @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 @@ -36,7 +36,7 @@ #include "Magnum/Math/Vector3.h" #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { template 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 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 set storage: @@ -338,7 +338,7 @@ typedef MultisampleTexture<2> MultisampleTexture2D; */ typedef MultisampleTexture<3> MultisampleTexture2DArray; -} +}} #else #error this header is not available in OpenGL ES 2.0 and WebGL build #endif diff --git a/src/Magnum/GL/OpenGL.cpp b/src/Magnum/GL/OpenGL.cpp index bfd03b735..8254976bf 100644 --- a/src/Magnum/GL/OpenGL.cpp +++ b/src/Magnum/GL/OpenGL.cpp @@ -28,7 +28,7 @@ #include "Magnum/Types.h" #include "Magnum/GL/OpenGL.h" -namespace Magnum { +namespace Magnum { namespace GL { /* Verify types */ static_assert(std::is_same::value, "GLubyte is not the same as UnsignedByte"); @@ -47,4 +47,4 @@ static_assert(std::is_same::value, "GLdouble is not the same a 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"); -} +}} diff --git a/src/Magnum/GL/OpenGLTester.cpp b/src/Magnum/GL/OpenGLTester.cpp index fe772abe0..0e81a1df0 100644 --- a/src/Magnum/GL/OpenGLTester.cpp +++ b/src/Magnum/GL/OpenGLTester.cpp @@ -31,7 +31,7 @@ #include "Magnum/GL/DebugOutput.h" #endif -namespace Magnum { +namespace Magnum { namespace GL { 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 @@ -73,4 +73,4 @@ std::uint64_t OpenGLTester::gpuTimeBenchmarkEnd() { } #endif -} +}} diff --git a/src/Magnum/GL/OpenGLTester.h b/src/Magnum/GL/OpenGLTester.h index e42b1b177..1ab535cc4 100644 --- a/src/Magnum/GL/OpenGLTester.h +++ b/src/Magnum/GL/OpenGLTester.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::OpenGLTester + * @brief Class @ref Magnum::GL::OpenGLTester */ #include @@ -59,7 +59,7 @@ #include "Magnum/GL/TimeQuery.h" #endif -namespace Magnum { +namespace Magnum { namespace GL { /** @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. -@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 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 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 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 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 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 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, 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 -@relatesalso Magnum::OpenGLTester +@relatesalso Magnum::GL::OpenGLTester @brief Verify that no OpenGL error occurred Equivalent to @@ -275,6 +275,6 @@ Equivalent to */ #define MAGNUM_VERIFY_NO_ERROR() CORRADE_COMPARE(Magnum::Renderer::error(), Magnum::Renderer::Error::NoError) -} +}} #endif diff --git a/src/Magnum/GL/PixelFormat.cpp b/src/Magnum/GL/PixelFormat.cpp index 9c584432e..0eb8f7621 100644 --- a/src/Magnum/GL/PixelFormat.cpp +++ b/src/Magnum/GL/PixelFormat.cpp @@ -27,13 +27,13 @@ #include -namespace Magnum { +namespace Magnum { namespace GL { #ifndef DOXYGEN_GENERATING_OUTPUT Debug& operator<<(Debug& debug, const PixelFormat value) { switch(value) { /* 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)) _c(Red) #endif @@ -85,13 +85,13 @@ Debug& operator<<(Debug& debug, const PixelFormat value) { /* LCOV_EXCL_STOP */ } - return debug << "PixelFormat(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::PixelFormat(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, const PixelType value) { switch(value) { /* 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) #ifndef MAGNUM_TARGET_GLES2 _c(Byte) @@ -142,13 +142,13 @@ Debug& operator<<(Debug& debug, const PixelType value) { /* LCOV_EXCL_STOP */ } - return debug << "PixelType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::PixelType(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, const CompressedPixelFormat value) { switch(value) { /* 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 _c(Red) _c(RG) @@ -213,8 +213,8 @@ Debug& operator<<(Debug& debug, const CompressedPixelFormat value) { /* LCOV_EXCL_STOP */ } - return debug << "CompressedPixelFormat(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::CompressedPixelFormat(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif -} +}} diff --git a/src/Magnum/GL/PixelFormat.h b/src/Magnum/GL/PixelFormat.h index b67cff20b..1b090982f 100644 --- a/src/Magnum/GL/PixelFormat.h +++ b/src/Magnum/GL/PixelFormat.h @@ -26,14 +26,14 @@ */ /** @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/GL/OpenGL.h" #include "Magnum/GL/visibility.h" -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Format of pixel data @@ -1234,15 +1234,15 @@ enum class CompressedPixelFormat: GLenum { #endif }; -/** @debugoperatorenum{Magnum::PixelFormat} */ +/** @debugoperatorenum{PixelFormat} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, PixelFormat value); -/** @debugoperatorenum{Magnum::PixelType} */ +/** @debugoperatorenum{PixelType} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, PixelType value); -/** @debugoperatorenum{Magnum::CompressedPixelFormat} */ +/** @debugoperatorenum{CompressedPixelFormat} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, CompressedPixelFormat value); -} +}} #endif diff --git a/src/Magnum/GL/PrimitiveQuery.cpp b/src/Magnum/GL/PrimitiveQuery.cpp index bb623d9b5..80c5a38c3 100644 --- a/src/Magnum/GL/PrimitiveQuery.cpp +++ b/src/Magnum/GL/PrimitiveQuery.cpp @@ -25,7 +25,7 @@ #include "PrimitiveQuery.h" -namespace Magnum { +namespace Magnum { namespace GL { void PrimitiveQuery::begin() { #ifndef MAGNUM_TARGET_GLES @@ -49,4 +49,4 @@ void PrimitiveQuery::end() { #endif } -} +}} diff --git a/src/Magnum/GL/PrimitiveQuery.h b/src/Magnum/GL/PrimitiveQuery.h index e5c9b37ed..b19b62d26 100644 --- a/src/Magnum/GL/PrimitiveQuery.h +++ b/src/Magnum/GL/PrimitiveQuery.h @@ -27,14 +27,14 @@ #ifndef MAGNUM_TARGET_GLES2 /** @file - * @brief Class @ref Magnum::PrimitiveQuery + * @brief Class @ref Magnum::GL::PrimitiveQuery */ #endif #include "Magnum/GL/AbstractQuery.h" #ifndef MAGNUM_TARGET_GLES2 -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Query for primitives @@ -206,7 +206,7 @@ class MAGNUM_GL_EXPORT PrimitiveQuery: public AbstractQuery { #endif }; -} +}} #else #error this header is not available in OpenGL ES 2.0 build #endif diff --git a/src/Magnum/GL/RectangleTexture.cpp b/src/Magnum/GL/RectangleTexture.cpp index 582721b55..8d728b4a1 100644 --- a/src/Magnum/GL/RectangleTexture.cpp +++ b/src/Magnum/GL/RectangleTexture.cpp @@ -34,7 +34,7 @@ #include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/TextureState.h" -namespace Magnum { +namespace Magnum { namespace GL { Vector2i RectangleTexture::maxSize() { if(!Context::current().isExtensionSupported()) @@ -88,5 +88,5 @@ CompressedBufferImage2D RectangleTexture::compressedSubImage(const Range2Di& ran return std::move(image); } -} +}} #endif diff --git a/src/Magnum/GL/RectangleTexture.h b/src/Magnum/GL/RectangleTexture.h index f35d8c935..a4084acb9 100644 --- a/src/Magnum/GL/RectangleTexture.h +++ b/src/Magnum/GL/RectangleTexture.h @@ -27,7 +27,7 @@ #ifndef MAGNUM_TARGET_GLES /** @file - * @brief Class @ref Magnum::RectangleTexture + * @brief Class @ref Magnum::GL::RectangleTexture */ #endif @@ -36,14 +36,14 @@ #include "Magnum/Math/Vector2.h" #ifndef MAGNUM_TARGET_GLES -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Rectangle texture 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 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} {} }; -} +}} #else #error this header is not available in OpenGL ES build #endif diff --git a/src/Magnum/GL/Renderbuffer.cpp b/src/Magnum/GL/Renderbuffer.cpp index 715e6f2fb..c429e1ddc 100644 --- a/src/Magnum/GL/Renderbuffer.cpp +++ b/src/Magnum/GL/Renderbuffer.cpp @@ -34,7 +34,7 @@ #include "Magnum/GL/Implementation/FramebufferState.h" #include "Magnum/GL/Implementation/State.h" -namespace Magnum { +namespace Magnum { namespace GL { Int Renderbuffer::maxSize() { GLint& value = Context::current().state().framebuffer->maxRenderbufferSize; @@ -183,4 +183,4 @@ void Renderbuffer::storageMultisampleImplementationDSAEXT(GLsizei samples, Rende } #endif -} +}} diff --git a/src/Magnum/GL/Renderbuffer.h b/src/Magnum/GL/Renderbuffer.h index ae904dc53..986e2ef82 100644 --- a/src/Magnum/GL/Renderbuffer.h +++ b/src/Magnum/GL/Renderbuffer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Renderbuffer + * @brief Class @ref Magnum::GL::Renderbuffer */ #include @@ -35,7 +35,7 @@ #include "Magnum/GL/AbstractObject.h" #include "Magnum/GL/GL.h" -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { struct FramebufferState; } @@ -45,7 +45,7 @@ namespace Implementation { struct FramebufferState; } Attachable to framebuffer as render target, see @ref Framebuffer documentation 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 @fn_gl{BindRenderbuffer} in @ref setStorage(). Renderbuffer limits and @@ -302,6 +302,6 @@ inline GLuint Renderbuffer::release() { return id; } -} +}} #endif diff --git a/src/Magnum/GL/RenderbufferFormat.h b/src/Magnum/GL/RenderbufferFormat.h index bff4e20dd..48c39d07a 100644 --- a/src/Magnum/GL/RenderbufferFormat.h +++ b/src/Magnum/GL/RenderbufferFormat.h @@ -26,12 +26,12 @@ */ /** @file - * @brief Enum @ref Magnum::RenderbufferFormat + * @brief Enum @ref Magnum::GL::RenderbufferFormat */ #include "Magnum/GL/OpenGL.h" -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Internal renderbuffer format @@ -639,6 +639,6 @@ enum class RenderbufferFormat: GLenum { #endif }; -} +}} #endif diff --git a/src/Magnum/GL/Renderer.cpp b/src/Magnum/GL/Renderer.cpp index 5d33f9dc9..b535c5759 100644 --- a/src/Magnum/GL/Renderer.cpp +++ b/src/Magnum/GL/Renderer.cpp @@ -33,7 +33,7 @@ #include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/RendererState.h" -namespace Magnum { +namespace Magnum { namespace GL { void Renderer::enable(const Feature feature) { glEnable(GLenum(feature)); @@ -235,7 +235,7 @@ Renderer::GraphicsResetStatus Renderer::graphicsResetStatusImplementationRobustn Debug& operator<<(Debug& debug, const Renderer::Error value) { switch(value) { /* 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(InvalidEnum) _c(InvalidValue) @@ -250,27 +250,27 @@ Debug& operator<<(Debug& debug, const Renderer::Error value) { /* LCOV_EXCL_STOP */ } - return debug << "Renderer::Error(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Renderer::Error(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #ifndef MAGNUM_TARGET_WEBGL Debug& operator<<(Debug& debug, const Renderer::ResetNotificationStrategy value) { switch(value) { /* 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(LoseContextOnReset) #undef _c /* LCOV_EXCL_STOP */ } - return debug << "Renderer::ResetNotificationStrategy(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Renderer::ResetNotificationStrategy(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, const Renderer::GraphicsResetStatus value) { switch(value) { /* 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(GuiltyContextReset) _c(InnocentContextReset) @@ -279,9 +279,9 @@ Debug& operator<<(Debug& debug, const Renderer::GraphicsResetStatus value) { /* LCOV_EXCL_STOP */ } - return debug << "Renderer::GraphicsResetStatus(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Renderer::GraphicsResetStatus(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif #endif -} +}} diff --git a/src/Magnum/GL/Renderer.h b/src/Magnum/GL/Renderer.h index 2450223fb..fe6f92ce0 100644 --- a/src/Magnum/GL/Renderer.h +++ b/src/Magnum/GL/Renderer.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Renderer + * @brief Class @ref Magnum::GL::Renderer */ #include @@ -36,7 +36,7 @@ #include "Magnum/GL/OpenGL.h" #include "Magnum/GL/visibility.h" -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { struct RendererState; } @@ -1635,17 +1635,17 @@ class MAGNUM_GL_EXPORT Renderer { CORRADE_ENUMSET_OPERATORS(Renderer::MemoryBarriers) #endif -/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::Error} */ +/** @debugoperatorclassenum{Renderer,Renderer::Error} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Renderer::Error value); #ifndef MAGNUM_TARGET_WEBGL -/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::ResetNotificationStrategy} */ +/** @debugoperatorclassenum{Renderer,Renderer::ResetNotificationStrategy} */ 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); #endif -} +}} #endif diff --git a/src/Magnum/GL/SampleQuery.h b/src/Magnum/GL/SampleQuery.h index 9dd56d48f..16c891554 100644 --- a/src/Magnum/GL/SampleQuery.h +++ b/src/Magnum/GL/SampleQuery.h @@ -27,14 +27,14 @@ #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) /** @file - * @brief Class @ref Magnum::SampleQuery + * @brief Class @ref Magnum::GL::SampleQuery */ #endif #include "Magnum/GL/AbstractQuery.h" #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) -namespace Magnum { +namespace Magnum { namespace GL { /** @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} {} }; -} +}} #else #error this header is not available in WebGL 1.0 build #endif diff --git a/src/Magnum/GL/Sampler.cpp b/src/Magnum/GL/Sampler.cpp index 1ca3017ce..6142b8793 100644 --- a/src/Magnum/GL/Sampler.cpp +++ b/src/Magnum/GL/Sampler.cpp @@ -32,7 +32,7 @@ #include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/TextureState.h" -namespace Magnum { +namespace Magnum { namespace GL { /* Check correctness of binary OR in setMinificationFilter(). If nobody fucks 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) { switch(value) { /* 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(Linear) #undef _c /* LCOV_EXCL_STOP */ } - return debug << "Sampler::Filter(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Sampler::Filter(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, const Sampler::Mipmap value) { switch(value) { /* 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(Nearest) _c(Linear) @@ -89,13 +89,13 @@ Debug& operator<<(Debug& debug, const Sampler::Mipmap value) { /* LCOV_EXCL_STOP */ } - return debug << "Sampler::Mipmap(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Sampler::Mipmap(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, const Sampler::Wrapping value) { switch(value) { /* 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(MirroredRepeat) _c(ClampToEdge) @@ -109,27 +109,27 @@ Debug& operator<<(Debug& debug, const Sampler::Wrapping value) { /* LCOV_EXCL_STOP */ } - return debug << "Sampler::Wrapping(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; + return debug << "GL::Sampler::Wrapping(" << Debug::nospace << reinterpret_cast(GLint(value)) << Debug::nospace << ")"; } #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) Debug& operator<<(Debug& debug, const Sampler::CompareMode value) { switch(value) { /* 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(CompareRefToTexture) #undef _c /* LCOV_EXCL_STOP */ } - return debug << "Sampler::CompareMode(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Sampler::CompareMode(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } Debug& operator<<(Debug& debug, const Sampler::CompareFunction value) { switch(value) { /* 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(Always) _c(Less) @@ -142,7 +142,7 @@ Debug& operator<<(Debug& debug, const Sampler::CompareFunction value) { /* LCOV_EXCL_STOP */ } - return debug << "Sampler::CompareFunction(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Sampler::CompareFunction(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif @@ -150,16 +150,16 @@ Debug& operator<<(Debug& debug, const Sampler::CompareFunction value) { Debug& operator<<(Debug& debug, const Sampler::DepthStencilMode value) { switch(value) { /* 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(StencilIndex) #undef _c /* LCOV_EXCL_STOP */ } - return debug << "Sampler::DepthStencilMode(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Sampler::DepthStencilMode(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif #endif -} +}} diff --git a/src/Magnum/GL/Sampler.h b/src/Magnum/GL/Sampler.h index be21f60dd..51a2c65ac 100644 --- a/src/Magnum/GL/Sampler.h +++ b/src/Magnum/GL/Sampler.h @@ -26,14 +26,14 @@ */ /** @file - * @brief Class @ref Magnum::Sampler + * @brief Class @ref Magnum::GL::Sampler */ #include "Magnum/Magnum.h" #include "Magnum/GL/OpenGL.h" #include "Magnum/GL/visibility.h" -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Texture sampler @@ -275,28 +275,28 @@ class MAGNUM_GL_EXPORT Sampler { static Float maxMaxAnisotropy(); }; -/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Filter} */ +/** @debugoperatorclassenum{Sampler,Sampler::Filter} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Sampler::Filter value); -/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Mipmap} */ +/** @debugoperatorclassenum{Sampler,Sampler::Mipmap} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Sampler::Mipmap value); -/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Wrapping} */ +/** @debugoperatorclassenum{Sampler,Sampler::Wrapping} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Sampler::Wrapping value); #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) -/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::CompareMode} */ +/** @debugoperatorclassenum{Sampler,Sampler::CompareMode} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Sampler::CompareMode value); -/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::CompareFunction} */ +/** @debugoperatorclassenum{Sampler,Sampler::CompareFunction} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Sampler::CompareFunction value); #endif #ifndef MAGNUM_TARGET_GLES -/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::DepthStencilMode} */ +/** @debugoperatorclassenum{Sampler,Sampler::DepthStencilMode} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Sampler::DepthStencilMode value); #endif -} +}} #endif diff --git a/src/Magnum/GL/Shader.cpp b/src/Magnum/GL/Shader.cpp index 516003328..29059ce26 100644 --- a/src/Magnum/GL/Shader.cpp +++ b/src/Magnum/GL/Shader.cpp @@ -43,7 +43,7 @@ typedef char GLchar; #endif -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { /* defined in Implementation/driverSpecific.cpp */ @@ -670,7 +670,7 @@ Shader::Shader(const Version version, const Type type): _type(type), _id(0) { case Version::None: return; } - CORRADE_ASSERT(false, "Shader::Shader(): unsupported version" << version, ); + CORRADE_ASSERT(false, "GL::Shader::Shader(): unsupported version" << version, ); } Shader::~Shader() { @@ -740,7 +740,7 @@ void Shader::addSourceImplementationEmscriptenPthread(std::string source) { Shader& Shader::addFile(const std::string& filename) { CORRADE_ASSERT(Utility::Directory::fileExists(filename), - "Shader file " << '\'' + filename + '\'' << " cannot be read.", *this); + "GL::Shader file " << '\'' + filename + '\'' << " cannot be read.", *this); addSource(Utility::Directory::readString(filename)); return *this; @@ -753,7 +753,7 @@ bool Shader::compile(std::initializer_list> shade reallocating it for each of them) */ std::size_t maxSourceCount = 0; for(Shader& shader: shaders) { - CORRADE_ASSERT(shader._sources.size() > 1, "Shader::compile(): no files added", false); + CORRADE_ASSERT(shader._sources.size() > 1, "GL::Shader::compile(): no files added", false); maxSourceCount = std::max(shader._sources.size(), maxSourceCount); } /** @todo ArrayTuple/VLAs */ @@ -814,7 +814,7 @@ bool Shader::compile(std::initializer_list> shade Debug& operator<<(Debug& debug, const Shader::Type value) { switch(value) { /* LCOV_EXCL_START */ - #define _c(value) case Shader::Type::value: return debug << "Shader::Type::" #value; + #define _c(value) case Shader::Type::value: return debug << "GL::Shader::Type::" #value; _c(Vertex) #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) _c(TessellationControl) @@ -827,8 +827,8 @@ Debug& operator<<(Debug& debug, const Shader::Type value) { /* LCOV_EXCL_STOP */ } - return debug << "Shader::Type(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; + return debug << "GL::Shader::Type(" << Debug::nospace << reinterpret_cast(GLenum(value)) << Debug::nospace << ")"; } #endif -} +}} diff --git a/src/Magnum/GL/Shader.h b/src/Magnum/GL/Shader.h index 55055fb13..6576993b5 100644 --- a/src/Magnum/GL/Shader.h +++ b/src/Magnum/GL/Shader.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Shader + * @brief Class @ref Magnum::GL::Shader */ #include @@ -37,7 +37,7 @@ #include "Magnum/GL/AbstractObject.h" #include "Magnum/GL/GL.h" -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { struct ShaderState; } @@ -46,7 +46,7 @@ namespace Implementation { struct ShaderState; } See @ref AbstractShaderProgram for usage information. -@section Shader-performance-optimizations Performance optimizations +@section GL-Shader-performance-optimizations Performance optimizations Shader limits and implementation-defined values (such as @ref maxUniformComponents()) are cached, so repeated queries don't result in repeated @fn_gl{Get} calls. @@ -630,7 +630,7 @@ class MAGNUM_GL_EXPORT Shader: public AbstractObject { std::vector _sources; }; -/** @debugoperatorclassenum{Magnum::Shader,Magnum::Shader::Type} */ +/** @debugoperatorclassenum{Shader,Shader::Type} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Shader::Type value); inline Shader::Shader(Shader&& other) noexcept: _type(other._type), _id(other._id), _sources(std::move(other._sources)) { @@ -645,6 +645,6 @@ inline Shader& Shader::operator=(Shader&& other) noexcept { return *this; } -} +}} #endif diff --git a/src/Magnum/GL/Test/AbstractShaderProgramGLTest.cpp b/src/Magnum/GL/Test/AbstractShaderProgramGLTest.cpp index b0ee1aa68..bfb33dc9a 100644 --- a/src/Magnum/GL/Test/AbstractShaderProgramGLTest.cpp +++ b/src/Magnum/GL/Test/AbstractShaderProgramGLTest.cpp @@ -400,8 +400,8 @@ void AbstractShaderProgramGLTest::uniformNotFound() { program.uniformLocation("nonexistent"); program.uniformLocation(std::string{"another"}); CORRADE_COMPARE(out.str(), - "AbstractShaderProgram: location of uniform 'nonexistent' cannot be retrieved\n" - "AbstractShaderProgram: location of uniform 'another' cannot be retrieved\n"); + "GL::AbstractShaderProgram: location of uniform 'nonexistent' cannot be retrieved\n" + "GL::AbstractShaderProgram: location of uniform 'another' cannot be retrieved\n"); } namespace { @@ -592,8 +592,8 @@ void AbstractShaderProgramGLTest::uniformBlockIndexNotFound() { program.uniformBlockIndex("nonexistent"); program.uniformBlockIndex(std::string{"another"}); CORRADE_COMPARE(out.str(), - "AbstractShaderProgram: index of uniform block 'nonexistent' cannot be retrieved\n" - "AbstractShaderProgram: index of uniform block 'another' cannot be retrieved\n"); + "GL::AbstractShaderProgram: index of uniform block 'nonexistent' cannot be retrieved\n" + "GL::AbstractShaderProgram: index of uniform block 'another' cannot be retrieved\n"); } namespace { diff --git a/src/Magnum/GL/Test/AttributeTest.cpp b/src/Magnum/GL/Test/AttributeTest.cpp index be1592bc2..49880529f 100644 --- a/src/Magnum/GL/Test/AttributeTest.cpp +++ b/src/Magnum/GL/Test/AttributeTest.cpp @@ -358,7 +358,7 @@ void AttributeTest::debugComponents1() { std::ostringstream out; Debug{&out} << Attribute::Components::One << Attribute::Components(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::Components::One Attribute::Components(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::Components::One GL::Attribute::Components(0xdead)\n"); } void AttributeTest::debugComponents2() { @@ -366,7 +366,7 @@ void AttributeTest::debugComponents2() { std::ostringstream out; Debug{&out} << Attribute::Components::Two << Attribute::Components(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::Components::Two Attribute::Components(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::Components::Two GL::Attribute::Components(0xdead)\n"); } void AttributeTest::debugComponents3() { @@ -374,7 +374,7 @@ void AttributeTest::debugComponents3() { std::ostringstream out; Debug{&out} << Attribute::Components::Three << Attribute::Components(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::Components::Three Attribute::Components(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::Components::Three GL::Attribute::Components(0xdead)\n"); } #ifndef MAGNUM_TARGET_GLES2 @@ -383,7 +383,7 @@ void AttributeTest::debugComponents4() { std::ostringstream out; Debug{&out} << Attribute::Components::Four << Attribute::Components(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::Components::Four Attribute::Components(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::Components::Four GL::Attribute::Components(0xdead)\n"); } #endif @@ -392,7 +392,7 @@ void AttributeTest::debugComponentsMatrix2() { std::ostringstream out; Debug{&out} << Attribute::Components::Two << Attribute::Components(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::Components::Two Attribute::Components(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::Components::Two GL::Attribute::Components(0xdead)\n"); } void AttributeTest::debugComponentsMatrix3() { @@ -400,7 +400,7 @@ void AttributeTest::debugComponentsMatrix3() { std::ostringstream out; Debug{&out} << Attribute::Components::Three << Attribute::Components(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::Components::Three Attribute::Components(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::Components::Three GL::Attribute::Components(0xdead)\n"); } void AttributeTest::debugComponentsMatrix4() { @@ -408,7 +408,7 @@ void AttributeTest::debugComponentsMatrix4() { std::ostringstream out; Debug{&out} << Attribute::Components::Four << Attribute::Components(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::Components::Four Attribute::Components(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::Components::Four GL::Attribute::Components(0xdead)\n"); } void AttributeTest::debugComponentsVector4() { @@ -416,7 +416,7 @@ void AttributeTest::debugComponentsVector4() { std::ostringstream out; Debug{&out} << Attribute::Components::Three << Attribute::Components(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::Components::Three Attribute::Components(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::Components::Three GL::Attribute::Components(0xdead)\n"); } void AttributeTest::debugDataTypeFloat() { @@ -424,7 +424,7 @@ void AttributeTest::debugDataTypeFloat() { std::ostringstream out; Debug{&out} << Attribute::DataType::HalfFloat << Attribute::DataType(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::DataType::HalfFloat Attribute::DataType(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::DataType::HalfFloat GL::Attribute::DataType(0xdead)\n"); } #ifndef MAGNUM_TARGET_GLES2 @@ -433,7 +433,7 @@ void AttributeTest::debugDataTypeInt() { std::ostringstream out; Debug{&out} << Attribute::DataType::Short << Attribute::DataType(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::DataType::Short Attribute::DataType(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::DataType::Short GL::Attribute::DataType(0xdead)\n"); } #endif @@ -443,7 +443,7 @@ void AttributeTest::debugDataTypeDouble() { std::ostringstream out; Debug{&out} << Attribute::DataType::Double << Attribute::DataType(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::DataType::Double Attribute::DataType(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::DataType::Double GL::Attribute::DataType(0xdead)\n"); } #endif @@ -452,7 +452,7 @@ void AttributeTest::debugDataTypeVector3() { std::ostringstream out; Debug{&out} << Attribute::DataType::HalfFloat << Attribute::DataType(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::DataType::HalfFloat Attribute::DataType(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::DataType::HalfFloat GL::Attribute::DataType(0xdead)\n"); } void AttributeTest::debugDataTypeVector4() { @@ -460,7 +460,7 @@ void AttributeTest::debugDataTypeVector4() { std::ostringstream out; Debug{&out} << Attribute::DataType::HalfFloat << Attribute::DataType(0xdead); - CORRADE_COMPARE(out.str(), "Attribute::DataType::HalfFloat Attribute::DataType(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Attribute::DataType::HalfFloat GL::Attribute::DataType(0xdead)\n"); } }} diff --git a/src/Magnum/GL/Test/BufferTest.cpp b/src/Magnum/GL/Test/BufferTest.cpp index 1ec5ce996..f3f6db39b 100644 --- a/src/Magnum/GL/Test/BufferTest.cpp +++ b/src/Magnum/GL/Test/BufferTest.cpp @@ -64,14 +64,14 @@ void BufferTest::constructNoCreate() { void BufferTest::debugTargetHint() { std::ostringstream out; Debug{&out} << Buffer::TargetHint::Array << Buffer::TargetHint(0xdead); - CORRADE_COMPARE(out.str(), "Buffer::TargetHint::Array Buffer::TargetHint(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Buffer::TargetHint::Array GL::Buffer::TargetHint(0xdead)\n"); } #ifndef MAGNUM_TARGET_GLES2 void BufferTest::debugTarget() { std::ostringstream out; Debug{&out} << Buffer::Target::Uniform << Buffer::Target(0xdead); - CORRADE_COMPARE(out.str(), "Buffer::Target::Uniform Buffer::Target(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Buffer::Target::Uniform GL::Buffer::Target(0xdead)\n"); } #endif diff --git a/src/Magnum/GL/Test/ContextTest.cpp b/src/Magnum/GL/Test/ContextTest.cpp index de16073e9..f2b2dbafd 100644 --- a/src/Magnum/GL/Test/ContextTest.cpp +++ b/src/Magnum/GL/Test/ContextTest.cpp @@ -54,7 +54,7 @@ ContextTest::ContextTest() { } void ContextTest::extensions() { - const char* used[Implementation::ExtensionCount]{}; + const char* used[GL::Implementation::ExtensionCount]{}; /* Check that all extension indices are unique */ for(Version version: { @@ -81,9 +81,9 @@ void ContextTest::extensions() { Version::None}) { for(const Extension& e: Extension::extensions(version)) { - if(e.index() >= Implementation::ExtensionCount) { + if(e.index() >= GL::Implementation::ExtensionCount) { Error{} << "Index" << e.index() << "used by" << e.string() - << "larger than" << Implementation::ExtensionCount; + << "larger than" << GL::Implementation::ExtensionCount; CORRADE_VERIFY(false); } @@ -106,7 +106,7 @@ void ContextTest::debugFlag() { #else std::ostringstream out; Debug(&out) << Context::Flag::Debug << Context::Flag(0xdead); - CORRADE_COMPARE(out.str(), "Context::Flag::Debug Context::Flag(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Context::Flag::Debug GL::Context::Flag(0xdead)\n"); #endif } @@ -116,7 +116,7 @@ void ContextTest::debugFlags() { #else std::ostringstream out; Debug(&out) << Context::Flags{} << (Context::Flag::Debug|Context::Flag::NoError) << (Context::Flag::Debug|Context::Flag(0xded0)); - CORRADE_COMPARE(out.str(), "Context::Flags{} Context::Flag::Debug|Context::Flag::NoError Context::Flag::Debug|Context::Flag(0xded0)\n"); + CORRADE_COMPARE(out.str(), "GL::Context::Flags{} GL::Context::Flag::Debug|GL::Context::Flag::NoError GL::Context::Flag::Debug|GL::Context::Flag(0xded0)\n"); #endif } @@ -124,10 +124,10 @@ void ContextTest::debugDetectedDriver() { std::ostringstream out; #ifndef MAGNUM_TARGET_WEBGL Debug{&out} << Context::DetectedDriver::Amd << Context::DetectedDriver(0xdead); - CORRADE_COMPARE(out.str(), "Context::DetectedDriver::Amd Context::DetectedDriver(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Context::DetectedDriver::Amd GL::Context::DetectedDriver(0xdead)\n"); #else Debug{&out} << Context::DetectedDriver::Angle << Context::DetectedDriver(0xdead); - CORRADE_COMPARE(out.str(), "Context::DetectedDriver::Angle Context::DetectedDriver(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Context::DetectedDriver::Angle GL::Context::DetectedDriver(0xdead)\n"); #endif } @@ -135,10 +135,10 @@ void ContextTest::debugDetectedDrivers() { std::ostringstream out; #ifndef MAGNUM_TARGET_WEBGL Debug{&out} << Context::DetectedDrivers{} << (Context::DetectedDriver::Amd|Context::DetectedDriver::NVidia) << (Context::DetectedDriver::Mesa|Context::DetectedDriver(0xde00)); - CORRADE_COMPARE(out.str(), "Context::DetectedDrivers{} Context::DetectedDriver::Amd|Context::DetectedDriver::NVidia Context::DetectedDriver::Mesa|Context::DetectedDriver(0xde00)\n"); + CORRADE_COMPARE(out.str(), "GL::Context::DetectedDrivers{} GL::Context::DetectedDriver::Amd|GL::Context::DetectedDriver::NVidia GL::Context::DetectedDriver::Mesa|GL::Context::DetectedDriver(0xde00)\n"); #else Debug{&out} << Context::DetectedDrivers{} << (Context::DetectedDriver::Angle) << (Context::DetectedDriver::Angle|Context::DetectedDriver(0xde00)); - CORRADE_COMPARE(out.str(), "Context::DetectedDrivers{} Context::DetectedDriver::Angle Context::DetectedDriver::Angle|Context::DetectedDriver(0xde00)\n"); + CORRADE_COMPARE(out.str(), "GL::Context::DetectedDrivers{} GL::Context::DetectedDriver::Angle GL::Context::DetectedDriver::Angle|GL::Context::DetectedDriver(0xde00)\n"); #endif } diff --git a/src/Magnum/GL/Test/DebugOutputTest.cpp b/src/Magnum/GL/Test/DebugOutputTest.cpp index 2560c0b79..943d5a5d5 100644 --- a/src/Magnum/GL/Test/DebugOutputTest.cpp +++ b/src/Magnum/GL/Test/DebugOutputTest.cpp @@ -57,37 +57,37 @@ DebugOutputTest::DebugOutputTest() { void DebugOutputTest::debugSource() { std::ostringstream o; Debug(&o) << DebugOutput::Source::ShaderCompiler << DebugOutput::Source(0xdead); - CORRADE_COMPARE(o.str(), "DebugOutput::Source::ShaderCompiler DebugOutput::Source(0xdead)\n"); + CORRADE_COMPARE(o.str(), "GL::DebugOutput::Source::ShaderCompiler GL::DebugOutput::Source(0xdead)\n"); } void DebugOutputTest::debugType() { std::ostringstream o; Debug(&o) << DebugOutput::Type::PushGroup << DebugOutput::Type(0xdead); - CORRADE_COMPARE(o.str(), "DebugOutput::Type::PushGroup DebugOutput::Type(0xdead)\n"); + CORRADE_COMPARE(o.str(), "GL::DebugOutput::Type::PushGroup GL::DebugOutput::Type(0xdead)\n"); } void DebugOutputTest::debugSeverity() { std::ostringstream o; Debug(&o) << DebugOutput::Severity::Notification << DebugOutput::Severity(0xdead); - CORRADE_COMPARE(o.str(), "DebugOutput::Severity::Notification DebugOutput::Severity(0xdead)\n"); + CORRADE_COMPARE(o.str(), "GL::DebugOutput::Severity::Notification GL::DebugOutput::Severity(0xdead)\n"); } void DebugOutputTest::debugMessageSource() { std::ostringstream o; Debug(&o) << DebugMessage::Source::Application << DebugMessage::Source(0xdead); - CORRADE_COMPARE(o.str(), "DebugMessage::Source::Application DebugMessage::Source(0xdead)\n"); + CORRADE_COMPARE(o.str(), "GL::DebugMessage::Source::Application GL::DebugMessage::Source(0xdead)\n"); } void DebugOutputTest::debugMessageType() { std::ostringstream o; Debug(&o) << DebugMessage::Type::DeprecatedBehavior << DebugMessage::Type(0xdead); - CORRADE_COMPARE(o.str(), "DebugMessage::Type::DeprecatedBehavior DebugMessage::Type(0xdead)\n"); + CORRADE_COMPARE(o.str(), "GL::DebugMessage::Type::DeprecatedBehavior GL::DebugMessage::Type(0xdead)\n"); } void DebugOutputTest::debugGroupSource() { std::ostringstream o; Debug(&o) << DebugGroup::Source::ThirdParty << DebugGroup::Source(0xdead); - CORRADE_COMPARE(o.str(), "DebugGroup::Source::ThirdParty DebugGroup::Source(0xdead)\n"); + CORRADE_COMPARE(o.str(), "GL::DebugGroup::Source::ThirdParty GL::DebugGroup::Source(0xdead)\n"); } }} diff --git a/src/Magnum/GL/Test/DefaultFramebufferTest.cpp b/src/Magnum/GL/Test/DefaultFramebufferTest.cpp index e5359fbf2..74c7c3832 100644 --- a/src/Magnum/GL/Test/DefaultFramebufferTest.cpp +++ b/src/Magnum/GL/Test/DefaultFramebufferTest.cpp @@ -44,7 +44,7 @@ void DefaultFramebufferTest::debugStatus() { std::ostringstream out; Debug(&out) << DefaultFramebuffer::Status::Complete << DefaultFramebuffer::Status(0xdead); - CORRADE_COMPARE(out.str(), "DefaultFramebuffer::Status::Complete DefaultFramebuffer::Status(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::DefaultFramebuffer::Status::Complete GL::DefaultFramebuffer::Status(0xdead)\n"); } }} diff --git a/src/Magnum/GL/Test/FormatTest.cpp b/src/Magnum/GL/Test/FormatTest.cpp index f2b84738f..1db478ab9 100644 --- a/src/Magnum/GL/Test/FormatTest.cpp +++ b/src/Magnum/GL/Test/FormatTest.cpp @@ -48,14 +48,14 @@ void FormatTest::debugPixelFormat() { std::ostringstream out; Debug(&out) << PixelFormat::RGBA << PixelFormat(0xdead); - CORRADE_COMPARE(out.str(), "PixelFormat::RGBA PixelFormat(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::PixelFormat::RGBA GL::PixelFormat(0xdead)\n"); } void FormatTest::debugPixelType() { std::ostringstream out; Debug(&out) << PixelType::UnsignedByte << PixelType(0xdead); - CORRADE_COMPARE(out.str(), "PixelType::UnsignedByte PixelType(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::PixelType::UnsignedByte GL::PixelType(0xdead)\n"); } void FormatTest::debugCompressedPixelFormat() { @@ -65,7 +65,7 @@ void FormatTest::debugCompressedPixelFormat() { std::ostringstream out; Debug(&out) << CompressedPixelFormat::RGBBptcUnsignedFloat << CompressedPixelFormat(0xdead); - CORRADE_COMPARE(out.str(), "CompressedPixelFormat::RGBBptcUnsignedFloat CompressedPixelFormat(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::CompressedPixelFormat::RGBBptcUnsignedFloat GL::CompressedPixelFormat(0xdead)\n"); #endif } diff --git a/src/Magnum/GL/Test/FramebufferTest.cpp b/src/Magnum/GL/Test/FramebufferTest.cpp index 83cbeb66f..5dd772666 100644 --- a/src/Magnum/GL/Test/FramebufferTest.cpp +++ b/src/Magnum/GL/Test/FramebufferTest.cpp @@ -57,7 +57,7 @@ void FramebufferTest::debugStatus() { std::ostringstream out; Debug(&out) << Framebuffer::Status::IncompleteMissingAttachment << Framebuffer::Status(0xdead); - CORRADE_COMPARE(out.str(), "Framebuffer::Status::IncompleteMissingAttachment Framebuffer::Status(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Framebuffer::Status::IncompleteMissingAttachment GL::Framebuffer::Status(0xdead)\n"); } }} diff --git a/src/Magnum/GL/Test/MeshTest.cpp b/src/Magnum/GL/Test/MeshTest.cpp index 4516622ac..6a6be6af1 100644 --- a/src/Magnum/GL/Test/MeshTest.cpp +++ b/src/Magnum/GL/Test/MeshTest.cpp @@ -73,13 +73,13 @@ void MeshTest::indexSize() { void MeshTest::debugPrimitive() { std::ostringstream o; Debug(&o) << MeshPrimitive::TriangleFan << MeshPrimitive(0xdead); - CORRADE_COMPARE(o.str(), "MeshPrimitive::TriangleFan MeshPrimitive(0xdead)\n"); + CORRADE_COMPARE(o.str(), "GL::MeshPrimitive::TriangleFan GL::MeshPrimitive(0xdead)\n"); } void MeshTest::debugIndexType() { std::ostringstream o; Debug(&o) << Mesh::IndexType::UnsignedShort << Mesh::IndexType(0xdead); - CORRADE_COMPARE(o.str(), "Mesh::IndexType::UnsignedShort Mesh::IndexType(0xdead)\n"); + CORRADE_COMPARE(o.str(), "GL::Mesh::IndexType::UnsignedShort GL::Mesh::IndexType(0xdead)\n"); } void MeshTest::configurationPrimitive() { diff --git a/src/Magnum/GL/Test/RendererTest.cpp b/src/Magnum/GL/Test/RendererTest.cpp index 347d8da10..478c30bfb 100644 --- a/src/Magnum/GL/Test/RendererTest.cpp +++ b/src/Magnum/GL/Test/RendererTest.cpp @@ -53,7 +53,7 @@ void RendererTest::debugError() { std::ostringstream out; Debug(&out) << Renderer::Error::InvalidOperation << Renderer::Error(0xdead); - CORRADE_COMPARE(out.str(), "Renderer::Error::InvalidOperation Renderer::Error(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Renderer::Error::InvalidOperation GL::Renderer::Error(0xdead)\n"); } #ifndef MAGNUM_TARGET_WEBGL @@ -61,14 +61,14 @@ void RendererTest::debugResetNotificationStrategy() { std::ostringstream out; Debug(&out) << Renderer::ResetNotificationStrategy::LoseContextOnReset << Renderer::ResetNotificationStrategy(0xdead); - CORRADE_COMPARE(out.str(), "Renderer::ResetNotificationStrategy::LoseContextOnReset Renderer::ResetNotificationStrategy(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Renderer::ResetNotificationStrategy::LoseContextOnReset GL::Renderer::ResetNotificationStrategy(0xdead)\n"); } void RendererTest::debugGraphicsResetStatus() { std::ostringstream out; Debug(&out) << Renderer::GraphicsResetStatus::GuiltyContextReset << Renderer::GraphicsResetStatus(0xdead); - CORRADE_COMPARE(out.str(), "Renderer::GraphicsResetStatus::GuiltyContextReset Renderer::GraphicsResetStatus(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Renderer::GraphicsResetStatus::GuiltyContextReset GL::Renderer::GraphicsResetStatus(0xdead)\n"); } #endif diff --git a/src/Magnum/GL/Test/SamplerTest.cpp b/src/Magnum/GL/Test/SamplerTest.cpp index a79685544..b4b050e05 100644 --- a/src/Magnum/GL/Test/SamplerTest.cpp +++ b/src/Magnum/GL/Test/SamplerTest.cpp @@ -63,21 +63,21 @@ void SamplerTest::debugFilter() { std::ostringstream out; Debug(&out) << Sampler::Filter::Linear << Sampler::Filter(0xdead); - CORRADE_COMPARE(out.str(), "Sampler::Filter::Linear Sampler::Filter(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Sampler::Filter::Linear GL::Sampler::Filter(0xdead)\n"); } void SamplerTest::debugMipmap() { std::ostringstream out; Debug(&out) << Sampler::Mipmap::Base << Sampler::Mipmap(0xdead); - CORRADE_COMPARE(out.str(), "Sampler::Mipmap::Base Sampler::Mipmap(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Sampler::Mipmap::Base GL::Sampler::Mipmap(0xdead)\n"); } void SamplerTest::debugWrapping() { std::ostringstream out; Debug(&out) << Sampler::Wrapping::ClampToEdge << Sampler::Wrapping(0xdead); - CORRADE_COMPARE(out.str(), "Sampler::Wrapping::ClampToEdge Sampler::Wrapping(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Sampler::Wrapping::ClampToEdge GL::Sampler::Wrapping(0xdead)\n"); } #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) @@ -85,14 +85,14 @@ void SamplerTest::debugCompareMode() { std::ostringstream out; Debug(&out) << Sampler::CompareMode::CompareRefToTexture << Sampler::CompareMode(0xdead); - CORRADE_COMPARE(out.str(), "Sampler::CompareMode::CompareRefToTexture Sampler::CompareMode(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Sampler::CompareMode::CompareRefToTexture GL::Sampler::CompareMode(0xdead)\n"); } void SamplerTest::debugCompareFunction() { std::ostringstream out; Debug(&out) << Sampler::CompareFunction::GreaterOrEqual << Sampler::CompareFunction(0xdead); - CORRADE_COMPARE(out.str(), "Sampler::CompareFunction::GreaterOrEqual Sampler::CompareFunction(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Sampler::CompareFunction::GreaterOrEqual GL::Sampler::CompareFunction(0xdead)\n"); } #endif @@ -101,7 +101,7 @@ void SamplerTest::debugDepthStencilMode() { std::ostringstream out; Debug(&out) << Sampler::DepthStencilMode::StencilIndex << Sampler::DepthStencilMode(0xdead); - CORRADE_COMPARE(out.str(), "Sampler::DepthStencilMode::StencilIndex Sampler::DepthStencilMode(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Sampler::DepthStencilMode::StencilIndex GL::Sampler::DepthStencilMode(0xdead)\n"); } #endif diff --git a/src/Magnum/GL/Test/ShaderTest.cpp b/src/Magnum/GL/Test/ShaderTest.cpp index 0fc12eda4..aabb95eb9 100644 --- a/src/Magnum/GL/Test/ShaderTest.cpp +++ b/src/Magnum/GL/Test/ShaderTest.cpp @@ -44,7 +44,7 @@ void ShaderTest::debugType() { std::ostringstream out; Debug(&out) << Shader::Type::Fragment << Shader::Type(0xdead); - CORRADE_COMPARE(out.str(), "Shader::Type::Fragment Shader::Type(0xdead)\n"); + CORRADE_COMPARE(out.str(), "GL::Shader::Type::Fragment GL::Shader::Type(0xdead)\n"); } }} diff --git a/src/Magnum/GL/Texture.cpp b/src/Magnum/GL/Texture.cpp index cc0043662..13087e9d0 100644 --- a/src/Magnum/GL/Texture.cpp +++ b/src/Magnum/GL/Texture.cpp @@ -36,7 +36,7 @@ #include "Magnum/GL/BufferImage.h" #endif -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { @@ -107,4 +107,4 @@ template class MAGNUM_GL_EXPORT Texture<2>; template class MAGNUM_GL_EXPORT Texture<3>; #endif -} +}} diff --git a/src/Magnum/GL/Texture.h b/src/Magnum/GL/Texture.h index 19cd18281..45f7f4e5b 100644 --- a/src/Magnum/GL/Texture.h +++ b/src/Magnum/GL/Texture.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Class @ref Magnum::Texture, typedef @ref Magnum::Texture1D, @ref Magnum::Texture2D, @ref Magnum::Texture3D + * @brief Class @ref Magnum::GL::Texture, typedef @ref Magnum::GL::Texture1D, @ref Magnum::GL::Texture2D, @ref Magnum::GL::Texture3D */ #include "Magnum/Array.h" @@ -34,7 +34,7 @@ #include "Magnum/GL/AbstractTexture.h" #include "Magnum/Math/Vector3.h" -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { template constexpr GLenum textureTarget(); @@ -62,7 +62,7 @@ namespace Implementation { Template class for one- to three-dimensional textures. See also @ref AbstractTexture documentation for more information. -@section Texture-usage Usage +@section GL-Texture-usage Usage Common usage is to fully configure all texture parameters and then set the data from e.g. @ref Image. Example configuration of high quality texture with @@ -1300,6 +1300,6 @@ typedef Texture<2> Texture2D; typedef Texture<3> Texture3D; #endif -} +}} #endif diff --git a/src/Magnum/GL/TextureArray.cpp b/src/Magnum/GL/TextureArray.cpp index 49807531a..1f45786cf 100644 --- a/src/Magnum/GL/TextureArray.cpp +++ b/src/Magnum/GL/TextureArray.cpp @@ -35,7 +35,7 @@ #include "Magnum/GL/BufferImage.h" #endif -namespace Magnum { +namespace Magnum { namespace GL { namespace { template struct VectorOrScalar; @@ -100,5 +100,5 @@ template class MAGNUM_GL_EXPORT TextureArray<1>; #endif template class MAGNUM_GL_EXPORT TextureArray<2>; -} +}} #endif diff --git a/src/Magnum/GL/TextureArray.h b/src/Magnum/GL/TextureArray.h index 264d8df1f..29526fe14 100644 --- a/src/Magnum/GL/TextureArray.h +++ b/src/Magnum/GL/TextureArray.h @@ -27,7 +27,7 @@ #ifndef MAGNUM_TARGET_GLES2 /** @file - * @brief Class @ref Magnum::TextureArray, typedef @ref Magnum::Texture1DArray, @ref Magnum::Texture2DArray + * @brief Class @ref Magnum::GL::TextureArray, typedef @ref Magnum::GL::Texture1DArray, @ref Magnum::GL::Texture2DArray */ #endif @@ -37,7 +37,7 @@ #include "Magnum/Math/Vector3.h" #ifndef MAGNUM_TARGET_GLES2 -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { template constexpr GLenum textureArrayTarget(); @@ -53,7 +53,7 @@ namespace Implementation { Template class for one- and two-dimensional texture arrays. See also @ref AbstractTexture documentation for more information. -@section TextureArray-usage Usage +@section GL-TextureArray-usage Usage See @ref Texture documentation for introduction. @@ -841,7 +841,7 @@ typedef TextureArray<1> Texture1DArray; */ typedef TextureArray<2> Texture2DArray; -} +}} #else #error this header is not available in OpenGL ES 2.0 build #endif diff --git a/src/Magnum/GL/TextureFormat.h b/src/Magnum/GL/TextureFormat.h index d2e3e293f..d9f8c9c87 100644 --- a/src/Magnum/GL/TextureFormat.h +++ b/src/Magnum/GL/TextureFormat.h @@ -26,12 +26,12 @@ */ /** @file - * @brief Enum @ref Magnum::TextureFormat + * @brief Enum @ref Magnum::GL::TextureFormat */ #include "Magnum/GL/OpenGL.h" -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Internal texture format @@ -1757,6 +1757,6 @@ enum class TextureFormat: GLenum { #endif }; -} +}} #endif diff --git a/src/Magnum/GL/TimeQuery.h b/src/Magnum/GL/TimeQuery.h index 32c1b7c47..68814412e 100644 --- a/src/Magnum/GL/TimeQuery.h +++ b/src/Magnum/GL/TimeQuery.h @@ -27,14 +27,14 @@ #ifndef MAGNUM_TARGET_WEBGL /** @file - * @brief Class @ref Magnum::TimeQuery + * @brief Class @ref Magnum::GL::TimeQuery */ #endif #include "Magnum/GL/AbstractQuery.h" #ifndef MAGNUM_TARGET_WEBGL -namespace Magnum { +namespace Magnum { namespace GL { /** @brief Query for elapsed time @@ -161,7 +161,7 @@ class TimeQuery: public AbstractQuery { explicit TimeQuery(GLuint id, Target target, ObjectFlags flags) noexcept: AbstractQuery{id, GLenum(target), flags} {} }; -} +}} #else #error this header is not available in WebGL 1.0 build #endif diff --git a/src/Magnum/GL/TransformFeedback.cpp b/src/Magnum/GL/TransformFeedback.cpp index f8bc92c6b..25f7fbe1f 100644 --- a/src/Magnum/GL/TransformFeedback.cpp +++ b/src/Magnum/GL/TransformFeedback.cpp @@ -38,7 +38,7 @@ #include "Magnum/GL/Implementation/State.h" #include "Magnum/GL/Implementation/TransformFeedbackState.h" -namespace Magnum { +namespace Magnum { namespace GL { Int TransformFeedback::maxInterleavedComponents() { #ifndef MAGNUM_TARGET_GLES @@ -270,5 +270,5 @@ void TransformFeedback::end() { glEndTransformFeedback(); } -} +}} #endif diff --git a/src/Magnum/GL/TransformFeedback.h b/src/Magnum/GL/TransformFeedback.h index 1894bc434..31b9a5af7 100644 --- a/src/Magnum/GL/TransformFeedback.h +++ b/src/Magnum/GL/TransformFeedback.h @@ -33,19 +33,19 @@ #ifndef MAGNUM_TARGET_GLES2 /** @file - * @brief Class @ref Magnum::TransformFeedback + * @brief Class @ref Magnum::GL::TransformFeedback */ #endif #ifndef MAGNUM_TARGET_GLES2 -namespace Magnum { +namespace Magnum { namespace GL { namespace Implementation { struct TransformFeedbackState; } /** @brief Transform feedback -@section TransformFeedback-performance-optimizations Performance optimizations +@section GL-TransformFeedback-performance-optimizations Performance optimizations The engine tracks currently bound transform feedback to avoid unnecessary calls to @fn_gl_keyword{BindTransformFeedback}. Transform feedback limits and @@ -459,7 +459,7 @@ inline GLuint TransformFeedback::release() { return id; } -} +}} #else #error this header is not available in OpenGL ES 2.0 build #endif diff --git a/src/Magnum/GL/Version.cpp b/src/Magnum/GL/Version.cpp index 6b99e424a..6f48bce26 100644 --- a/src/Magnum/GL/Version.cpp +++ b/src/Magnum/GL/Version.cpp @@ -27,7 +27,7 @@ #include -namespace Magnum { +namespace Magnum { namespace GL { #ifndef DOXYGEN_GENERATING_OUTPUT Debug& operator<<(Debug& debug, Version value) { @@ -66,4 +66,4 @@ Debug& operator<<(Debug& debug, Version value) { } #endif -} +}} diff --git a/src/Magnum/GL/Version.h b/src/Magnum/GL/Version.h index e357c3c57..9466b24e0 100644 --- a/src/Magnum/GL/Version.h +++ b/src/Magnum/GL/Version.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Enum @ref Magnum::Version, function @ref Magnum::version(), @ref Magnum::isVersionES() + * @brief Enum @ref Magnum::GL::Version, function @ref Magnum::GL::version(), @ref Magnum::GL::isVersionES() */ #include @@ -34,7 +34,7 @@ #include "Magnum/Magnum.h" #include "Magnum/GL/visibility.h" -namespace Magnum { +namespace Magnum { namespace GL { #ifndef MAGNUM_TARGET_GLES namespace Implementation { @@ -157,9 +157,9 @@ constexpr bool isVersionES(Version version) { constexpr bool isVersionES(Version) { return true; } #endif -/** @debugoperatorenum{Magnum::Version} */ +/** @debugoperatorenum{Version} */ MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Version value); -} +}} #endif diff --git a/src/Magnum/Image.cpp b/src/Magnum/Image.cpp index da8f003f6..f72bf4490 100644 --- a/src/Magnum/Image.cpp +++ b/src/Magnum/Image.cpp @@ -27,7 +27,7 @@ namespace Magnum { -template Image::Image(PixelStorage storage, PixelFormat format, PixelType type, const VectorTypeFor& size, Containers::Array&& data) noexcept: _storage{storage}, _format{format}, _type{type}, _size{size}, _data{std::move(data)} { +template Image::Image(PixelStorage storage, GL::PixelFormat format, GL::PixelType type, const VectorTypeFor& size, Containers::Array&& data) noexcept: _storage{storage}, _format{format}, _type{type}, _size{size}, _data{std::move(data)} { CORRADE_ASSERT(Implementation::imageDataSize(*this) <= _data.size(), "Image::Image(): bad image data size, got" << _data.size() << "but expected at least" << Implementation::imageDataSize(*this), ); } diff --git a/src/Magnum/Image.h b/src/Magnum/Image.h index a5cc99713..1f22815df 100644 --- a/src/Magnum/Image.h +++ b/src/Magnum/Image.h @@ -59,12 +59,12 @@ template class Image { * The data are expected to be of proper size for given @p storage * parameters. */ - explicit Image(PixelStorage storage, PixelFormat format, PixelType type, const VectorTypeFor& size, Containers::Array&& data) noexcept; + explicit Image(PixelStorage storage, GL::PixelFormat format, GL::PixelType type, const VectorTypeFor& size, Containers::Array&& data) noexcept; /** @overload * Similar to the above, but uses default @ref PixelStorage parameters. */ - explicit Image(PixelFormat format, PixelType type, const VectorTypeFor& size, Containers::Array&& data) noexcept: Image{{}, format, type, size, std::move(data)} {} + explicit Image(GL::PixelFormat format, GL::PixelType type, const VectorTypeFor& size, Containers::Array&& data) noexcept: Image{{}, format, type, size, std::move(data)} {} /** * @brief Constructor @@ -79,12 +79,12 @@ template class Image { * @ref AbstractFramebuffer::read() "*Framebuffer::read()" to fill the * image with data using @p storage settings. */ - /*implicit*/ Image(PixelStorage storage, PixelFormat format, PixelType type) noexcept: _storage{storage}, _format{format}, _type{type}, _data{} {} + /*implicit*/ Image(PixelStorage storage, GL::PixelFormat format, GL::PixelType type) noexcept: _storage{storage}, _format{format}, _type{type}, _data{} {} /** @overload * Similar to the above, but uses default @ref PixelStorage parameters. */ - /*implicit*/ Image(PixelFormat format, PixelType type) noexcept: Image{{}, format, type} {} + /*implicit*/ Image(GL::PixelFormat format, GL::PixelType type) noexcept: Image{{}, format, type} {} /** @brief Copying is not allowed */ Image(const Image&) = delete; @@ -107,10 +107,10 @@ template class Image { PixelStorage storage() const { return _storage; } /** @brief Format of pixel data */ - PixelFormat format() const { return _format; } + GL::PixelFormat format() const { return _format; } /** @brief Data type of pixel data */ - PixelType type() const { return _type; } + GL::PixelType type() const { return _type; } /** * @brief Pixel size (in bytes) @@ -180,7 +180,7 @@ template class Image { * expected to be of proper size for given @p storage parameters. * @see @ref release() */ - CORRADE_DEPRECATED("move-assign a new instance instead") void setData(PixelStorage storage, PixelFormat format, PixelType type, const VectorTypeFor& size, Containers::Array&& data) { + CORRADE_DEPRECATED("move-assign a new instance instead") void setData(PixelStorage storage, GL::PixelFormat format, GL::PixelType type, const VectorTypeFor& size, Containers::Array&& data) { *this = Image{storage, format, type, size, std::move(data)}; } @@ -189,7 +189,7 @@ template class Image { * * @deprecated Move-assign a new instance instead. */ - CORRADE_DEPRECATED("move-assign a new instance instead") void setData(PixelFormat format, PixelType type, const VectorTypeFor& size, Containers::Array&& data) { + CORRADE_DEPRECATED("move-assign a new instance instead") void setData(GL::PixelFormat format, GL::PixelType type, const VectorTypeFor& size, Containers::Array&& data) { *this = Image{format, type, size, std::move(data)}; } #endif @@ -205,8 +205,8 @@ template class Image { private: PixelStorage _storage; - PixelFormat _format; - PixelType _type; + GL::PixelFormat _format; + GL::PixelType _type; Math::Vector _size; Containers::Array _data; }; @@ -247,7 +247,7 @@ template class CompressedImage { * @requires_gl Compressed pixel storage is hardcoded in OpenGL ES and * WebGL. */ - explicit CompressedImage(CompressedPixelStorage storage, CompressedPixelFormat format, const VectorTypeFor& size, Containers::Array&& data); + explicit CompressedImage(CompressedPixelStorage storage, GL::CompressedPixelFormat format, const VectorTypeFor& size, Containers::Array&& data); #endif /** @@ -259,7 +259,7 @@ template class CompressedImage { * Similar the above, but uses default @ref CompressedPixelStorage * parameters (or the hardcoded ones in OpenGL ES and WebGL). */ - explicit CompressedImage(CompressedPixelFormat format, const VectorTypeFor& size, Containers::Array&& data); + explicit CompressedImage(GL::CompressedPixelFormat format, const VectorTypeFor& size, Containers::Array&& data); #ifndef MAGNUM_TARGET_GLES /** @@ -314,7 +314,7 @@ template class CompressedImage { #endif /** @brief Format of compressed pixel data */ - CompressedPixelFormat format() const { return _format; } + GL::CompressedPixelFormat format() const { return _format; } /** @brief Image size */ VectorTypeFor size() const { return _size; } @@ -372,7 +372,7 @@ template class CompressedImage { * @requires_gl Compressed pixel storage is hardcoded in OpenGL ES and * WebGL. */ - CORRADE_DEPRECATED("move-assign a new instance instead") void setData(CompressedPixelStorage storage, CompressedPixelFormat format, const VectorTypeFor& size, Containers::Array&& data) { + CORRADE_DEPRECATED("move-assign a new instance instead") void setData(CompressedPixelStorage storage, GL::CompressedPixelFormat format, const VectorTypeFor& size, Containers::Array&& data) { *this = CompressedImage{storage, format, size, std::move(data)}; } #endif @@ -388,7 +388,7 @@ template class CompressedImage { * Similar the above, but uses default @ref CompressedPixelStorage * parameters (or the hardcoded ones in OpenGL ES and WebGL). */ - CORRADE_DEPRECATED("move-assign a new instance instead") void setData(CompressedPixelFormat format, const VectorTypeFor& size, Containers::Array&& data) { + CORRADE_DEPRECATED("move-assign a new instance instead") void setData(GL::CompressedPixelFormat format, const VectorTypeFor& size, Containers::Array&& data) { *this = CompressedImage{format, size, std::move(data)}; } #endif @@ -406,7 +406,7 @@ template class CompressedImage { #ifndef MAGNUM_TARGET_GLES CompressedPixelStorage _storage; #endif - CompressedPixelFormat _format; + GL::CompressedPixelFormat _format; Math::Vector _size; Containers::Array _data; }; @@ -484,7 +484,7 @@ template inline CompressedImage::CompressedI #ifndef MAGNUM_TARGET_GLES const CompressedPixelStorage storage, #endif - const CompressedPixelFormat format, const VectorTypeFor& size, Containers::Array&& data): + const GL::CompressedPixelFormat format, const VectorTypeFor& size, Containers::Array&& data): #ifndef MAGNUM_TARGET_GLES _storage{storage}, #endif @@ -501,7 +501,7 @@ template inline CompressedImage::CompressedI {} #ifndef MAGNUM_TARGET_GLES -template inline CompressedImage::CompressedImage(const CompressedPixelFormat format, const VectorTypeFor& size, Containers::Array&& data): CompressedImage{{}, format, size, std::move(data)} {} +template inline CompressedImage::CompressedImage(const GL::CompressedPixelFormat format, const VectorTypeFor& size, Containers::Array&& data): CompressedImage{{}, format, size, std::move(data)} {} template inline CompressedImage::CompressedImage(): CompressedImage{CompressedPixelStorage{}} {} #endif diff --git a/src/Magnum/ImageView.cpp b/src/Magnum/ImageView.cpp index 287a08b3b..97d10ea8c 100644 --- a/src/Magnum/ImageView.cpp +++ b/src/Magnum/ImageView.cpp @@ -27,7 +27,7 @@ namespace Magnum { -template ImageView::ImageView(PixelStorage storage, PixelFormat format, PixelType type, const VectorTypeFor& size, Containers::ArrayView data) noexcept: _storage{storage}, _format{format}, _type{type}, _size{size}, _data{reinterpret_cast(data.data()), data.size()} { +template ImageView::ImageView(PixelStorage storage, GL::PixelFormat format, GL::PixelType type, const VectorTypeFor& size, Containers::ArrayView data) noexcept: _storage{storage}, _format{format}, _type{type}, _size{size}, _data{reinterpret_cast(data.data()), data.size()} { CORRADE_ASSERT(!_data || Implementation::imageDataSize(*this) <= _data.size(), "ImageView::ImageView(): bad image data size, got" << _data.size() << "but expected at least" << Implementation::imageDataSize(*this), ); } diff --git a/src/Magnum/ImageView.h b/src/Magnum/ImageView.h index 8eea90a85..020461c07 100644 --- a/src/Magnum/ImageView.h +++ b/src/Magnum/ImageView.h @@ -70,12 +70,12 @@ template class ImageView { * The data are expected to be of proper size for given @p storage * parameters. */ - explicit ImageView(PixelStorage storage, PixelFormat format, PixelType type, const VectorTypeFor& size, Containers::ArrayView data) noexcept; + explicit ImageView(PixelStorage storage, GL::PixelFormat format, GL::PixelType type, const VectorTypeFor& size, Containers::ArrayView data) noexcept; /** @overload * Similar to the above, but uses default @ref PixelStorage parameters. */ - explicit ImageView(PixelFormat format, PixelType type, const VectorTypeFor& size, Containers::ArrayView data) noexcept: ImageView{{}, format, type, size, data} {} + explicit ImageView(GL::PixelFormat format, GL::PixelType type, const VectorTypeFor& size, Containers::ArrayView data) noexcept: ImageView{{}, format, type, size, data} {} /** * @brief Constructor @@ -87,21 +87,21 @@ template class ImageView { * Data pointer is set to @cpp nullptr @ce, call @ref setData() to fill * the image with data. */ - constexpr explicit ImageView(PixelStorage storage, PixelFormat format, PixelType type, const VectorTypeFor& size) noexcept: _storage{storage}, _format{format}, _type{type}, _size{size}, _data{nullptr} {} + constexpr explicit ImageView(PixelStorage storage, GL::PixelFormat format, GL::PixelType type, const VectorTypeFor& size) noexcept: _storage{storage}, _format{format}, _type{type}, _size{size}, _data{nullptr} {} /** @overload * Similar to the above, but uses default @ref PixelStorage parameters. */ - constexpr explicit ImageView(PixelFormat format, PixelType type, const VectorTypeFor& size) noexcept: ImageView{{}, format, type, size} {} + constexpr explicit ImageView(GL::PixelFormat format, GL::PixelType type, const VectorTypeFor& size) noexcept: ImageView{{}, format, type, size} {} /** @brief Storage of pixel data */ PixelStorage storage() const { return _storage; } /** @brief Format of pixel data */ - PixelFormat format() const { return _format; } + GL::PixelFormat format() const { return _format; } /** @brief Data type of pixel data */ - PixelType type() const { return _type; } + GL::PixelType type() const { return _type; } /** * @brief Pixel size (in bytes) @@ -142,8 +142,8 @@ template class ImageView { private: PixelStorage _storage; - PixelFormat _format; - PixelType _type; + GL::PixelFormat _format; + GL::PixelType _type; Math::Vector _size; Containers::ArrayView _data; }; @@ -185,7 +185,7 @@ template class CompressedImageView { * @requires_gl Compressed pixel storage is hardcoded in OpenGL ES and * WebGL. */ - constexpr explicit CompressedImageView(CompressedPixelStorage storage, CompressedPixelFormat format, const VectorTypeFor& size, Containers::ArrayView data) noexcept; + constexpr explicit CompressedImageView(CompressedPixelStorage storage, GL::CompressedPixelFormat format, const VectorTypeFor& size, Containers::ArrayView data) noexcept; #endif /** @@ -197,7 +197,7 @@ template class CompressedImageView { * Similar the above, but uses default @ref CompressedPixelStorage * parameters (or the hardcoded ones in OpenGL ES and WebGL). */ - constexpr explicit CompressedImageView(CompressedPixelFormat format, const VectorTypeFor& size, Containers::ArrayView data) noexcept; + constexpr explicit CompressedImageView(GL::CompressedPixelFormat format, const VectorTypeFor& size, Containers::ArrayView data) noexcept; #ifndef MAGNUM_TARGET_GLES /** @@ -212,7 +212,7 @@ template class CompressedImageView { * @requires_gl Compressed pixel storage is hardcoded in OpenGL ES and * WebGL. */ - constexpr explicit CompressedImageView(CompressedPixelStorage storage, CompressedPixelFormat format, const VectorTypeFor& size) noexcept; + constexpr explicit CompressedImageView(CompressedPixelStorage storage, GL::CompressedPixelFormat format, const VectorTypeFor& size) noexcept; #endif /** @@ -223,7 +223,7 @@ template class CompressedImageView { * Similar the above, but uses default @ref CompressedPixelStorage * parameters (or the hardcoded ones in OpenGL ES and WebGL). */ - constexpr explicit CompressedImageView(CompressedPixelFormat format, const VectorTypeFor& size) noexcept; + constexpr explicit CompressedImageView(GL::CompressedPixelFormat format, const VectorTypeFor& size) noexcept; #ifndef MAGNUM_TARGET_GLES /** @@ -237,7 +237,7 @@ template class CompressedImageView { #endif /** @brief Format of compressed data */ - CompressedPixelFormat format() const { return _format; } + GL::CompressedPixelFormat format() const { return _format; } /** @brief Image size */ constexpr VectorTypeFor size() const { return _size; } @@ -281,7 +281,7 @@ template class CompressedImageView { #ifndef MAGNUM_TARGET_GLES CompressedPixelStorage _storage; #endif - CompressedPixelFormat _format; + GL::CompressedPixelFormat _format; Math::Vector _size; Containers::ArrayView _data; }; @@ -299,7 +299,7 @@ template constexpr CompressedImageView::Comp #ifndef MAGNUM_TARGET_GLES const CompressedPixelStorage storage, #endif - const CompressedPixelFormat format, const VectorTypeFor& size, const Containers::ArrayView data) noexcept: + const GL::CompressedPixelFormat format, const VectorTypeFor& size, const Containers::ArrayView data) noexcept: #ifndef MAGNUM_TARGET_GLES _storage{storage}, #endif @@ -309,16 +309,16 @@ template constexpr CompressedImageView::Comp #ifndef MAGNUM_TARGET_GLES const CompressedPixelStorage storage, #endif - const CompressedPixelFormat format, const VectorTypeFor& size) noexcept: + const GL::CompressedPixelFormat format, const VectorTypeFor& size) noexcept: #ifndef MAGNUM_TARGET_GLES _storage{storage}, #endif _format{format}, _size{size} {} #ifndef MAGNUM_TARGET_GLES -template constexpr CompressedImageView::CompressedImageView(const CompressedPixelFormat format, const VectorTypeFor& size, const Containers::ArrayView data) noexcept: CompressedImageView{{}, format, size, data} {} +template constexpr CompressedImageView::CompressedImageView(const GL::CompressedPixelFormat format, const VectorTypeFor& size, const Containers::ArrayView data) noexcept: CompressedImageView{{}, format, size, data} {} -template constexpr CompressedImageView::CompressedImageView(const CompressedPixelFormat format, const VectorTypeFor& size) noexcept: CompressedImageView{{}, format, size} {} +template constexpr CompressedImageView::CompressedImageView(const GL::CompressedPixelFormat format, const VectorTypeFor& size) noexcept: CompressedImageView{{}, format, size} {} #endif } diff --git a/src/Magnum/Magnum.h b/src/Magnum/Magnum.h index 8075b2d7b..9ed0879f2 100644 --- a/src/Magnum/Magnum.h +++ b/src/Magnum/Magnum.h @@ -90,7 +90,8 @@ Defined if built as static libraries. Default are shared libraries. Defined if the library is built in a way that allows multiple thread-local Magnum contexts. Enabled by default. -@see @ref building, @ref cmake, @ref Magnum::Context::current() "Context::current()" +@see @ref building, @ref cmake, + @ref Magnum::GL::Context::current() "GL::Context::current()" */ #define MAGNUM_BUILD_MULTITHREADED #undef MAGNUM_BUILD_MULTITHREADED diff --git a/src/Magnum/PixelStorage.cpp b/src/Magnum/PixelStorage.cpp index 9dfdba877..701e5534b 100644 --- a/src/Magnum/PixelStorage.cpp +++ b/src/Magnum/PixelStorage.cpp @@ -37,125 +37,125 @@ namespace Magnum { -std::size_t PixelStorage::pixelSize(PixelFormat format, PixelType type) { +std::size_t PixelStorage::pixelSize(GL::PixelFormat format, GL::PixelType type) { std::size_t size = 0; switch(type) { - case PixelType::UnsignedByte: + case GL::PixelType::UnsignedByte: #ifndef MAGNUM_TARGET_GLES2 - case PixelType::Byte: + case GL::PixelType::Byte: #endif size = 1; break; - case PixelType::UnsignedShort: + case GL::PixelType::UnsignedShort: #ifndef MAGNUM_TARGET_GLES2 - case PixelType::Short: + case GL::PixelType::Short: #endif - case PixelType::HalfFloat: + case GL::PixelType::HalfFloat: size = 2; break; - case PixelType::UnsignedInt: + case GL::PixelType::UnsignedInt: #ifndef MAGNUM_TARGET_GLES2 - case PixelType::Int: + case GL::PixelType::Int: #endif - case PixelType::Float: + case GL::PixelType::Float: size = 4; break; #ifndef MAGNUM_TARGET_GLES - case PixelType::UnsignedByte332: - case PixelType::UnsignedByte233Rev: + case GL::PixelType::UnsignedByte332: + case GL::PixelType::UnsignedByte233Rev: return 1; #endif - case PixelType::UnsignedShort565: + case GL::PixelType::UnsignedShort565: #ifndef MAGNUM_TARGET_GLES - case PixelType::UnsignedShort565Rev: + case GL::PixelType::UnsignedShort565Rev: #endif - case PixelType::UnsignedShort4444: + case GL::PixelType::UnsignedShort4444: #ifndef MAGNUM_TARGET_WEBGL - case PixelType::UnsignedShort4444Rev: + case GL::PixelType::UnsignedShort4444Rev: #endif - case PixelType::UnsignedShort5551: + case GL::PixelType::UnsignedShort5551: #ifndef MAGNUM_TARGET_WEBGL - case PixelType::UnsignedShort1555Rev: + case GL::PixelType::UnsignedShort1555Rev: #endif return 2; #ifndef MAGNUM_TARGET_GLES - case PixelType::UnsignedInt8888: - case PixelType::UnsignedInt8888Rev: - case PixelType::UnsignedInt1010102: + case GL::PixelType::UnsignedInt8888: + case GL::PixelType::UnsignedInt8888Rev: + case GL::PixelType::UnsignedInt1010102: #endif #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - case PixelType::UnsignedInt2101010Rev: + case GL::PixelType::UnsignedInt2101010Rev: #endif #ifndef MAGNUM_TARGET_GLES2 - case PixelType::UnsignedInt10F11F11FRev: - case PixelType::UnsignedInt5999Rev: + case GL::PixelType::UnsignedInt10F11F11FRev: + case GL::PixelType::UnsignedInt5999Rev: #endif - case PixelType::UnsignedInt248: + case GL::PixelType::UnsignedInt248: return 4; #ifndef MAGNUM_TARGET_GLES2 - case PixelType::Float32UnsignedInt248Rev: + case GL::PixelType::Float32UnsignedInt248Rev: return 8; #endif } switch(format) { #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - case PixelFormat::Red: + case GL::PixelFormat::Red: #endif #ifndef MAGNUM_TARGET_GLES2 - case PixelFormat::RedInteger: + case GL::PixelFormat::RedInteger: #endif #ifndef MAGNUM_TARGET_GLES - case PixelFormat::Green: - case PixelFormat::Blue: - case PixelFormat::GreenInteger: - case PixelFormat::BlueInteger: + case GL::PixelFormat::Green: + case GL::PixelFormat::Blue: + case GL::PixelFormat::GreenInteger: + case GL::PixelFormat::BlueInteger: #endif #ifdef MAGNUM_TARGET_GLES2 - case PixelFormat::Luminance: + case GL::PixelFormat::Luminance: #endif - case PixelFormat::DepthComponent: + case GL::PixelFormat::DepthComponent: #ifndef MAGNUM_TARGET_WEBGL - case PixelFormat::StencilIndex: + case GL::PixelFormat::StencilIndex: #endif return 1*size; #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - case PixelFormat::RG: + case GL::PixelFormat::RG: #endif #ifndef MAGNUM_TARGET_GLES2 - case PixelFormat::RGInteger: + case GL::PixelFormat::RGInteger: #endif #ifdef MAGNUM_TARGET_GLES2 - case PixelFormat::LuminanceAlpha: + case GL::PixelFormat::LuminanceAlpha: #endif return 2*size; - case PixelFormat::RGB: + case GL::PixelFormat::RGB: #ifndef MAGNUM_TARGET_GLES2 - case PixelFormat::RGBInteger: + case GL::PixelFormat::RGBInteger: #endif #ifndef MAGNUM_TARGET_GLES - case PixelFormat::BGR: - case PixelFormat::BGRInteger: + case GL::PixelFormat::BGR: + case GL::PixelFormat::BGRInteger: #endif #ifdef MAGNUM_TARGET_GLES2 - case PixelFormat::SRGB: + case GL::PixelFormat::SRGB: #endif return 3*size; - case PixelFormat::RGBA: + case GL::PixelFormat::RGBA: #ifndef MAGNUM_TARGET_GLES2 - case PixelFormat::RGBAInteger: + case GL::PixelFormat::RGBAInteger: #endif #ifndef MAGNUM_TARGET_WEBGL - case PixelFormat::BGRA: + case GL::PixelFormat::BGRA: #endif #ifdef MAGNUM_TARGET_GLES2 - case PixelFormat::SRGBAlpha: + case GL::PixelFormat::SRGBAlpha: #endif #ifndef MAGNUM_TARGET_GLES - case PixelFormat::BGRAInteger: + case GL::PixelFormat::BGRAInteger: #endif return 4*size; /* Handled above */ - case PixelFormat::DepthStencil: + case GL::PixelFormat::DepthStencil: CORRADE_ASSERT(false, "PixelStorage::pixelSize(): invalid PixelType specified for depth/stencil PixelFormat", 0); } @@ -174,7 +174,7 @@ bool PixelStorage::operator==(const PixelStorage& other) const { _alignment == other._alignment; } -std::tuple, Math::Vector3, std::size_t> PixelStorage::dataProperties(const PixelFormat format, const PixelType type, const Vector3i& size) const { +std::tuple, Math::Vector3, std::size_t> PixelStorage::dataProperties(const GL::PixelFormat format, const GL::PixelType type, const Vector3i& size) const { const std::size_t pixelSize = PixelStorage::pixelSize(format, type); const Math::Vector3 dataSize{ std::size_t(((( @@ -211,18 +211,18 @@ std::tuple, Math::Vector3, std::size_t> #endif void PixelStorage::applyInternal(const bool isUnpack) { - Implementation::RendererState::PixelStorage& state = isUnpack ? + GL::Implementation::RendererState::PixelStorage& state = isUnpack ? Context::current().state().renderer->unpackPixelStorage : Context::current().state().renderer->packPixelStorage; /* Alignment */ - if(state.alignment == Implementation::RendererState::PixelStorage::DisengagedValue || state.alignment != _alignment) + if(state.alignment == GL::Implementation::RendererState::PixelStorage::DisengagedValue || state.alignment != _alignment) glPixelStorei(isUnpack ? GL_UNPACK_ALIGNMENT : GL_PACK_ALIGNMENT, state.alignment = _alignment); /* Row length */ #if !(defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL)) - if(state.rowLength == Implementation::RendererState::PixelStorage::DisengagedValue || state.rowLength != _rowLength) + if(state.rowLength == GL::Implementation::RendererState::PixelStorage::DisengagedValue || state.rowLength != _rowLength) { /** @todo Use real value for GL_PACK_ROW_LENGTH_NV when it is in headers */ #ifndef MAGNUM_TARGET_GLES2 @@ -237,7 +237,7 @@ void PixelStorage::applyInternal(const bool isUnpack) { #ifndef MAGNUM_TARGET_GLES /* Image height (on ES for unpack only, taken care of below) */ - if(state.imageHeight == Implementation::RendererState::PixelStorage::DisengagedValue || state.imageHeight != _imageHeight) + if(state.imageHeight == GL::Implementation::RendererState::PixelStorage::DisengagedValue || state.imageHeight != _imageHeight) glPixelStorei(isUnpack ? GL_UNPACK_IMAGE_HEIGHT : GL_PACK_IMAGE_HEIGHT, state.imageHeight = _imageHeight); #endif @@ -245,18 +245,18 @@ void PixelStorage::applyInternal(const bool isUnpack) { /* On ES2 done by modifying data pointer */ #ifndef MAGNUM_TARGET_GLES2 /* Skip pixels */ - if(state.skip.x() == Implementation::RendererState::PixelStorage::DisengagedValue || state.skip.x() != _skip.x()) + if(state.skip.x() == GL::Implementation::RendererState::PixelStorage::DisengagedValue || state.skip.x() != _skip.x()) glPixelStorei(isUnpack ? GL_UNPACK_SKIP_PIXELS : GL_PACK_SKIP_PIXELS, state.skip.x() = _skip.x()); /* Skip rows */ - if(state.skip.y() == Implementation::RendererState::PixelStorage::DisengagedValue || state.skip.y() != _skip.y()) + if(state.skip.y() == GL::Implementation::RendererState::PixelStorage::DisengagedValue || state.skip.y() != _skip.y()) glPixelStorei(isUnpack ? GL_UNPACK_SKIP_ROWS : GL_PACK_SKIP_ROWS, state.skip.y() = _skip.y()); #ifndef MAGNUM_TARGET_GLES /* Skip images (on ES for unpack only, taken care of below) */ - if(state.skip.z() == Implementation::RendererState::PixelStorage::DisengagedValue || state.skip.z() != _skip.z()) + if(state.skip.z() == GL::Implementation::RendererState::PixelStorage::DisengagedValue || state.skip.z() != _skip.z()) glPixelStorei(isUnpack ? GL_UNPACK_SKIP_IMAGES : GL_PACK_SKIP_IMAGES, state.skip.z() = _skip.z()); #endif @@ -270,11 +270,11 @@ void PixelStorage::applyUnpack() { Implementation::RendererState::PixelStorage& state = Context::current().state().renderer->unpackPixelStorage; /* Image height (on ES for unpack only) */ - if(state.imageHeight == Implementation::RendererState::PixelStorage::DisengagedValue || state.imageHeight != _imageHeight) + if(state.imageHeight == GL::Implementation::RendererState::PixelStorage::DisengagedValue || state.imageHeight != _imageHeight) glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, state.imageHeight = _imageHeight); /* Skip images (on ES for unpack only) */ - if(state.skip.z() == Implementation::RendererState::PixelStorage::DisengagedValue || state.skip.z() != _skip.z()) + if(state.skip.z() == GL::Implementation::RendererState::PixelStorage::DisengagedValue || state.skip.z() != _skip.z()) glPixelStorei(GL_UNPACK_SKIP_IMAGES, state.skip.z() = _skip.z()); #endif } @@ -289,27 +289,27 @@ bool CompressedPixelStorage::operator==(const CompressedPixelStorage& other) con void CompressedPixelStorage::applyInternal(const bool isUnpack) { PixelStorage::applyInternal(isUnpack); - Implementation::RendererState::PixelStorage& state = isUnpack ? + GL::Implementation::RendererState::PixelStorage& state = isUnpack ? Context::current().state().renderer->unpackPixelStorage : Context::current().state().renderer->packPixelStorage; /* Compressed block width */ - if(state.compressedBlockSize.x() == Implementation::RendererState::PixelStorage::DisengagedValue || state.compressedBlockSize.x() != _blockSize.x()) + if(state.compressedBlockSize.x() == GL::Implementation::RendererState::PixelStorage::DisengagedValue || state.compressedBlockSize.x() != _blockSize.x()) glPixelStorei(isUnpack ? GL_UNPACK_COMPRESSED_BLOCK_WIDTH : GL_PACK_COMPRESSED_BLOCK_WIDTH, state.compressedBlockSize.x() = _blockSize.x()); /* Compressed block height */ - if(state.compressedBlockSize.y() == Implementation::RendererState::PixelStorage::DisengagedValue || state.compressedBlockSize.y() != _blockSize.y()) + if(state.compressedBlockSize.y() == GL::Implementation::RendererState::PixelStorage::DisengagedValue || state.compressedBlockSize.y() != _blockSize.y()) glPixelStorei(isUnpack ? GL_UNPACK_COMPRESSED_BLOCK_HEIGHT : GL_PACK_COMPRESSED_BLOCK_HEIGHT, state.compressedBlockSize.y() = _blockSize.y()); /* Compressed block depth */ - if(state.compressedBlockSize.z() == Implementation::RendererState::PixelStorage::DisengagedValue || state.compressedBlockSize.z() != _blockSize.z()) + if(state.compressedBlockSize.z() == GL::Implementation::RendererState::PixelStorage::DisengagedValue || state.compressedBlockSize.z() != _blockSize.z()) glPixelStorei(isUnpack ? GL_UNPACK_COMPRESSED_BLOCK_DEPTH : GL_PACK_COMPRESSED_BLOCK_DEPTH, state.compressedBlockSize.z() = _blockSize.z()); /* Compressed block size */ - if(state.compressedBlockDataSize == Implementation::RendererState::PixelStorage::DisengagedValue || state.compressedBlockDataSize != _blockDataSize) + if(state.compressedBlockDataSize == GL::Implementation::RendererState::PixelStorage::DisengagedValue || state.compressedBlockDataSize != _blockDataSize) glPixelStorei(isUnpack ? GL_UNPACK_COMPRESSED_BLOCK_SIZE : GL_PACK_COMPRESSED_BLOCK_SIZE, state.compressedBlockDataSize = _blockDataSize); } diff --git a/src/Magnum/PixelStorage.h b/src/Magnum/PixelStorage.h index 379e76e8d..6826ea6b6 100644 --- a/src/Magnum/PixelStorage.h +++ b/src/Magnum/PixelStorage.h @@ -60,9 +60,9 @@ to @fn_gl{PixelStore}. See also @ref Context::resetState() and @see @ref CompressedPixelStorage */ class MAGNUM_GL_EXPORT PixelStorage { - friend AbstractFramebuffer; - friend AbstractTexture; - friend CubeMapTexture; + friend GL::AbstractFramebuffer; + friend GL::AbstractTexture; + friend GL::CubeMapTexture; public: /** @@ -70,7 +70,7 @@ class MAGNUM_GL_EXPORT PixelStorage { * * @see @ref dataProperties() */ - static std::size_t pixelSize(PixelFormat format, PixelType type); + static std::size_t pixelSize(GL::PixelFormat format, GL::PixelType type); /** * @brief Default constructor @@ -197,7 +197,7 @@ class MAGNUM_GL_EXPORT PixelStorage { * byte offset of first pixel in the data array. * @see @ref pixelSize() */ - std::tuple, Math::Vector3, std::size_t> dataProperties(PixelFormat format, PixelType type, const Vector3i& size) const; + std::tuple, Math::Vector3, std::size_t> dataProperties(GL::PixelFormat format, GL::PixelType type, const Vector3i& size) const; #ifndef DOXYGEN_GENERATING_OUTPUT protected: @@ -244,8 +244,8 @@ which is ignored for compressed images. @requires_gl Compressed pixel storage is hardcoded in OpenGL ES and WebGL. */ class MAGNUM_GL_EXPORT CompressedPixelStorage: public PixelStorage { - friend AbstractTexture; - friend CubeMapTexture; + friend GL::AbstractTexture; + friend GL::CubeMapTexture; public: /** diff --git a/src/Magnum/Tags.h b/src/Magnum/Tags.h index f44146729..236c56379 100644 --- a/src/Magnum/Tags.h +++ b/src/Magnum/Tags.h @@ -55,4 +55,3 @@ constexpr NoCreateT NoCreate{NoCreateT::Init{}}; } #endif - diff --git a/src/MagnumPlugins/ObjImporter/Test/Test.cpp b/src/MagnumPlugins/ObjImporter/Test/Test.cpp index 7e38d7f94..e65eaa961 100644 --- a/src/MagnumPlugins/ObjImporter/Test/Test.cpp +++ b/src/MagnumPlugins/ObjImporter/Test/Test.cpp @@ -214,7 +214,7 @@ void ObjImporterTest::mixedPrimitives() { std::ostringstream out; Error redirectError{&out}; CORRADE_VERIFY(!importer->mesh3D(0)); - CORRADE_COMPARE(out.str(), "Trade::ObjImporter::mesh3D(): mixed primitive MeshPrimitive::Points and MeshPrimitive::Lines\n"); + CORRADE_COMPARE(out.str(), "Trade::ObjImporter::mesh3D(): mixed primitive GL::MeshPrimitive::Points and GL::MeshPrimitive::Lines\n"); } void ObjImporterTest::positionsOnly() { diff --git a/src/MagnumPlugins/TgaImageConverter/Test/TgaImageConverterTest.cpp b/src/MagnumPlugins/TgaImageConverter/Test/TgaImageConverterTest.cpp index a840404e4..97a14bd42 100644 --- a/src/MagnumPlugins/TgaImageConverter/Test/TgaImageConverterTest.cpp +++ b/src/MagnumPlugins/TgaImageConverter/Test/TgaImageConverterTest.cpp @@ -115,9 +115,9 @@ void TgaImageConverterTest::wrongFormat() { const auto data = converter->exportToData(image); CORRADE_VERIFY(!data); #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - CORRADE_COMPARE(out.str(), "Trade::TgaImageConverter::exportToData(): unsupported color format PixelFormat::RG\n"); + CORRADE_COMPARE(out.str(), "Trade::TgaImageConverter::exportToData(): unsupported color format GL::PixelFormat::RG\n"); #else - CORRADE_COMPARE(out.str(), "Trade::TgaImageConverter::exportToData(): unsupported color format PixelFormat::LuminanceAlpha\n"); + CORRADE_COMPARE(out.str(), "Trade::TgaImageConverter::exportToData(): unsupported color format GL::PixelFormat::LuminanceAlpha\n"); #endif } @@ -136,7 +136,7 @@ void TgaImageConverterTest::wrongType() { std::unique_ptr converter = _converterManager.instantiate("TgaImageConverter"); const auto data = converter->exportToData(image); CORRADE_VERIFY(!data); - CORRADE_COMPARE(out.str(), "Trade::TgaImageConverter::exportToData(): unsupported color type PixelType::Float\n"); + CORRADE_COMPARE(out.str(), "Trade::TgaImageConverter::exportToData(): unsupported color type GL::PixelType::Float\n"); } void TgaImageConverterTest::rgb() {