From 26db8f9f199d45fde4f6d790083fdb9d4dfba2d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 27 Jan 2020 17:54:14 +0100 Subject: [PATCH] GL: move friend declarations down into class privates. So the header is not horrifying right from the top. --- src/Magnum/GL/AbstractTexture.h | 8 ++++---- src/Magnum/GL/BufferTexture.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Magnum/GL/AbstractTexture.h b/src/Magnum/GL/AbstractTexture.h index 910248cc8..1482d856b 100644 --- a/src/Magnum/GL/AbstractTexture.h +++ b/src/Magnum/GL/AbstractTexture.h @@ -139,10 +139,6 @@ functions do nothing. @todo Query for immutable levels (@gl_extension{ARB,ES3_compatibility}) */ class MAGNUM_GL_EXPORT AbstractTexture: public AbstractObject { - friend Implementation::TextureState; - friend AbstractFramebuffer; - friend CubeMapTexture; - public: #ifndef MAGNUM_TARGET_GLES2 /** @@ -519,6 +515,10 @@ class MAGNUM_GL_EXPORT AbstractTexture: public AbstractObject { GLenum _target; private: + friend Implementation::TextureState; + friend AbstractFramebuffer; + friend CubeMapTexture; + #ifndef MAGNUM_TARGET_GLES static Int MAGNUM_GL_LOCAL compressedBlockDataSizeImplementationDefault(GLenum target, TextureFormat format); static Int MAGNUM_GL_LOCAL compressedBlockDataSizeImplementationBitsWorkaround(GLenum target, TextureFormat format); diff --git a/src/Magnum/GL/BufferTexture.h b/src/Magnum/GL/BufferTexture.h index eec3d9fe7..0fb2b90bd 100644 --- a/src/Magnum/GL/BufferTexture.h +++ b/src/Magnum/GL/BufferTexture.h @@ -81,8 +81,6 @@ and respective function documentation for more information. @requires_gles Texture buffers are not available in WebGL. */ class MAGNUM_GL_EXPORT BufferTexture: public AbstractTexture { - friend Implementation::TextureState; - public: /** * @brief Max supported buffer texture size @@ -259,6 +257,8 @@ class MAGNUM_GL_EXPORT BufferTexture: public AbstractTexture { #endif private: + friend Implementation::TextureState; + explicit BufferTexture(GLuint id, ObjectFlags flags): AbstractTexture{id, GL_TEXTURE_BUFFER, flags} {} void MAGNUM_GL_LOCAL setBufferImplementationDefault(BufferTextureFormat internalFormat, Buffer* buffer);