From ce466be335eb9fb909476a5af646f3d601296e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 12 Jul 2025 18:32:01 +0200 Subject: [PATCH] GL: add getters for ObjectFlags to all GL object wrappers. Mainly just for diagnostic purposes / testing, not really useful otherwise. --- src/Magnum/GL/AbstractQuery.h | 8 ++++++++ src/Magnum/GL/AbstractTexture.h | 11 +++++++++++ src/Magnum/GL/Buffer.h | 10 +++++++++- src/Magnum/GL/BufferTexture.h | 2 +- src/Magnum/GL/CubeMapTexture.h | 2 +- src/Magnum/GL/CubeMapTextureArray.h | 2 +- src/Magnum/GL/Framebuffer.h | 10 +++++++++- src/Magnum/GL/Mesh.h | 10 +++++++++- src/Magnum/GL/MultisampleTexture.h | 2 +- src/Magnum/GL/PipelineStatisticsQuery.h | 2 +- src/Magnum/GL/PrimitiveQuery.h | 2 +- src/Magnum/GL/RectangleTexture.h | 2 +- src/Magnum/GL/Renderbuffer.h | 10 +++++++++- src/Magnum/GL/SampleQuery.h | 2 +- src/Magnum/GL/Shader.h | 10 +++++++++- src/Magnum/GL/Test/AbstractQueryGLTest.cpp | 5 +++++ src/Magnum/GL/Test/AbstractTextureGLTest.cpp | 4 ++++ src/Magnum/GL/Test/BufferGLTest.cpp | 3 +++ src/Magnum/GL/Test/FramebufferGLTest.cpp | 4 ++++ src/Magnum/GL/Test/MeshGLTest.cpp | 3 +++ src/Magnum/GL/Test/RenderbufferGLTest.cpp | 5 +++++ src/Magnum/GL/Test/ShaderGLTest.cpp | 4 ++++ src/Magnum/GL/Test/TransformFeedbackGLTest.cpp | 4 ++++ src/Magnum/GL/Texture.h | 2 +- src/Magnum/GL/TextureArray.h | 2 +- src/Magnum/GL/TimeQuery.h | 2 +- src/Magnum/GL/TransformFeedback.h | 10 +++++++++- 27 files changed, 116 insertions(+), 17 deletions(-) diff --git a/src/Magnum/GL/AbstractQuery.h b/src/Magnum/GL/AbstractQuery.h index 920967e68..dd2a46e99 100644 --- a/src/Magnum/GL/AbstractQuery.h +++ b/src/Magnum/GL/AbstractQuery.h @@ -85,6 +85,14 @@ class MAGNUM_GL_EXPORT AbstractQuery: public AbstractObject { */ GLuint release(); + /** + * @brief Object flags + * @m_since_latest + * + * @see @ref wrap() + */ + ObjectFlags flags() const { return _flags; } + #ifndef MAGNUM_TARGET_WEBGL /** * @brief Query label diff --git a/src/Magnum/GL/AbstractTexture.h b/src/Magnum/GL/AbstractTexture.h index ab09dbd15..439b15a8a 100644 --- a/src/Magnum/GL/AbstractTexture.h +++ b/src/Magnum/GL/AbstractTexture.h @@ -351,6 +351,17 @@ class MAGNUM_GL_EXPORT AbstractTexture: public AbstractObject { */ GLuint release(); + /** + * @brief Object flags + * @m_since_latest + * + * @see @ref BufferTexture::wrap(), @ref CubeMapTexture::wrap(), + * @ref CubeMapTextureArray::wrap(), + * @ref MultisampleTexture::wrap(), @ref RectangleTexture::wrap(), + * @ref Texture::wrap(), @ref TextureArray::wrap() + */ + ObjectFlags flags() const { return _flags; } + /** * @brief OpenGL texture target * @m_since_latest diff --git a/src/Magnum/GL/Buffer.h b/src/Magnum/GL/Buffer.h index 8c2257c53..cc9bf1c74 100644 --- a/src/Magnum/GL/Buffer.h +++ b/src/Magnum/GL/Buffer.h @@ -889,7 +889,7 @@ class MAGNUM_GL_EXPORT Buffer: public AbstractObject { * Unlike buffer created using constructor, the OpenGL object is by * default not deleted on destruction, use @p flags for different * behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static Buffer wrap(GLuint id, TargetHint targetHint = TargetHint::Array, ObjectFlags flags = {}) { return Buffer{id, targetHint, flags}; @@ -1000,6 +1000,14 @@ class MAGNUM_GL_EXPORT Buffer: public AbstractObject { /* MinGW complains loudly if the declaration doesn't also have inline */ inline GLuint release(); + /** + * @brief Object flags + * @m_since_latest + * + * @see @ref wrap() + */ + ObjectFlags flags() const { return _flags; } + #ifndef MAGNUM_TARGET_WEBGL /** * @brief Buffer label diff --git a/src/Magnum/GL/BufferTexture.h b/src/Magnum/GL/BufferTexture.h index bccee76ba..1b658be64 100644 --- a/src/Magnum/GL/BufferTexture.h +++ b/src/Magnum/GL/BufferTexture.h @@ -112,7 +112,7 @@ class MAGNUM_GL_EXPORT BufferTexture: public AbstractTexture { * with target @def_gl{TEXTURE_BUFFER}. Unlike texture created using * constructor, the OpenGL object is by default not deleted on * destruction, use @p flags for different behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static BufferTexture wrap(GLuint id, ObjectFlags flags = {}) { return BufferTexture{id, flags}; diff --git a/src/Magnum/GL/CubeMapTexture.h b/src/Magnum/GL/CubeMapTexture.h index d1fbc607f..f0ad8e61d 100644 --- a/src/Magnum/GL/CubeMapTexture.h +++ b/src/Magnum/GL/CubeMapTexture.h @@ -178,7 +178,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * with target @def_gl{TEXTURE_CUBE_MAP}. Unlike texture created using * constructor, the OpenGL object is by default not deleted on * destruction, use @p flags for different behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static CubeMapTexture wrap(GLuint id, ObjectFlags flags = {}) { return CubeMapTexture{id, flags}; diff --git a/src/Magnum/GL/CubeMapTextureArray.h b/src/Magnum/GL/CubeMapTextureArray.h index f1a7fe6fb..5e9b28925 100644 --- a/src/Magnum/GL/CubeMapTextureArray.h +++ b/src/Magnum/GL/CubeMapTextureArray.h @@ -163,7 +163,7 @@ class MAGNUM_GL_EXPORT CubeMapTextureArray: public AbstractTexture { * with target @def_gl{TEXTURE_CUBE_MAP_ARRAY}. Unlike texture created * using constructor, the OpenGL object is by default not deleted on * destruction, use @p flags for different behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static CubeMapTextureArray wrap(GLuint id, ObjectFlags flags = {}) { return CubeMapTextureArray{id, flags}; diff --git a/src/Magnum/GL/Framebuffer.h b/src/Magnum/GL/Framebuffer.h index 71168d0b6..6006b9f81 100644 --- a/src/Magnum/GL/Framebuffer.h +++ b/src/Magnum/GL/Framebuffer.h @@ -392,7 +392,7 @@ class MAGNUM_GL_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractO * object. Unlike framebuffer created using constructor, the OpenGL * object is by default not deleted on destruction, use @p flags for * different behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static Framebuffer wrap(GLuint id, const Range2Di& viewport, ObjectFlags flags = {}) { return Framebuffer{id, viewport, flags}; @@ -459,6 +459,14 @@ class MAGNUM_GL_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractO /* MinGW complains loudly if the declaration doesn't also have inline */ inline GLuint release(); + /** + * @brief Object flags + * @m_since_latest + * + * @see @ref wrap() + */ + ObjectFlags flags() const { return _flags; } + #ifndef MAGNUM_TARGET_WEBGL /** * @brief Framebuffer label diff --git a/src/Magnum/GL/Mesh.h b/src/Magnum/GL/Mesh.h index 3c8afb41a..3ce68b49f 100644 --- a/src/Magnum/GL/Mesh.h +++ b/src/Magnum/GL/Mesh.h @@ -510,7 +510,7 @@ class MAGNUM_GL_EXPORT Mesh: public AbstractObject { * object. Unlike vertex array created using constructor, the OpenGL * object is by default not deleted on destruction, use @p flags for * different behavior. - * @see @ref release() + * @see @ref release(), @ref flags() * @requires_gl30 Extension @gl_extension{ARB,vertex_array_object} * @requires_gles30 Extension @gl_extension{OES,vertex_array_object} in * OpenGL ES 2.0. @@ -615,6 +615,14 @@ class MAGNUM_GL_EXPORT Mesh: public AbstractObject { */ GLuint release(); + /** + * @brief Object flags + * @m_since_latest + * + * @see @ref wrap() + */ + ObjectFlags flags() const { return _flags; } + #ifndef MAGNUM_TARGET_WEBGL /** * @brief Mesh label diff --git a/src/Magnum/GL/MultisampleTexture.h b/src/Magnum/GL/MultisampleTexture.h index d1000908b..fa2472c4b 100644 --- a/src/Magnum/GL/MultisampleTexture.h +++ b/src/Magnum/GL/MultisampleTexture.h @@ -201,7 +201,7 @@ MultisampleTexture: public AbstractTexture { * Unlike texture created using constructor, the OpenGL object is by * default not deleted on destruction, use @p flags for different * behavior. - * @see @ref release() + * @see @ref release(), @ref wrap() */ static MultisampleTexture wrap(GLuint id, ObjectFlags flags = {}) { return MultisampleTexture{id, flags}; diff --git a/src/Magnum/GL/PipelineStatisticsQuery.h b/src/Magnum/GL/PipelineStatisticsQuery.h index 8bca68246..e6010f7b2 100644 --- a/src/Magnum/GL/PipelineStatisticsQuery.h +++ b/src/Magnum/GL/PipelineStatisticsQuery.h @@ -119,7 +119,7 @@ class MAGNUM_GL_EXPORT PipelineStatisticsQuery: public AbstractQuery { * Unlike query created using constructor, the OpenGL object is by * default not deleted on destruction, use @p flags for different * behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static PipelineStatisticsQuery wrap(GLuint id, Target target, ObjectFlags flags = {}) { return PipelineStatisticsQuery{id, target, flags}; diff --git a/src/Magnum/GL/PrimitiveQuery.h b/src/Magnum/GL/PrimitiveQuery.h index f1028a0c9..50af54cb1 100644 --- a/src/Magnum/GL/PrimitiveQuery.h +++ b/src/Magnum/GL/PrimitiveQuery.h @@ -121,7 +121,7 @@ class MAGNUM_GL_EXPORT PrimitiveQuery: public AbstractQuery { * Unlike query created using constructor, the OpenGL object is by * default not deleted on destruction, use @p flags for different * behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static PrimitiveQuery wrap(GLuint id, Target target, ObjectFlags flags = {}) { return PrimitiveQuery{id, target, flags}; diff --git a/src/Magnum/GL/RectangleTexture.h b/src/Magnum/GL/RectangleTexture.h index d9d66439a..d0b64c5eb 100644 --- a/src/Magnum/GL/RectangleTexture.h +++ b/src/Magnum/GL/RectangleTexture.h @@ -125,7 +125,7 @@ class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture { * with target @def_gl{TEXTURE_RECTANGLE}. Unlike texture created using * constructor, the OpenGL object is by default not deleted on * destruction, use @p flags for different behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static RectangleTexture wrap(GLuint id, ObjectFlags flags = {}) { return RectangleTexture{id, flags}; diff --git a/src/Magnum/GL/Renderbuffer.h b/src/Magnum/GL/Renderbuffer.h index 85d15c66d..41b3abccf 100644 --- a/src/Magnum/GL/Renderbuffer.h +++ b/src/Magnum/GL/Renderbuffer.h @@ -109,7 +109,7 @@ class MAGNUM_GL_EXPORT Renderbuffer: public AbstractObject { * object. Unlike renderbuffer created using constructor, the OpenGL * object is by default not deleted on destruction, use @p flags for * different behavior. - * @see @ref release() + * @see @ref release(), @ref wrap() */ static Renderbuffer wrap(GLuint id, ObjectFlags flags = {}) { return Renderbuffer{id, flags}; @@ -178,6 +178,14 @@ class MAGNUM_GL_EXPORT Renderbuffer: public AbstractObject { /* MinGW complains loudly if the declaration doesn't also have inline */ inline GLuint release(); + /** + * @brief Object flags + * @m_since_latest + * + * @see @ref wrap() + */ + ObjectFlags flags() const { return _flags; } + #ifndef MAGNUM_TARGET_WEBGL /** * @brief Renderbuffer label diff --git a/src/Magnum/GL/SampleQuery.h b/src/Magnum/GL/SampleQuery.h index 189aaf06e..f0ec67dba 100644 --- a/src/Magnum/GL/SampleQuery.h +++ b/src/Magnum/GL/SampleQuery.h @@ -179,7 +179,7 @@ class MAGNUM_GL_EXPORT SampleQuery: public AbstractQuery { * Unlike query created using constructor, the OpenGL object is by * default not deleted on destruction, use @p flags for different * behavior. - * @see @ref release(), @fn_gl{IsQuery} + * @see @ref release(), @ref flags(), @fn_gl{IsQuery} */ static SampleQuery wrap(GLuint id, Target target, ObjectFlags flags = {}) { return SampleQuery{id, target, flags}; diff --git a/src/Magnum/GL/Shader.h b/src/Magnum/GL/Shader.h index c9cdf7a9c..006b5dd1d 100644 --- a/src/Magnum/GL/Shader.h +++ b/src/Magnum/GL/Shader.h @@ -575,7 +575,7 @@ class MAGNUM_GL_EXPORT Shader: public AbstractObject { * Unlike a shader created using a constructor, the OpenGL object is by * default not deleted on destruction, use @p flags for different * behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static Shader wrap(Type type, GLuint id, ObjectFlags flags = {}) { return Shader{type, id, flags}; @@ -645,6 +645,14 @@ class MAGNUM_GL_EXPORT Shader: public AbstractObject { /* MinGW complains loudly if the declaration doesn't also have inline */ inline GLuint release(); + /** + * @brief Object flags + * @m_since_latest + * + * @see @ref wrap() + */ + ObjectFlags flags() const { return _flags; } + #ifndef MAGNUM_TARGET_WEBGL /** * @brief Shader label diff --git a/src/Magnum/GL/Test/AbstractQueryGLTest.cpp b/src/Magnum/GL/Test/AbstractQueryGLTest.cpp index d1f67d77e..1dc052496 100644 --- a/src/Magnum/GL/Test/AbstractQueryGLTest.cpp +++ b/src/Magnum/GL/Test/AbstractQueryGLTest.cpp @@ -24,6 +24,8 @@ DEALINGS IN THE SOFTWARE. */ +#include + #include "Magnum/GL/Context.h" #include "Magnum/GL/Extensions.h" #include "Magnum/GL/OpenGLTester.h" @@ -62,6 +64,9 @@ void AbstractQueryGLTest::construct() { MAGNUM_VERIFY_NO_GL_ERROR(); CORRADE_VERIFY(query.id() > 0); + CORRADE_COMPARE_AS(query.flags(), + ObjectFlag::DeleteOnDestruction, + TestSuite::Compare::GreaterOrEqual); } MAGNUM_VERIFY_NO_GL_ERROR(); diff --git a/src/Magnum/GL/Test/AbstractTextureGLTest.cpp b/src/Magnum/GL/Test/AbstractTextureGLTest.cpp index 17e2a9c18..e892f4473 100644 --- a/src/Magnum/GL/Test/AbstractTextureGLTest.cpp +++ b/src/Magnum/GL/Test/AbstractTextureGLTest.cpp @@ -25,6 +25,7 @@ */ #include +#include #include "Magnum/ImageView.h" #include "Magnum/GL/Context.h" @@ -88,6 +89,9 @@ void AbstractTextureGLTest::construct() { MAGNUM_VERIFY_NO_GL_ERROR(); CORRADE_VERIFY(texture.id() > 0); + CORRADE_COMPARE_AS(texture.flags(), + ObjectFlag::DeleteOnDestruction, + TestSuite::Compare::GreaterOrEqual); CORRADE_COMPARE(texture.target(), GL_TEXTURE_2D); } diff --git a/src/Magnum/GL/Test/BufferGLTest.cpp b/src/Magnum/GL/Test/BufferGLTest.cpp index 6ad1a47bc..569d5167f 100644 --- a/src/Magnum/GL/Test/BufferGLTest.cpp +++ b/src/Magnum/GL/Test/BufferGLTest.cpp @@ -161,6 +161,9 @@ void BufferGLTest::construct() { MAGNUM_VERIFY_NO_GL_ERROR(); CORRADE_VERIFY(buffer.id() > 0); + CORRADE_COMPARE_AS(buffer.flags(), + ObjectFlag::DeleteOnDestruction, + TestSuite::Compare::GreaterOrEqual); CORRADE_COMPARE(buffer.targetHint(), Buffer::TargetHint::Array); CORRADE_COMPARE(buffer.size(), 0); } diff --git a/src/Magnum/GL/Test/FramebufferGLTest.cpp b/src/Magnum/GL/Test/FramebufferGLTest.cpp index f04153d7f..1a1ec62df 100644 --- a/src/Magnum/GL/Test/FramebufferGLTest.cpp +++ b/src/Magnum/GL/Test/FramebufferGLTest.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include "Magnum/Image.h" #include "Magnum/ImageView.h" @@ -383,6 +384,9 @@ void FramebufferGLTest::construct() { MAGNUM_VERIFY_NO_GL_ERROR(); CORRADE_VERIFY(framebuffer.id() > 0); + CORRADE_COMPARE_AS(framebuffer.flags(), + ObjectFlag::DeleteOnDestruction, + TestSuite::Compare::GreaterOrEqual); CORRADE_COMPARE(framebuffer.viewport(), Range2Di({32, 16}, {128, 256})); } diff --git a/src/Magnum/GL/Test/MeshGLTest.cpp b/src/Magnum/GL/Test/MeshGLTest.cpp index 6642726ee..82811cef4 100644 --- a/src/Magnum/GL/Test/MeshGLTest.cpp +++ b/src/Magnum/GL/Test/MeshGLTest.cpp @@ -789,6 +789,9 @@ void MeshGLTest::construct() { #endif { CORRADE_VERIFY(mesh.id() > 0); + CORRADE_COMPARE_AS(mesh.flags(), + ObjectFlag::DeleteOnDestruction, + TestSuite::Compare::GreaterOrEqual); } } diff --git a/src/Magnum/GL/Test/RenderbufferGLTest.cpp b/src/Magnum/GL/Test/RenderbufferGLTest.cpp index 990e25bee..aeb94054b 100644 --- a/src/Magnum/GL/Test/RenderbufferGLTest.cpp +++ b/src/Magnum/GL/Test/RenderbufferGLTest.cpp @@ -24,6 +24,8 @@ DEALINGS IN THE SOFTWARE. */ +#include + #include "Magnum/GL/Context.h" #include "Magnum/GL/Extensions.h" #include "Magnum/GL/OpenGLTester.h" @@ -86,6 +88,9 @@ void RenderbufferGLTest::construct() { MAGNUM_VERIFY_NO_GL_ERROR(); CORRADE_VERIFY(renderbuffer.id() > 0); + CORRADE_COMPARE_AS(renderbuffer.flags(), + ObjectFlag::DeleteOnDestruction, + TestSuite::Compare::GreaterOrEqual); } MAGNUM_VERIFY_NO_GL_ERROR(); diff --git a/src/Magnum/GL/Test/ShaderGLTest.cpp b/src/Magnum/GL/Test/ShaderGLTest.cpp index a6b50d189..3353dc401 100644 --- a/src/Magnum/GL/Test/ShaderGLTest.cpp +++ b/src/Magnum/GL/Test/ShaderGLTest.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -125,6 +126,9 @@ void ShaderGLTest::construct() { MAGNUM_VERIFY_NO_GL_ERROR(); CORRADE_VERIFY(shader.id() > 0); + CORRADE_COMPARE_AS(shader.flags(), + ObjectFlag::DeleteOnDestruction, + TestSuite::Compare::GreaterOrEqual); CORRADE_COMPARE(shader.type(), Shader::Type::Fragment); /* There may be various workaround defines after, so check just that the first source is the version definition */ diff --git a/src/Magnum/GL/Test/TransformFeedbackGLTest.cpp b/src/Magnum/GL/Test/TransformFeedbackGLTest.cpp index 83bc02181..3b9bb09fe 100644 --- a/src/Magnum/GL/Test/TransformFeedbackGLTest.cpp +++ b/src/Magnum/GL/Test/TransformFeedbackGLTest.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include "Magnum/Image.h" @@ -159,6 +160,9 @@ void TransformFeedbackGLTest::construct() { MAGNUM_VERIFY_NO_GL_ERROR(); CORRADE_VERIFY(feedback.id() > 0); + CORRADE_COMPARE_AS(feedback.flags(), + ObjectFlag::DeleteOnDestruction, + TestSuite::Compare::GreaterOrEqual); } MAGNUM_VERIFY_NO_GL_ERROR(); diff --git a/src/Magnum/GL/Texture.h b/src/Magnum/GL/Texture.h index 6d5e7d58f..a594a7e37 100644 --- a/src/Magnum/GL/Texture.h +++ b/src/Magnum/GL/Texture.h @@ -257,7 +257,7 @@ Texture: public AbstractTexture { * @def_gl{TEXTURE_3D} based on dimension count. Unlike texture created * using constructor, the OpenGL object is by default not deleted on * destruction, use @p flags for different behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static Texture wrap(GLuint id, ObjectFlags flags = {}) { return Texture{id, flags}; diff --git a/src/Magnum/GL/TextureArray.h b/src/Magnum/GL/TextureArray.h index 8a19fdadc..a5b50f176 100644 --- a/src/Magnum/GL/TextureArray.h +++ b/src/Magnum/GL/TextureArray.h @@ -235,7 +235,7 @@ TextureArray: public AbstractTexture { * based on dimension count. Unlike texture created using constructor, * the OpenGL object is by default not deleted on destruction, use * @p flags for different behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static TextureArray wrap(GLuint id, ObjectFlags flags = {}) { return TextureArray{id, flags}; diff --git a/src/Magnum/GL/TimeQuery.h b/src/Magnum/GL/TimeQuery.h index 775154cc5..ad47dda65 100644 --- a/src/Magnum/GL/TimeQuery.h +++ b/src/Magnum/GL/TimeQuery.h @@ -97,7 +97,7 @@ class MAGNUM_GL_EXPORT TimeQuery: public AbstractQuery { * Unlike query created using constructor, the OpenGL object is by * default not deleted on destruction, use @p flags for different * behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static TimeQuery wrap(GLuint id, Target target, ObjectFlags flags = {}) { return TimeQuery{id, target, flags}; diff --git a/src/Magnum/GL/TransformFeedback.h b/src/Magnum/GL/TransformFeedback.h index 9fc8a54a1..b74deb1ae 100644 --- a/src/Magnum/GL/TransformFeedback.h +++ b/src/Magnum/GL/TransformFeedback.h @@ -181,7 +181,7 @@ class MAGNUM_GL_EXPORT TransformFeedback: public AbstractObject { * object. Unlike renderbuffer created using constructor, the OpenGL * object is by default not deleted on destruction, use @p flags for * different behavior. - * @see @ref release() + * @see @ref release(), @ref flags() */ static TransformFeedback wrap(GLuint id, ObjectFlags flags = {}) { return TransformFeedback{id, flags}; @@ -250,6 +250,14 @@ class MAGNUM_GL_EXPORT TransformFeedback: public AbstractObject { /* MinGW complains loudly if the declaration doesn't also have inline */ inline GLuint release(); + /** + * @brief Object flags + * @m_since_latest + * + * @see @ref wrap() + */ + ObjectFlags flags() const { return _flags; } + #ifndef MAGNUM_TARGET_WEBGL /** * @brief Transform feedback label