ids, bool enabled);
#endif
- static MAGNUM_LOCAL void callbackImplementationNoOp(Callback, const void*);
+ static MAGNUM_GL_LOCAL void callbackImplementationNoOp(Callback, const void*);
#ifndef MAGNUM_TARGET_GLES2
- static MAGNUM_LOCAL void callbackImplementationKhrDesktopES32(Callback callback, const void* userParam);
+ static MAGNUM_GL_LOCAL void callbackImplementationKhrDesktopES32(Callback callback, const void* userParam);
#endif
#ifdef MAGNUM_TARGET_GLES
- static MAGNUM_LOCAL void callbackImplementationKhrES(Callback callback, const void* userParam);
+ static MAGNUM_GL_LOCAL void callbackImplementationKhrES(Callback callback, const void* userParam);
#endif
};
/** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Source} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Source value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Source value);
/** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Type} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Type value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Type value);
/** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Severity} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Severity value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Severity value);
/**
@brief Debug message
@@ -438,7 +438,7 @@ available and default debug output callback is enabled for given kind of
messages, the inserted message will be printed on standard output in the
following form:
-@snippet Magnum.cpp DebugMessage-usage
+@snippet MagnumGL.cpp DebugMessage-usage
@code{.shell-session}
@@ -463,7 +463,7 @@ performance effects.
@see @ref DebugGroup
@requires_gles Debug output is not available in WebGL.
*/
-class MAGNUM_EXPORT DebugMessage {
+class MAGNUM_GL_EXPORT DebugMessage {
friend Implementation::DebugState;
public:
@@ -582,24 +582,24 @@ class MAGNUM_EXPORT DebugMessage {
private:
static void insertInternal(Source source, Type type, UnsignedInt id, DebugOutput::Severity severity, Containers::ArrayView string);
- static MAGNUM_LOCAL void insertImplementationNoOp(Source, Type, UnsignedInt, DebugOutput::Severity, Containers::ArrayView);
+ static MAGNUM_GL_LOCAL void insertImplementationNoOp(Source, Type, UnsignedInt, DebugOutput::Severity, Containers::ArrayView);
#ifndef MAGNUM_TARGET_GLES2
- static MAGNUM_LOCAL void insertImplementationKhrDesktopES32(Source source, Type type, UnsignedInt id, DebugOutput::Severity severity, Containers::ArrayView string);
+ static MAGNUM_GL_LOCAL void insertImplementationKhrDesktopES32(Source source, Type type, UnsignedInt id, DebugOutput::Severity severity, Containers::ArrayView string);
#endif
#ifdef MAGNUM_TARGET_GLES
- static MAGNUM_LOCAL void insertImplementationKhrES(Source source, Type type, UnsignedInt id, DebugOutput::Severity severity, Containers::ArrayView string);
+ static MAGNUM_GL_LOCAL void insertImplementationKhrES(Source source, Type type, UnsignedInt id, DebugOutput::Severity severity, Containers::ArrayView string);
#endif
- static MAGNUM_LOCAL void insertImplementationExt(Source, Type, UnsignedInt, DebugOutput::Severity, Containers::ArrayView string);
+ static MAGNUM_GL_LOCAL void insertImplementationExt(Source, Type, UnsignedInt, DebugOutput::Severity, Containers::ArrayView string);
#ifndef MAGNUM_TARGET_GLES
- static MAGNUM_LOCAL void insertImplementationGremedy(Source, Type, UnsignedInt, DebugOutput::Severity, Containers::ArrayView string);
+ static MAGNUM_GL_LOCAL void insertImplementationGremedy(Source, Type, UnsignedInt, DebugOutput::Severity, Containers::ArrayView string);
#endif
};
/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Source} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, DebugMessage::Source value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugMessage::Source value);
/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Type} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, DebugMessage::Type value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugMessage::Type value);
/**
@brief Debug group
@@ -614,12 +614,12 @@ See @ref DebugOutput for introduction.
Easiest way is to push debug group by creating instance and pop it
automatically at the end of scope:
-@snippet Magnum.cpp DebugGroup-usage1
+@snippet MagnumGL.cpp DebugGroup-usage1
If, for some reason, you need to pop in different scope, you can call @ref push()
and @ref pop() manually:
-@snippet Magnum.cpp DebugGroup-usage2
+@snippet MagnumGL.cpp DebugGroup-usage2
If OpenGL 4.3 / OpenGL ES 3.2 is supported or @extension{KHR,debug} desktop or
ES extension (covered also by @extension{ANDROID,extension_pack_es31a}) is
@@ -665,7 +665,7 @@ performance effects.
@see @ref DebugMessage
@requires_gles Debug output is not available in WebGL.
*/
-class MAGNUM_EXPORT DebugGroup {
+class MAGNUM_GL_EXPORT DebugGroup {
friend Implementation::DebugState;
public:
@@ -781,29 +781,29 @@ class MAGNUM_EXPORT DebugGroup {
private:
void pushInternal(Source source, UnsignedInt id, Containers::ArrayView message);
- static MAGNUM_LOCAL void pushImplementationNoOp(Source source, UnsignedInt id, Containers::ArrayView message);
+ static MAGNUM_GL_LOCAL void pushImplementationNoOp(Source source, UnsignedInt id, Containers::ArrayView message);
#ifndef MAGNUM_TARGET_GLES2
- static MAGNUM_LOCAL void pushImplementationKhrDesktopES32(Source source, UnsignedInt id, Containers::ArrayView message);
+ static MAGNUM_GL_LOCAL void pushImplementationKhrDesktopES32(Source source, UnsignedInt id, Containers::ArrayView message);
#endif
#ifdef MAGNUM_TARGET_GLES
- static MAGNUM_LOCAL void pushImplementationKhrES(Source source, UnsignedInt id, Containers::ArrayView message);
+ static MAGNUM_GL_LOCAL void pushImplementationKhrES(Source source, UnsignedInt id, Containers::ArrayView message);
#endif
- static MAGNUM_LOCAL void pushImplementationExt(Source source, UnsignedInt id, Containers::ArrayView message);
+ static MAGNUM_GL_LOCAL void pushImplementationExt(Source source, UnsignedInt id, Containers::ArrayView message);
- static MAGNUM_LOCAL void popImplementationNoOp();
+ static MAGNUM_GL_LOCAL void popImplementationNoOp();
#ifndef MAGNUM_TARGET_GLES2
- static MAGNUM_LOCAL void popImplementationKhrDesktopES32();
+ static MAGNUM_GL_LOCAL void popImplementationKhrDesktopES32();
#endif
#ifdef MAGNUM_TARGET_GLES
- static MAGNUM_LOCAL void popImplementationKhrES();
+ static MAGNUM_GL_LOCAL void popImplementationKhrES();
#endif
- static MAGNUM_LOCAL void popImplementationExt();
+ static MAGNUM_GL_LOCAL void popImplementationExt();
bool _active;
};
/** @debugoperatorclassenum{Magnum::DebugGroup,Magnum::DebugGroup::Source} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, DebugGroup::Source value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DebugGroup::Source value);
}
#else
diff --git a/src/Magnum/DefaultFramebuffer.cpp b/src/Magnum/GL/DefaultFramebuffer.cpp
similarity index 97%
rename from src/Magnum/DefaultFramebuffer.cpp
rename to src/Magnum/GL/DefaultFramebuffer.cpp
index f7e1cb4d3..6763b9acd 100644
--- a/src/Magnum/DefaultFramebuffer.cpp
+++ b/src/Magnum/GL/DefaultFramebuffer.cpp
@@ -27,10 +27,10 @@
#include
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
-#include "Magnum/Implementation/State.h"
-#include "Magnum/Implementation/FramebufferState.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
+#include "Magnum/GL/Implementation/State.h"
+#include "Magnum/GL/Implementation/FramebufferState.h"
#ifndef MAGNUM_TARGET_GLES2
#include "Magnum/Math/Color.h"
#endif
diff --git a/src/Magnum/DefaultFramebuffer.h b/src/Magnum/GL/DefaultFramebuffer.h
similarity index 96%
rename from src/Magnum/DefaultFramebuffer.h
rename to src/Magnum/GL/DefaultFramebuffer.h
index 6c28f237d..c57cff2b7 100644
--- a/src/Magnum/DefaultFramebuffer.h
+++ b/src/Magnum/GL/DefaultFramebuffer.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_DefaultFramebuffer_h
-#define Magnum_DefaultFramebuffer_h
+#ifndef Magnum_GL_DefaultFramebuffer_h
+#define Magnum_GL_DefaultFramebuffer_h
/*
This file is part of Magnum.
@@ -29,7 +29,7 @@
* @brief Class @ref Magnum::DefaultFramebuffer
*/
-#include "Magnum/AbstractFramebuffer.h"
+#include "Magnum/GL/AbstractFramebuffer.h"
namespace Magnum {
@@ -49,7 +49,7 @@ classes, pass the new size in your
@ref Platform::Sdl2Application::viewportEvent() "viewportEvent()"
implementation, for example:
-@snippet Magnum-framebuffer.cpp DefaultFramebuffer-usage-viewport
+@snippet MagnumGL-framebuffer.cpp DefaultFramebuffer-usage-viewport
Next thing you probably want is to clear all used buffers before performing
any drawing. Again, in case you're using one of the
@@ -57,7 +57,7 @@ any drawing. Again, in case you're using one of the
@ref Platform::Sdl2Application::drawEvent() "drawEvent()" implementation, for
example:
-@snippet Magnum-framebuffer.cpp DefaultFramebuffer-usage-clear
+@snippet MagnumGL-framebuffer.cpp DefaultFramebuffer-usage-clear
See documentation of particular functions and @ref Framebuffer documentation
for more involved usage, usage of non-default or multiple framebuffers.
@@ -72,7 +72,7 @@ If either @extension{ARB,direct_state_access} (part of OpenGL 4.5) or
use DSA to avoid unnecessary calls to @fn_gl{BindFramebuffer}. See their
respective documentation for more information.
*/
-class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
+class MAGNUM_GL_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
friend Context;
public:
@@ -306,7 +306,7 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
};
#endif
- explicit MAGNUM_LOCAL DefaultFramebuffer();
+ explicit MAGNUM_GL_LOCAL DefaultFramebuffer();
/** @brief Copying is not allowed */
DefaultFramebuffer(const DefaultFramebuffer&) = delete;
@@ -371,7 +371,7 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
* can achieve the same by passing @ref DrawAttachment::None as
* attachment. Example usage:
*
- * @snippet Magnum.cpp DefaultFramebuffer-usage-map
+ * @snippet MagnumGL.cpp DefaultFramebuffer-usage-map
*
* If neither @extension{ARB,direct_state_access} (part of OpenGL 4.5)
* nor @extension{EXT,direct_state_access} desktop extension is
@@ -500,14 +500,14 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
#endif
private:
- static void MAGNUM_LOCAL initializeContextBasedFunctionality(Context& context);
+ static void MAGNUM_GL_LOCAL initializeContextBasedFunctionality(Context& context);
};
/** @brief Default framebuffer instance */
-extern DefaultFramebuffer MAGNUM_EXPORT defaultFramebuffer;
+extern DefaultFramebuffer MAGNUM_GL_EXPORT defaultFramebuffer;
/** @debugoperatorclassenum{Magnum::DefaultFramebuffer,Magnum::DefaultFramebuffer::Status} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, DefaultFramebuffer::Status value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, DefaultFramebuffer::Status value);
}
diff --git a/src/Magnum/Extensions.h b/src/Magnum/GL/Extensions.h
similarity index 98%
rename from src/Magnum/Extensions.h
rename to src/Magnum/GL/Extensions.h
index be040a870..fa320f14d 100644
--- a/src/Magnum/Extensions.h
+++ b/src/Magnum/GL/Extensions.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Extensions_h
-#define Magnum_Extensions_h
+#ifndef Magnum_GL_Extensions_h
+#define Magnum_GL_Extensions_h
/*
This file is part of Magnum.
@@ -29,7 +29,7 @@
* @brief Namespace @ref Magnum::Extensions
*/
-#include "Magnum/Version.h"
+#include "Magnum/GL/Version.h"
namespace Magnum {
@@ -60,17 +60,18 @@ but these structs are better suited for compile-time decisions rather than
@ref Extension instances. See @ref Context::isExtensionSupported() for example
usage.
-This library is built by default. To use this library with CMake, you need to
-find the `Magnum` package and link to the `Magnum::Magnum` target:
+This library 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)
+find_package(Magnum REQUIRED GL)
# ...
-target_link_libraries(your-app Magnum::Magnum)
+target_link_libraries(your-app Magnum::GL)
@endcode
-See @ref building and @ref cmake for more information.
+See @ref building, @ref cmake and @ref opengl for more information.
@see @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED()
*/
namespace Extensions {
diff --git a/src/Magnum/Framebuffer.cpp b/src/Magnum/GL/Framebuffer.cpp
similarity index 97%
rename from src/Magnum/Framebuffer.cpp
rename to src/Magnum/GL/Framebuffer.cpp
index 99cd4917b..8491b6783 100644
--- a/src/Magnum/Framebuffer.cpp
+++ b/src/Magnum/GL/Framebuffer.cpp
@@ -27,36 +27,34 @@
#include
-#include "Magnum/Context.h"
-#include "Magnum/CubeMapTexture.h"
-#include "Magnum/DefaultFramebuffer.h"
-#include "Magnum/Extensions.h"
#include "Magnum/Image.h"
-#include "Magnum/Renderbuffer.h"
-#include "Magnum/Texture.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/CubeMapTexture.h"
+#include "Magnum/GL/DefaultFramebuffer.h"
+#include "Magnum/GL/Extensions.h"
+#include "Magnum/GL/Renderbuffer.h"
+#include "Magnum/GL/Texture.h"
#ifndef MAGNUM_TARGET_GLES2
-#include "Magnum/Math/Color.h"
-#endif
-
-#ifndef MAGNUM_TARGET_GLES2
-#include "Magnum/BufferImage.h"
+#include "Magnum/GL/BufferImage.h"
#ifndef MAGNUM_TARGET_WEBGL
-#include "Magnum/MultisampleTexture.h"
+#include "Magnum/GL/MultisampleTexture.h"
#endif
-#include "Magnum/TextureArray.h"
+#include "Magnum/GL/TextureArray.h"
#endif
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
-#include "Magnum/CubeMapTextureArray.h"
+#include "Magnum/GL/CubeMapTextureArray.h"
#endif
#ifndef MAGNUM_TARGET_GLES
-#include "Magnum/RectangleTexture.h"
+#include "Magnum/GL/RectangleTexture.h"
#endif
-
#ifndef MAGNUM_TARGET_WEBGL
-#include "Implementation/DebugState.h"
+#include "Magnum/GL/Implementation/DebugState.h"
+#endif
+#include "Magnum/GL/Implementation/State.h"
+#include "Magnum/GL/Implementation/FramebufferState.h"
+#ifndef MAGNUM_TARGET_GLES2
+#include "Magnum/Math/Color.h"
#endif
-#include "Implementation/State.h"
-#include "Implementation/FramebufferState.h"
namespace Magnum {
diff --git a/src/Magnum/Framebuffer.h b/src/Magnum/GL/Framebuffer.h
similarity index 94%
rename from src/Magnum/Framebuffer.h
rename to src/Magnum/GL/Framebuffer.h
index 24188186b..f0a491aab 100644
--- a/src/Magnum/Framebuffer.h
+++ b/src/Magnum/GL/Framebuffer.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Framebuffer_h
-#define Magnum_Framebuffer_h
+#ifndef Magnum_GL_Framebuffer_h
+#define Magnum_GL_Framebuffer_h
/*
This file is part of Magnum.
@@ -31,8 +31,8 @@
#include
-#include "Magnum/AbstractFramebuffer.h"
#include "Magnum/Tags.h"
+#include "Magnum/GL/AbstractFramebuffer.h"
#ifdef _X11_XLIB_H_ /* Xlib.h, I hate you sincerely */
#undef Status
@@ -56,18 +56,18 @@ textures for actual on-screen rendering. First you need to create the
framebuffer with the same viewport as default framebuffer and attach textures
and renderbuffers to desired outputs:
-@snippet Magnum.cpp Framebuffer-usage-attach
+@snippet MagnumGL.cpp Framebuffer-usage-attach
Then you need to map outputs of your shader to color attachments in the
framebuffer:
-@snippet Magnum.cpp Framebuffer-usage-map
+@snippet MagnumGL.cpp Framebuffer-usage-map
The actual @ref Platform::Sdl2Application::drawEvent() "drawEvent()" might look
like this. First you clear all buffers you need, perform drawing to off-screen
framebuffer, then bind the default and render the textures on screen:
-@snippet Magnum-framebuffer.cpp Framebuffer-usage-draw
+@snippet MagnumGL-framebuffer.cpp Framebuffer-usage-draw
@section Framebuffer-performance-optimizations Performance optimizations
@@ -83,7 +83,7 @@ information.
@requires_gl30 Extension @extension{ARB,framebuffer_object}
*/
-class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObject {
+class MAGNUM_GL_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObject {
friend Implementation::FramebufferState;
public:
@@ -128,7 +128,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
* @requires_webgl20 Extension @webgl_extension{WEBGL,draw_buffers} in
* WebGL 1.0.
*/
- class MAGNUM_EXPORT DrawAttachment {
+ class MAGNUM_GL_EXPORT DrawAttachment {
public:
/**
* @brief No attachment
@@ -160,7 +160,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
* @requires_webgl20 Extension @webgl_extension{WEBGL,draw_buffers} in
* WebGL 1.0.
*/
- class MAGNUM_EXPORT BufferAttachment {
+ class MAGNUM_GL_EXPORT BufferAttachment {
public:
/**
* @brief Depth buffer
@@ -214,7 +214,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
* @requires_webgl20 Framebuffer invalidation is not available in WebGL
* 1.0.
*/
- class MAGNUM_EXPORT InvalidationAttachment {
+ class MAGNUM_GL_EXPORT InvalidationAttachment {
public:
/**
* @brief Invalidate depth buffer
@@ -892,55 +892,55 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
private:
explicit Framebuffer(GLuint id, const Range2Di& viewport, ObjectFlags flags) noexcept: AbstractFramebuffer{id, viewport, flags} {}
- void MAGNUM_LOCAL createImplementationDefault();
+ void MAGNUM_GL_LOCAL createImplementationDefault();
#ifndef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL createImplementationDSA();
+ void MAGNUM_GL_LOCAL createImplementationDSA();
#endif
#ifndef MAGNUM_TARGET_WEBGL
Framebuffer& setLabelInternal(Containers::ArrayView label);
#endif
- void MAGNUM_LOCAL renderbufferImplementationDefault(BufferAttachment attachment, GLuint renderbufferId);
+ void MAGNUM_GL_LOCAL renderbufferImplementationDefault(BufferAttachment attachment, GLuint renderbufferId);
#ifndef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL renderbufferImplementationDSA(BufferAttachment attachment, GLuint renderbufferId);
- void MAGNUM_LOCAL renderbufferImplementationDSAEXT(BufferAttachment attachment, GLuint renderbufferId);
+ void MAGNUM_GL_LOCAL renderbufferImplementationDSA(BufferAttachment attachment, GLuint renderbufferId);
+ void MAGNUM_GL_LOCAL renderbufferImplementationDSAEXT(BufferAttachment attachment, GLuint renderbufferId);
#endif
#ifndef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL texture1DImplementationDefault(BufferAttachment attachment, GLuint textureId, GLint level);
- void MAGNUM_LOCAL texture1DImplementationDSAEXT(BufferAttachment attachment, GLuint textureId, GLint level);
+ void MAGNUM_GL_LOCAL texture1DImplementationDefault(BufferAttachment attachment, GLuint textureId, GLint level);
+ void MAGNUM_GL_LOCAL texture1DImplementationDSAEXT(BufferAttachment attachment, GLuint textureId, GLint level);
#endif
- void MAGNUM_LOCAL texture2DImplementationDefault(BufferAttachment attachment, GLenum textureTarget, GLuint textureId, GLint level);
+ void MAGNUM_GL_LOCAL texture2DImplementationDefault(BufferAttachment attachment, GLenum textureTarget, GLuint textureId, GLint level);
#ifndef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL texture2DImplementationDSA(BufferAttachment attachment, GLenum textureTarget, GLuint textureId, GLint level);
- void MAGNUM_LOCAL texture2DImplementationDSAEXT(BufferAttachment attachment, GLenum textureTarget, GLuint textureId, GLint level);
- void MAGNUM_LOCAL textureCubeMapImplementationDSA(BufferAttachment attachment, GLenum textureTarget, GLuint textureId, GLint level);
+ void MAGNUM_GL_LOCAL texture2DImplementationDSA(BufferAttachment attachment, GLenum textureTarget, GLuint textureId, GLint level);
+ void MAGNUM_GL_LOCAL texture2DImplementationDSAEXT(BufferAttachment attachment, GLenum textureTarget, GLuint textureId, GLint level);
+ void MAGNUM_GL_LOCAL textureCubeMapImplementationDSA(BufferAttachment attachment, GLenum textureTarget, GLuint textureId, GLint level);
#endif
#if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2)
- void MAGNUM_LOCAL textureImplementationDefault(BufferAttachment attachment, GLuint textureId, GLint level);
+ void MAGNUM_GL_LOCAL textureImplementationDefault(BufferAttachment attachment, GLuint textureId, GLint level);
#ifdef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL textureImplementationEXT(BufferAttachment attachment, GLuint textureId, GLint level);
+ void MAGNUM_GL_LOCAL textureImplementationEXT(BufferAttachment attachment, GLuint textureId, GLint level);
#endif
#endif
#ifndef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL textureImplementationDSA(BufferAttachment attachment, GLuint textureId, GLint level);
- void MAGNUM_LOCAL textureImplementationDSAEXT(BufferAttachment attachment, GLuint textureId, GLint level);
+ void MAGNUM_GL_LOCAL textureImplementationDSA(BufferAttachment attachment, GLuint textureId, GLint level);
+ void MAGNUM_GL_LOCAL textureImplementationDSAEXT(BufferAttachment attachment, GLuint textureId, GLint level);
#endif
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
- void MAGNUM_LOCAL textureLayerImplementationDefault(BufferAttachment attachment, GLuint textureId, GLint level, GLint layer);
+ void MAGNUM_GL_LOCAL textureLayerImplementationDefault(BufferAttachment attachment, GLuint textureId, GLint level, GLint layer);
#endif
#ifndef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL textureLayerImplementationDSA(BufferAttachment attachment, GLuint textureId, GLint level, GLint layer);
- void MAGNUM_LOCAL textureLayerImplementationDSAEXT(BufferAttachment attachment, GLuint textureId, GLint level, GLint layer);
+ void MAGNUM_GL_LOCAL textureLayerImplementationDSA(BufferAttachment attachment, GLuint textureId, GLint level, GLint layer);
+ void MAGNUM_GL_LOCAL textureLayerImplementationDSAEXT(BufferAttachment attachment, GLuint textureId, GLint level, GLint layer);
#endif
};
/** @debugoperatorclassenum{Magnum::Framebuffer,Magnum::Framebuffer::Status} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, Framebuffer::Status value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Framebuffer::Status value);
inline Framebuffer::Framebuffer(Framebuffer&& other) noexcept {
_id = other._id;
diff --git a/src/Magnum/GL/GL.h b/src/Magnum/GL/GL.h
new file mode 100644
index 000000000..5d9aea44c
--- /dev/null
+++ b/src/Magnum/GL/GL.h
@@ -0,0 +1,179 @@
+#ifndef Magnum_GL_h
+#define Magnum_GL_h
+/*
+ This file is part of Magnum.
+
+ Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
+ Vladimír Vondruš
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+*/
+
+/** @file
+ * @brief Forward declarations for the @ref Magnum::GL namespace
+ */
+
+#include "Magnum/Types.h"
+
+#ifndef DOXYGEN_GENERATING_OUTPUT
+typedef unsigned int GLenum; /* Needed for *Format and *Type enums */
+#endif
+
+namespace Magnum {
+
+#ifndef DOXYGEN_GENERATING_OUTPUT
+/* FramebufferClear[Mask], FramebufferBlit[Mask], FramebufferBlitFilter,
+ FramebufferTarget enums used only directly with framebuffer instance */
+class AbstractFramebuffer;
+
+#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
+class AbstractQuery;
+#endif
+class AbstractShaderProgram;
+class AbstractTexture;
+
+template class Attribute;
+
+enum class BufferUsage: GLenum;
+class Buffer;
+
+#ifndef MAGNUM_TARGET_GLES2
+template class BufferImage;
+typedef BufferImage<1> BufferImage1D;
+typedef BufferImage<2> BufferImage2D;
+typedef BufferImage<3> BufferImage3D;
+
+template class CompressedBufferImage;
+typedef CompressedBufferImage<1> CompressedBufferImage1D;
+typedef CompressedBufferImage<2> CompressedBufferImage2D;
+typedef CompressedBufferImage<3> CompressedBufferImage3D;
+#endif
+
+#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
+class BufferTexture;
+enum class BufferTextureFormat: GLenum;
+#endif
+
+class Context;
+
+class CubeMapTexture;
+enum class CubeMapCoordinate: GLenum;
+#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
+class CubeMapTextureArray;
+#endif
+
+/* DebugOutput, DebugMessage, DebugGroup used only statically */
+/* DefaultFramebuffer is available only through global instance */
+/* DimensionTraits forward declaration is not needed */
+
+class Extension;
+class Framebuffer;
+
+#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
+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;
+class MeshView;
+
+#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
+/* MultisampleTextureSampleLocations enum used only in the function */
+template class MultisampleTexture;
+typedef MultisampleTexture<2> MultisampleTexture2D;
+typedef MultisampleTexture<3> MultisampleTexture2DArray;
+#endif
+
+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;
+class SampleQuery;
+class TimeQuery;
+
+#ifndef MAGNUM_TARGET_GLES
+class RectangleTexture;
+#endif
+
+class Renderbuffer;
+enum class RenderbufferFormat: GLenum;
+
+class Sampler;
+class Shader;
+
+template class Texture;
+#ifndef MAGNUM_TARGET_GLES
+typedef Texture<1> Texture1D;
+#endif
+typedef Texture<2> Texture2D;
+#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
+typedef Texture<3> Texture3D;
+#endif
+
+#ifndef MAGNUM_TARGET_GLES2
+template class TextureArray;
+#ifndef MAGNUM_TARGET_GLES
+typedef TextureArray<1> Texture1DArray;
+#endif
+typedef TextureArray<2> Texture2DArray;
+#endif
+
+enum class TextureFormat: GLenum;
+
+#ifndef MAGNUM_TARGET_GLES2
+class TransformFeedback;
+#endif
+
+enum class Version: Int;
+#endif
+
+}
+
+#endif
+
diff --git a/src/Magnum/ImageFormat.h b/src/Magnum/GL/ImageFormat.h
similarity index 98%
rename from src/Magnum/ImageFormat.h
rename to src/Magnum/GL/ImageFormat.h
index 46b98c837..e4ac1fa1f 100644
--- a/src/Magnum/ImageFormat.h
+++ b/src/Magnum/GL/ImageFormat.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_ImageFormat_h
-#define Magnum_ImageFormat_h
+#ifndef Magnum_GL_ImageFormat_h
+#define Magnum_GL_ImageFormat_h
/*
This file is part of Magnum.
@@ -31,7 +31,7 @@
*/
#endif
-#include "Magnum/OpenGL.h"
+#include "Magnum/GL/OpenGL.h"
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
namespace Magnum {
diff --git a/src/Magnum/Implementation/BufferState.cpp b/src/Magnum/GL/Implementation/BufferState.cpp
similarity index 98%
rename from src/Magnum/Implementation/BufferState.cpp
rename to src/Magnum/GL/Implementation/BufferState.cpp
index 59d6a0834..d9d047796 100644
--- a/src/Magnum/Implementation/BufferState.cpp
+++ b/src/Magnum/GL/Implementation/BufferState.cpp
@@ -27,10 +27,9 @@
#include
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
-
-#include "State.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
+#include "Magnum/GL/Implementation/State.h"
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/BufferState.h b/src/Magnum/GL/Implementation/BufferState.h
similarity index 96%
rename from src/Magnum/Implementation/BufferState.h
rename to src/Magnum/GL/Implementation/BufferState.h
index 784bf07d6..a606c5214 100644
--- a/src/Magnum/Implementation/BufferState.h
+++ b/src/Magnum/GL/Implementation/BufferState.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_BufferState_h
-#define Magnum_Implementation_BufferState_h
+#ifndef Magnum_GL_Implementation_BufferState_h
+#define Magnum_GL_Implementation_BufferState_h
/*
This file is part of Magnum.
@@ -25,7 +25,7 @@
DEALINGS IN THE SOFTWARE.
*/
-#include "Magnum/Buffer.h"
+#include "Magnum/GL/Buffer.h"
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/ContextState.cpp b/src/Magnum/GL/Implementation/ContextState.cpp
similarity index 98%
rename from src/Magnum/Implementation/ContextState.cpp
rename to src/Magnum/GL/Implementation/ContextState.cpp
index 254a2eb6d..f65121077 100644
--- a/src/Magnum/Implementation/ContextState.cpp
+++ b/src/Magnum/GL/Implementation/ContextState.cpp
@@ -25,7 +25,7 @@
#include "ContextState.h"
-#include "Magnum/Context.h"
+#include "Magnum/GL/Context.h"
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/ContextState.h b/src/Magnum/GL/Implementation/ContextState.h
similarity index 92%
rename from src/Magnum/Implementation/ContextState.h
rename to src/Magnum/GL/Implementation/ContextState.h
index 10de3d0de..15ab9bfe0 100644
--- a/src/Magnum/Implementation/ContextState.h
+++ b/src/Magnum/GL/Implementation/ContextState.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_ContextState_h
-#define Magnum_Implementation_ContextState_h
+#ifndef Magnum_GL_Implementation_ContextState_h
+#define Magnum_GL_Implementation_ContextState_h
/*
This file is part of Magnum.
@@ -28,13 +28,13 @@
#include
#include
-#include "Magnum/Magnum.h"
+#include "Magnum/GL/GL.h"
#ifdef _MSC_VER
/* Otherwise the member function pointers will have different size based on
whether the header was included or not. CAUSES SERIOUS MEMORY CORRUPTION AND
IS NOT CAUGHT BY ANY WARNING WHATSOEVER! AARGH! */
-#include "Magnum/Context.h"
+#include "Magnum/GL/Context.h"
#endif
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/DebugState.cpp b/src/Magnum/GL/Implementation/DebugState.cpp
similarity index 97%
rename from src/Magnum/Implementation/DebugState.cpp
rename to src/Magnum/GL/Implementation/DebugState.cpp
index d8721b29c..1cffc34b9 100644
--- a/src/Magnum/Implementation/DebugState.cpp
+++ b/src/Magnum/GL/Implementation/DebugState.cpp
@@ -25,9 +25,9 @@
#include "DebugState.h"
-#include "Magnum/AbstractObject.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/AbstractObject.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/DebugState.h b/src/Magnum/GL/Implementation/DebugState.h
similarity index 93%
rename from src/Magnum/Implementation/DebugState.h
rename to src/Magnum/GL/Implementation/DebugState.h
index 420517aed..13480b620 100644
--- a/src/Magnum/Implementation/DebugState.h
+++ b/src/Magnum/GL/Implementation/DebugState.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_DebugState_h
-#define Magnum_Implementation_DebugState_h
+#ifndef Magnum_GL_Implementation_DebugState_h
+#define Magnum_GL_Implementation_DebugState_h
/*
This file is part of Magnum.
@@ -28,7 +28,8 @@
#include
#include
-#include "Magnum/DebugOutput.h"
+#include "Magnum/GL/DebugOutput.h"
+#include "Magnum/GL/GL.h"
#ifdef MAGNUM_TARGET_WEBGL
#error this header is not available in WebGL build
diff --git a/src/Magnum/Implementation/FramebufferState.cpp b/src/Magnum/GL/Implementation/FramebufferState.cpp
similarity index 99%
rename from src/Magnum/Implementation/FramebufferState.cpp
rename to src/Magnum/GL/Implementation/FramebufferState.cpp
index c40ec8849..285233a00 100644
--- a/src/Magnum/Implementation/FramebufferState.cpp
+++ b/src/Magnum/GL/Implementation/FramebufferState.cpp
@@ -25,9 +25,9 @@
#include "FramebufferState.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
-#include "Magnum/Renderbuffer.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
+#include "Magnum/GL/Renderbuffer.h"
#include "State.h"
diff --git a/src/Magnum/Implementation/FramebufferState.h b/src/Magnum/GL/Implementation/FramebufferState.h
similarity index 96%
rename from src/Magnum/Implementation/FramebufferState.h
rename to src/Magnum/GL/Implementation/FramebufferState.h
index f1a9c3a49..1bd6d4c51 100644
--- a/src/Magnum/Implementation/FramebufferState.h
+++ b/src/Magnum/GL/Implementation/FramebufferState.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_FramebufferState_h
-#define Magnum_Implementation_FramebufferState_h
+#ifndef Magnum_GL_Implementation_FramebufferState_h
+#define Magnum_GL_Implementation_FramebufferState_h
/*
This file is part of Magnum.
@@ -28,13 +28,13 @@
#include
#include
-#include "Magnum/Framebuffer.h"
+#include "Magnum/GL/Framebuffer.h"
#ifdef _MSC_VER
/* Otherwise the member function pointers will have different size based on
whether the header was included or not. CAUSES SERIOUS MEMORY CORRUPTION AND
IS NOT CAUGHT BY ANY WARNING WHATSOEVER! AARGH! */
-#include "Magnum/Renderbuffer.h"
+#include "Magnum/GL/Renderbuffer.h"
#endif
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/MeshState.cpp b/src/Magnum/GL/Implementation/MeshState.cpp
similarity index 98%
rename from src/Magnum/Implementation/MeshState.cpp
rename to src/Magnum/GL/Implementation/MeshState.cpp
index 4b77c241c..1c98d1f15 100644
--- a/src/Magnum/Implementation/MeshState.cpp
+++ b/src/Magnum/GL/Implementation/MeshState.cpp
@@ -25,9 +25,9 @@
#include "MeshState.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
-#include "Magnum/MeshView.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
+#include "Magnum/GL/MeshView.h"
#include "State.h"
diff --git a/src/Magnum/Implementation/MeshState.h b/src/Magnum/GL/Implementation/MeshState.h
similarity index 95%
rename from src/Magnum/Implementation/MeshState.h
rename to src/Magnum/GL/Implementation/MeshState.h
index 7d9ff12fc..c01f56153 100644
--- a/src/Magnum/Implementation/MeshState.h
+++ b/src/Magnum/GL/Implementation/MeshState.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_MeshState_h
-#define Magnum_Implementation_MeshState_h
+#ifndef Magnum_GL_Implementation_MeshState_h
+#define Magnum_GL_Implementation_MeshState_h
/*
This file is part of Magnum.
@@ -28,7 +28,7 @@
#include
#include
-#include "Magnum/Mesh.h"
+#include "Magnum/GL/Mesh.h"
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/QueryState.cpp b/src/Magnum/GL/Implementation/QueryState.cpp
similarity index 94%
rename from src/Magnum/Implementation/QueryState.cpp
rename to src/Magnum/GL/Implementation/QueryState.cpp
index a0b17a195..8291d78e6 100644
--- a/src/Magnum/Implementation/QueryState.cpp
+++ b/src/Magnum/GL/Implementation/QueryState.cpp
@@ -25,9 +25,9 @@
#include "QueryState.h"
-#include "Magnum/AbstractQuery.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/AbstractQuery.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/QueryState.h b/src/Magnum/GL/Implementation/QueryState.h
similarity index 92%
rename from src/Magnum/Implementation/QueryState.h
rename to src/Magnum/GL/Implementation/QueryState.h
index d7250837a..2f0abc786 100644
--- a/src/Magnum/Implementation/QueryState.h
+++ b/src/Magnum/GL/Implementation/QueryState.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_QueryState_h
-#define Magnum_Implementation_QueryState_h
+#ifndef Magnum_GL_Implementation_QueryState_h
+#define Magnum_GL_Implementation_QueryState_h
/*
This file is part of Magnum.
@@ -28,13 +28,13 @@
#include
#include
-#include "Magnum/Magnum.h"
+#include "Magnum/GL/GL.h"
#ifdef _MSC_VER
/* Otherwise the member function pointers will have different size based on
whether the header was included or not. CAUSES SERIOUS MEMORY CORRUPTION AND
IS NOT CAUGHT BY ANY WARNING WHATSOEVER! AARGH! */
-#include "Magnum/AbstractQuery.h"
+#include "Magnum/GL/AbstractQuery.h"
#endif
#if defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)
diff --git a/src/Magnum/Implementation/RendererState.cpp b/src/Magnum/GL/Implementation/RendererState.cpp
similarity index 98%
rename from src/Magnum/Implementation/RendererState.cpp
rename to src/Magnum/GL/Implementation/RendererState.cpp
index 03e67e132..e25db1d34 100644
--- a/src/Magnum/Implementation/RendererState.cpp
+++ b/src/Magnum/GL/Implementation/RendererState.cpp
@@ -25,8 +25,8 @@
#include "RendererState.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/RendererState.h b/src/Magnum/GL/Implementation/RendererState.h
similarity index 94%
rename from src/Magnum/Implementation/RendererState.h
rename to src/Magnum/GL/Implementation/RendererState.h
index 41397cc09..a636268e0 100644
--- a/src/Magnum/Implementation/RendererState.h
+++ b/src/Magnum/GL/Implementation/RendererState.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_RendererState_h
-#define Magnum_Implementation_RendererState_h
+#ifndef Magnum_GL_Implementation_RendererState_h
+#define Magnum_GL_Implementation_RendererState_h
/*
This file is part of Magnum.
@@ -28,7 +28,7 @@
#include
#include
-#include "Magnum/Renderer.h"
+#include "Magnum/GL/Renderer.h"
#include "Magnum/Math/Vector3.h"
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/ShaderProgramState.cpp b/src/Magnum/GL/Implementation/ShaderProgramState.cpp
similarity index 99%
rename from src/Magnum/Implementation/ShaderProgramState.cpp
rename to src/Magnum/GL/Implementation/ShaderProgramState.cpp
index edc63f93a..6fd76b247 100644
--- a/src/Magnum/Implementation/ShaderProgramState.cpp
+++ b/src/Magnum/GL/Implementation/ShaderProgramState.cpp
@@ -25,9 +25,9 @@
#include "ShaderProgramState.h"
-#include "Magnum/AbstractShaderProgram.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/AbstractShaderProgram.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
#include "State.h"
diff --git a/src/Magnum/Implementation/ShaderProgramState.h b/src/Magnum/GL/Implementation/ShaderProgramState.h
similarity index 96%
rename from src/Magnum/Implementation/ShaderProgramState.h
rename to src/Magnum/GL/Implementation/ShaderProgramState.h
index c2af31222..b5126c708 100644
--- a/src/Magnum/Implementation/ShaderProgramState.h
+++ b/src/Magnum/GL/Implementation/ShaderProgramState.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_ShaderProgramState_h
-#define Magnum_Implementation_ShaderProgramState_h
+#ifndef Magnum_GL_Implementation_ShaderProgramState_h
+#define Magnum_GL_Implementation_ShaderProgramState_h
/*
This file is part of Magnum.
@@ -28,12 +28,12 @@
#include
#include
-#include "Magnum/Magnum.h"
-#include "Magnum/OpenGL.h"
+#include "Magnum/GL/GL.h"
+#include "Magnum/GL/OpenGL.h"
#include "Magnum/Math/Vector3.h"
#ifndef MAGNUM_TARGET_GLES2
-#include "Magnum/AbstractShaderProgram.h"
+#include "Magnum/GL/AbstractShaderProgram.h"
#endif
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/ShaderState.cpp b/src/Magnum/GL/Implementation/ShaderState.cpp
similarity index 97%
rename from src/Magnum/Implementation/ShaderState.cpp
rename to src/Magnum/GL/Implementation/ShaderState.cpp
index 65b46f546..10852439f 100644
--- a/src/Magnum/Implementation/ShaderState.cpp
+++ b/src/Magnum/GL/Implementation/ShaderState.cpp
@@ -25,10 +25,10 @@
#include "ShaderState.h"
-#include "Magnum/Shader.h"
+#include "Magnum/GL/Shader.h"
#if defined(CORRADE_TARGET_EMSCRIPTEN) && defined(__EMSCRIPTEN_PTHREADS__)
-#include "Magnum/Context.h"
+#include "Magnum/GL/Context.h"
#endif
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/ShaderState.h b/src/Magnum/GL/Implementation/ShaderState.h
similarity index 94%
rename from src/Magnum/Implementation/ShaderState.h
rename to src/Magnum/GL/Implementation/ShaderState.h
index cabd08c73..d439f5551 100644
--- a/src/Magnum/Implementation/ShaderState.h
+++ b/src/Magnum/GL/Implementation/ShaderState.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_ShaderState_h
-#define Magnum_Implementation_ShaderState_h
+#ifndef Magnum_GL_Implementation_ShaderState_h
+#define Magnum_GL_Implementation_ShaderState_h
/*
This file is part of Magnum.
@@ -28,14 +28,14 @@
#include
#include
-#include "Magnum/Magnum.h"
-#include "Magnum/OpenGL.h"
+#include "Magnum/GL/GL.h"
+#include "Magnum/GL/OpenGL.h"
#ifdef _MSC_VER
/* Otherwise the member function pointers will have different size based on
whether the header was included or not. CAUSES SERIOUS MEMORY CORRUPTION AND
IS NOT CAUGHT BY ANY WARNING WHATSOEVER! AARGH! */
-#include "Magnum/Shader.h"
+#include "Magnum/GL/Shader.h"
#endif
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/State.cpp b/src/Magnum/GL/Implementation/State.cpp
similarity index 82%
rename from src/Magnum/Implementation/State.cpp
rename to src/Magnum/GL/Implementation/State.cpp
index 988087bfa..3f6ba33a6 100644
--- a/src/Magnum/Implementation/State.cpp
+++ b/src/Magnum/GL/Implementation/State.cpp
@@ -27,25 +27,24 @@
#include
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
-
-#include "BufferState.h"
-#include "ContextState.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
+#include "Magnum/GL/Implementation/BufferState.h"
+#include "Magnum/GL/Implementation/ContextState.h"
#ifndef MAGNUM_TARGET_WEBGL
-#include "DebugState.h"
+#include "Magnum/GL/Implementation/DebugState.h"
#endif
-#include "FramebufferState.h"
-#include "MeshState.h"
+#include "Magnum/GL/Implementation/FramebufferState.h"
+#include "Magnum/GL/Implementation/MeshState.h"
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
-#include "QueryState.h"
+#include "Magnum/GL/Implementation/QueryState.h"
#endif
-#include "RendererState.h"
-#include "ShaderState.h"
-#include "ShaderProgramState.h"
-#include "TextureState.h"
+#include "Magnum/GL/Implementation/RendererState.h"
+#include "Magnum/GL/Implementation/ShaderState.h"
+#include "Magnum/GL/Implementation/ShaderProgramState.h"
+#include "Magnum/GL/Implementation/TextureState.h"
#ifndef MAGNUM_TARGET_GLES2
-#include "TransformFeedbackState.h"
+#include "Magnum/GL/Implementation/TransformFeedbackState.h"
#endif
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/State.h b/src/Magnum/GL/Implementation/State.h
similarity index 94%
rename from src/Magnum/Implementation/State.h
rename to src/Magnum/GL/Implementation/State.h
index 871f8edae..294d68140 100644
--- a/src/Magnum/Implementation/State.h
+++ b/src/Magnum/GL/Implementation/State.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_State_h
-#define Magnum_Implementation_State_h
+#ifndef Magnum_GL_Implementation_State_h
+#define Magnum_GL_Implementation_State_h
/*
This file is part of Magnum.
@@ -27,8 +27,8 @@
#include
-#include "Magnum/Magnum.h"
-#include "Magnum/OpenGL.h"
+#include "Magnum/GL/GL.h"
+#include "Magnum/GL/OpenGL.h"
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/TextureState.cpp b/src/Magnum/GL/Implementation/TextureState.cpp
similarity index 99%
rename from src/Magnum/Implementation/TextureState.cpp
rename to src/Magnum/GL/Implementation/TextureState.cpp
index 4d11e670a..4e2dc3c5f 100644
--- a/src/Magnum/Implementation/TextureState.cpp
+++ b/src/Magnum/GL/Implementation/TextureState.cpp
@@ -27,13 +27,13 @@
#include
-#include "Magnum/AbstractTexture.h"
-#include "Magnum/CubeMapTexture.h"
+#include "Magnum/GL/AbstractTexture.h"
+#include "Magnum/GL/CubeMapTexture.h"
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
-#include "Magnum/BufferTexture.h"
+#include "Magnum/GL/BufferTexture.h"
#endif
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
#include "State.h"
diff --git a/src/Magnum/Implementation/TextureState.h b/src/Magnum/GL/Implementation/TextureState.h
similarity index 96%
rename from src/Magnum/Implementation/TextureState.h
rename to src/Magnum/GL/Implementation/TextureState.h
index 19a76299d..07a561c4d 100644
--- a/src/Magnum/Implementation/TextureState.h
+++ b/src/Magnum/GL/Implementation/TextureState.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_TextureState_h
-#define Magnum_Implementation_TextureState_h
+#ifndef Magnum_GL_Implementation_TextureState_h
+#define Magnum_GL_Implementation_TextureState_h
/*
This file is part of Magnum.
@@ -30,17 +30,18 @@
#include
#include "Magnum/Magnum.h"
-#include "Magnum/OpenGL.h"
+#include "Magnum/GL/GL.h"
+#include "Magnum/GL/OpenGL.h"
#ifdef _MSC_VER
-#include "Magnum/AbstractTexture.h"
+#include "Magnum/GL/AbstractTexture.h"
#ifndef MAGNUM_TARGET_GLES2
/* Otherwise the member function pointers will have different size based on
whether the header was included or not. CAUSES SERIOUS MEMORY CORRUPTION AND
IS NOT CAUGHT BY ANY WARNING WHATSOEVER! AARGH! */
-#include "Magnum/BufferTexture.h"
-#include "Magnum/CubeMapTexture.h"
+#include "Magnum/GL/BufferTexture.h"
+#include "Magnum/GL/CubeMapTexture.h"
#endif
#endif
diff --git a/src/Magnum/Implementation/TransformFeedbackState.cpp b/src/Magnum/GL/Implementation/TransformFeedbackState.cpp
similarity index 91%
rename from src/Magnum/Implementation/TransformFeedbackState.cpp
rename to src/Magnum/GL/Implementation/TransformFeedbackState.cpp
index 060566c54..3ef02741b 100644
--- a/src/Magnum/Implementation/TransformFeedbackState.cpp
+++ b/src/Magnum/GL/Implementation/TransformFeedbackState.cpp
@@ -1,10 +1,9 @@
#include "TransformFeedbackState.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
-#include "Magnum/TransformFeedback.h"
-
-#include "State.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
+#include "Magnum/GL/TransformFeedback.h"
+#include "Magnum/GL/Implementation/State.h"
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/TransformFeedbackState.h b/src/Magnum/GL/Implementation/TransformFeedbackState.h
similarity index 92%
rename from src/Magnum/Implementation/TransformFeedbackState.h
rename to src/Magnum/GL/Implementation/TransformFeedbackState.h
index a6f1f4266..f670e4990 100644
--- a/src/Magnum/Implementation/TransformFeedbackState.h
+++ b/src/Magnum/GL/Implementation/TransformFeedbackState.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_TransformFeedbackState_h
-#define Magnum_Implementation_TransformFeedbackState_h
+#ifndef Magnum_GL_Implementation_TransformFeedbackState_h
+#define Magnum_GL_Implementation_TransformFeedbackState_h
/*
This file is part of Magnum.
@@ -28,14 +28,14 @@
#include
#include
-#include "Magnum/Magnum.h"
-#include "Magnum/OpenGL.h"
+#include "Magnum/GL/GL.h"
+#include "Magnum/GL/OpenGL.h"
#ifdef _MSC_VER
/* Otherwise the member function pointers will have different size based on
whether the header was included or not. CAUSES SERIOUS MEMORY CORRUPTION AND
IS NOT CAUGHT BY ANY WARNING WHATSOEVER! AARGH! */
-#include "Magnum/TransformFeedback.h"
+#include "Magnum/GL/TransformFeedback.h"
#endif
#ifdef MAGNUM_TARGET_GLES2
diff --git a/src/Magnum/Implementation/driverSpecific.cpp b/src/Magnum/GL/Implementation/driverSpecific.cpp
similarity index 99%
rename from src/Magnum/Implementation/driverSpecific.cpp
rename to src/Magnum/GL/Implementation/driverSpecific.cpp
index edcc40be1..80ae3acd6 100644
--- a/src/Magnum/Implementation/driverSpecific.cpp
+++ b/src/Magnum/GL/Implementation/driverSpecific.cpp
@@ -23,11 +23,10 @@
DEALINGS IN THE SOFTWARE.
*/
-#include "Magnum/Context.h"
-
#include
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
#include "Magnum/Math/Range.h"
namespace Magnum {
diff --git a/src/Magnum/Implementation/maxTextureSize.cpp b/src/Magnum/GL/Implementation/maxTextureSize.cpp
similarity index 94%
rename from src/Magnum/Implementation/maxTextureSize.cpp
rename to src/Magnum/GL/Implementation/maxTextureSize.cpp
index 72f647664..f176a72bb 100644
--- a/src/Magnum/Implementation/maxTextureSize.cpp
+++ b/src/Magnum/GL/Implementation/maxTextureSize.cpp
@@ -25,10 +25,9 @@
#include "maxTextureSize.h"
-#include "Magnum/Context.h"
-
-#include "State.h"
-#include "TextureState.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Implementation/State.h"
+#include "Magnum/GL/Implementation/TextureState.h"
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Implementation/maxTextureSize.h b/src/Magnum/GL/Implementation/maxTextureSize.h
similarity index 92%
rename from src/Magnum/Implementation/maxTextureSize.h
rename to src/Magnum/GL/Implementation/maxTextureSize.h
index 1f5642c5d..3ea93d31e 100644
--- a/src/Magnum/Implementation/maxTextureSize.h
+++ b/src/Magnum/GL/Implementation/maxTextureSize.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Implementation_maxTextureSize_h
-#define Magnum_Implementation_maxTextureSize_h
+#ifndef Magnum_GL_Implementation_maxTextureSize_h
+#define Magnum_GL_Implementation_maxTextureSize_h
/*
This file is part of Magnum.
@@ -25,7 +25,7 @@
DEALINGS IN THE SOFTWARE.
*/
-#include "Magnum/OpenGL.h"
+#include "Magnum/GL/OpenGL.h"
namespace Magnum { namespace Implementation {
diff --git a/src/Magnum/Mesh.cpp b/src/Magnum/GL/Mesh.cpp
similarity index 98%
rename from src/Magnum/Mesh.cpp
rename to src/Magnum/GL/Mesh.cpp
index 2bbebb925..0987854a7 100644
--- a/src/Magnum/Mesh.cpp
+++ b/src/Magnum/GL/Mesh.cpp
@@ -27,20 +27,19 @@
#include
-#include "Magnum/AbstractShaderProgram.h"
-#include "Magnum/Buffer.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/AbstractShaderProgram.h"
+#include "Magnum/GL/Buffer.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
#ifndef MAGNUM_TARGET_GLES
-#include "Magnum/TransformFeedback.h"
+#include "Magnum/GL/TransformFeedback.h"
#endif
-
+#include "Magnum/GL/Implementation/BufferState.h"
#ifndef MAGNUM_TARGET_WEBGL
-#include "Implementation/DebugState.h"
+#include "Magnum/GL/Implementation/DebugState.h"
#endif
-#include "Implementation/BufferState.h"
-#include "Implementation/MeshState.h"
-#include "Implementation/State.h"
+#include "Magnum/GL/Implementation/MeshState.h"
+#include "Magnum/GL/Implementation/State.h"
namespace Magnum {
diff --git a/src/Magnum/Mesh.h b/src/Magnum/GL/Mesh.h
similarity index 92%
rename from src/Magnum/Mesh.h
rename to src/Magnum/GL/Mesh.h
index c3e10e905..bd77db458 100644
--- a/src/Magnum/Mesh.h
+++ b/src/Magnum/GL/Mesh.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Mesh_h
-#define Magnum_Mesh_h
+#ifndef Magnum_GL_Mesh_h
+#define Magnum_GL_Mesh_h
/*
This file is part of Magnum.
@@ -33,9 +33,10 @@
#include
#include
-#include "Magnum/AbstractObject.h"
-#include "Magnum/Attribute.h"
#include "Magnum/Tags.h"
+#include "Magnum/GL/AbstractObject.h"
+#include "Magnum/GL/Attribute.h"
+#include "Magnum/GL/GL.h"
namespace Magnum {
@@ -168,26 +169,26 @@ commands are issued when calling @ref draw().
@subsubsection Mesh-configuration-example-basic Basic non-indexed mesh
-@snippet Magnum.cpp Mesh-nonindexed
+@snippet MagnumGL.cpp Mesh-nonindexed
@subsubsection Mesh-configuration-interleaved Interleaved vertex data
-@snippet Magnum.cpp Mesh-interleaved
+@snippet MagnumGL.cpp Mesh-interleaved
@subsubsection Mesh-configuration-indexed Indexed mesh
-@snippet Magnum.cpp Mesh-indexed
+@snippet MagnumGL.cpp Mesh-indexed
Or using @ref MeshTools::interleave() and @ref MeshTools::compressIndices():
-@snippet Magnum.cpp Mesh-indexed-tools
+@snippet MagnumGL.cpp Mesh-indexed-tools
Or, if you plan to use the mesh with stock shaders, you can just use
@ref MeshTools::compile().
@subsubsection Mesh-configuration-formats Specific formats of vertex data
-@snippet Magnum.cpp Mesh-formats
+@snippet MagnumGL.cpp Mesh-formats
@subsubsection Mesh-configuration-dynamic Dynamically specified attributes
@@ -199,7 +200,7 @@ that case, there are overloads of @ref addVertexBuffer() and
unsigned byte to float with one byte padding at the end could then look like
this:
-@snippet Magnum.cpp Mesh-dynamic
+@snippet MagnumGL.cpp Mesh-dynamic
@section Mesh-rendering Rendering meshes
@@ -234,7 +235,7 @@ If index range is specified in @ref setIndexBuffer(), range-based version of
drawing commands are used on desktop OpenGL and OpenGL ES 3.0. See also
@ref draw() for more information.
*/
-class MAGNUM_EXPORT Mesh: public AbstractObject {
+class MAGNUM_GL_EXPORT Mesh: public AbstractObject {
friend MeshView;
friend Implementation::MeshState;
@@ -594,14 +595,14 @@ class MAGNUM_EXPORT Mesh: public AbstractObject {
* position and normal, so you have to skip weight and texture
* coordinate in each vertex:
*
- * @snippet Magnum.cpp Mesh-addVertexBuffer1
+ * @snippet MagnumGL.cpp Mesh-addVertexBuffer1
*
* You can also achieve the same effect by calling @ref addVertexBuffer()
* more times with explicitly specified gaps before and after the
* attributes. This can be used for e.g. runtime-dependent
* configuration, as it isn't dependent on the variadic template:
*
- * @snippet Magnum.cpp Mesh-addVertexBuffer2
+ * @snippet MagnumGL.cpp Mesh-addVertexBuffer2
*
* If specifying more than one attribute, the function assumes that
* the array is interleaved. Adding non-interleaved vertex buffer can
@@ -609,7 +610,7 @@ class MAGNUM_EXPORT Mesh: public AbstractObject {
* Above example with weight, position, texture coordinate and normal
* arrays one after another (non-interleaved):
*
- * @snippet Magnum.cpp Mesh-addVertexBuffer3
+ * @snippet MagnumGL.cpp Mesh-addVertexBuffer3
*
* 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
@@ -825,11 +826,11 @@ class MAGNUM_EXPORT Mesh: public AbstractObject {
#endif
private:
- struct MAGNUM_LOCAL AttributeLayout;
+ struct MAGNUM_GL_LOCAL AttributeLayout;
explicit Mesh(GLuint id, MeshPrimitive primitive, ObjectFlags flags);
- void MAGNUM_LOCAL createIfNotAlready();
+ void MAGNUM_GL_LOCAL createIfNotAlready();
#ifndef MAGNUM_TARGET_WEBGL
Mesh& setLabelInternal(Containers::ArrayView label);
@@ -898,10 +899,10 @@ class MAGNUM_EXPORT Mesh: public AbstractObject {
/* Unconditionally binds a specified VAO and updates the state tracker.
Used also in Buffer::bindSomewhereInternal() and Context::resetState(). */
- static void MAGNUM_LOCAL bindVAOImplementationDefault(GLuint id);
- static void MAGNUM_LOCAL bindVAOImplementationVAO(GLuint id);
+ static void MAGNUM_GL_LOCAL bindVAOImplementationDefault(GLuint id);
+ static void MAGNUM_GL_LOCAL bindVAOImplementationVAO(GLuint id);
- void MAGNUM_LOCAL bindVAO();
+ void MAGNUM_GL_LOCAL bindVAO();
#ifndef MAGNUM_TARGET_GLES
void drawInternal(Int count, Int baseVertex, Int instanceCount, UnsignedInt baseInstance, GLintptr indexOffset, Int indexStart, Int indexEnd);
@@ -915,55 +916,55 @@ class MAGNUM_EXPORT Mesh: public AbstractObject {
void drawInternal(TransformFeedback& xfb, UnsignedInt stream, Int instanceCount);
#endif
- void MAGNUM_LOCAL createImplementationDefault();
- void MAGNUM_LOCAL createImplementationVAO();
+ void MAGNUM_GL_LOCAL createImplementationDefault();
+ void MAGNUM_GL_LOCAL createImplementationVAO();
#ifndef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL createImplementationVAODSA();
+ void MAGNUM_GL_LOCAL createImplementationVAODSA();
#endif
- void MAGNUM_LOCAL destroyImplementationDefault();
- void MAGNUM_LOCAL destroyImplementationVAO();
+ void MAGNUM_GL_LOCAL destroyImplementationDefault();
+ void MAGNUM_GL_LOCAL destroyImplementationVAO();
void attributePointerInternal(const Buffer& buffer, GLuint location, GLint size, GLenum type, DynamicAttribute::Kind kind, GLintptr offset, GLsizei stride, GLuint divisor);
- void MAGNUM_LOCAL attributePointerInternal(AttributeLayout& attribute);
- void MAGNUM_LOCAL attributePointerImplementationDefault(AttributeLayout& attribute);
- void MAGNUM_LOCAL attributePointerImplementationVAO(AttributeLayout& attribute);
+ void MAGNUM_GL_LOCAL attributePointerInternal(AttributeLayout& attribute);
+ void MAGNUM_GL_LOCAL attributePointerImplementationDefault(AttributeLayout& attribute);
+ void MAGNUM_GL_LOCAL attributePointerImplementationVAO(AttributeLayout& attribute);
#ifndef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL attributePointerImplementationDSAEXT(AttributeLayout& attribute);
+ void MAGNUM_GL_LOCAL attributePointerImplementationDSAEXT(AttributeLayout& attribute);
#endif
- void MAGNUM_LOCAL vertexAttribPointer(AttributeLayout& attribute);
+ void MAGNUM_GL_LOCAL vertexAttribPointer(AttributeLayout& attribute);
#ifndef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL vertexAttribDivisorImplementationVAO(GLuint index, GLuint divisor);
- void MAGNUM_LOCAL vertexAttribDivisorImplementationDSAEXT(GLuint index, GLuint divisor);
+ void MAGNUM_GL_LOCAL vertexAttribDivisorImplementationVAO(GLuint index, GLuint divisor);
+ void MAGNUM_GL_LOCAL vertexAttribDivisorImplementationDSAEXT(GLuint index, GLuint divisor);
#elif defined(MAGNUM_TARGET_GLES2)
- void MAGNUM_LOCAL vertexAttribDivisorImplementationANGLE(GLuint index, GLuint divisor);
+ void MAGNUM_GL_LOCAL vertexAttribDivisorImplementationANGLE(GLuint index, GLuint divisor);
#ifndef MAGNUM_TARGET_WEBGL
- void MAGNUM_LOCAL vertexAttribDivisorImplementationEXT(GLuint index, GLuint divisor);
- void MAGNUM_LOCAL vertexAttribDivisorImplementationNV(GLuint index, GLuint divisor);
+ void MAGNUM_GL_LOCAL vertexAttribDivisorImplementationEXT(GLuint index, GLuint divisor);
+ void MAGNUM_GL_LOCAL vertexAttribDivisorImplementationNV(GLuint index, GLuint divisor);
#endif
#endif
- void MAGNUM_LOCAL bindIndexBufferImplementationDefault(Buffer&);
- void MAGNUM_LOCAL bindIndexBufferImplementationVAO(Buffer& buffer);
+ void MAGNUM_GL_LOCAL bindIndexBufferImplementationDefault(Buffer&);
+ void MAGNUM_GL_LOCAL bindIndexBufferImplementationVAO(Buffer& buffer);
- void MAGNUM_LOCAL bindImplementationDefault();
- void MAGNUM_LOCAL bindImplementationVAO();
+ void MAGNUM_GL_LOCAL bindImplementationDefault();
+ void MAGNUM_GL_LOCAL bindImplementationVAO();
- void MAGNUM_LOCAL unbindImplementationDefault();
- void MAGNUM_LOCAL unbindImplementationVAO();
+ void MAGNUM_GL_LOCAL unbindImplementationDefault();
+ void MAGNUM_GL_LOCAL unbindImplementationVAO();
#ifdef MAGNUM_TARGET_GLES2
- void MAGNUM_LOCAL drawArraysInstancedImplementationANGLE(GLint baseVertex, GLsizei count, GLsizei instanceCount);
+ void MAGNUM_GL_LOCAL drawArraysInstancedImplementationANGLE(GLint baseVertex, GLsizei count, GLsizei instanceCount);
#ifndef MAGNUM_TARGET_WEBGL
- void MAGNUM_LOCAL drawArraysInstancedImplementationEXT(GLint baseVertex, GLsizei count, GLsizei instanceCount);
- void MAGNUM_LOCAL drawArraysInstancedImplementationNV(GLint baseVertex, GLsizei count, GLsizei instanceCount);
+ void MAGNUM_GL_LOCAL drawArraysInstancedImplementationEXT(GLint baseVertex, GLsizei count, GLsizei instanceCount);
+ void MAGNUM_GL_LOCAL drawArraysInstancedImplementationNV(GLint baseVertex, GLsizei count, GLsizei instanceCount);
#endif
- void MAGNUM_LOCAL drawElementsInstancedImplementationANGLE(GLsizei count, GLintptr indexOffset, GLsizei instanceCount);
+ void MAGNUM_GL_LOCAL drawElementsInstancedImplementationANGLE(GLsizei count, GLintptr indexOffset, GLsizei instanceCount);
#ifndef MAGNUM_TARGET_WEBGL
- void MAGNUM_LOCAL drawElementsInstancedImplementationEXT(GLsizei count, GLintptr indexOffset, GLsizei instanceCount);
- void MAGNUM_LOCAL drawElementsInstancedImplementationNV(GLsizei count, GLintptr indexOffset, GLsizei instanceCount);
+ void MAGNUM_GL_LOCAL drawElementsInstancedImplementationEXT(GLsizei count, GLintptr indexOffset, GLsizei instanceCount);
+ void MAGNUM_GL_LOCAL drawElementsInstancedImplementationNV(GLsizei count, GLintptr indexOffset, GLsizei instanceCount);
#endif
#endif
@@ -985,10 +986,10 @@ class MAGNUM_EXPORT Mesh: public AbstractObject {
};
/** @debugoperatorenum{Magnum::MeshPrimitive} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, MeshPrimitive value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, MeshPrimitive value);
/** @debugoperatorclassenum{Magnum::Mesh,Magnum::Mesh::IndexType} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, Mesh::IndexType value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Mesh::IndexType value);
inline GLuint Mesh::release() {
const GLuint id = _id;
@@ -1001,7 +1002,7 @@ inline GLuint Mesh::release() {
namespace Corrade { namespace Utility {
/** @configurationvalue{Magnum::MeshPrimitive} */
-template<> struct MAGNUM_EXPORT ConfigurationValue {
+template<> struct MAGNUM_GL_EXPORT ConfigurationValue {
ConfigurationValue() = delete;
/**
@@ -1020,7 +1021,7 @@ template<> struct MAGNUM_EXPORT ConfigurationValue {
};
/** @configurationvalue{Magnum::Mesh::IndexType} */
-template<> struct MAGNUM_EXPORT ConfigurationValue {
+template<> struct MAGNUM_GL_EXPORT ConfigurationValue {
ConfigurationValue() = delete;
/**
diff --git a/src/Magnum/MeshView.cpp b/src/Magnum/GL/MeshView.cpp
similarity index 96%
rename from src/Magnum/MeshView.cpp
rename to src/Magnum/GL/MeshView.cpp
index 2408d0969..f413f20de 100644
--- a/src/Magnum/MeshView.cpp
+++ b/src/Magnum/GL/MeshView.cpp
@@ -28,12 +28,11 @@
#include
#include
-#include "Magnum/AbstractShaderProgram.h"
-#include "Magnum/Context.h"
-#include "Magnum/Mesh.h"
-
-#include "Implementation/State.h"
-#include "Implementation/MeshState.h"
+#include "Magnum/GL/AbstractShaderProgram.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Mesh.h"
+#include "Magnum/GL/Implementation/State.h"
+#include "Magnum/GL/Implementation/MeshState.h"
namespace Magnum {
diff --git a/src/Magnum/MeshView.h b/src/Magnum/GL/MeshView.h
similarity index 96%
rename from src/Magnum/MeshView.h
rename to src/Magnum/GL/MeshView.h
index 4ee06918c..07244ffab 100644
--- a/src/Magnum/MeshView.h
+++ b/src/Magnum/GL/MeshView.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_MeshView_h
-#define Magnum_MeshView_h
+#ifndef Magnum_GL_MeshView_h
+#define Magnum_GL_MeshView_h
/*
This file is part of Magnum.
@@ -32,9 +32,9 @@
#include
#include
-#include "Magnum/Magnum.h"
-#include "Magnum/OpenGL.h"
-#include "Magnum/visibility.h"
+#include "Magnum/GL/GL.h"
+#include "Magnum/GL/OpenGL.h"
+#include "Magnum/GL/visibility.h"
namespace Magnum {
@@ -56,7 +56,7 @@ no draw commands are issued when calling @ref draw().
You must ensure that the original mesh remains available for whole view
lifetime.
*/
-class MAGNUM_EXPORT MeshView {
+class MAGNUM_GL_EXPORT MeshView {
friend Implementation::MeshState;
public:
@@ -268,9 +268,9 @@ class MAGNUM_EXPORT MeshView {
private:
#ifndef MAGNUM_TARGET_WEBGL
- static MAGNUM_LOCAL void multiDrawImplementationDefault(std::initializer_list> meshes);
+ static MAGNUM_GL_LOCAL void multiDrawImplementationDefault(std::initializer_list> meshes);
#endif
- static MAGNUM_LOCAL void multiDrawImplementationFallback(std::initializer_list> meshes);
+ static MAGNUM_GL_LOCAL void multiDrawImplementationFallback(std::initializer_list> meshes);
std::reference_wrapper _original;
diff --git a/src/Magnum/MultisampleTexture.cpp b/src/Magnum/GL/MultisampleTexture.cpp
similarity index 88%
rename from src/Magnum/MultisampleTexture.cpp
rename to src/Magnum/GL/MultisampleTexture.cpp
index aed4e1d73..2fc2af327 100644
--- a/src/Magnum/MultisampleTexture.cpp
+++ b/src/Magnum/GL/MultisampleTexture.cpp
@@ -26,14 +26,14 @@
#include "MultisampleTexture.h"
#ifndef MAGNUM_TARGET_GLES2
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
-#include "Implementation/maxTextureSize.h"
+#include "Magnum/GL/Implementation/maxTextureSize.h"
namespace Magnum { namespace Implementation {
-template<> Vector2i MAGNUM_EXPORT maxMultisampleTextureSize<2>() {
+template<> Vector2i MAGNUM_GL_EXPORT maxMultisampleTextureSize<2>() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported())
#else
@@ -44,7 +44,7 @@ template<> Vector2i MAGNUM_EXPORT maxMultisampleTextureSize<2>() {
return Vector2i{Implementation::maxTextureSideSize()};
}
-template<> Vector3i MAGNUM_EXPORT maxMultisampleTextureSize<3>() {
+template<> Vector3i MAGNUM_GL_EXPORT maxMultisampleTextureSize<3>() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current().isExtensionSupported())
return Vector3i{0};
diff --git a/src/Magnum/MultisampleTexture.h b/src/Magnum/GL/MultisampleTexture.h
similarity index 98%
rename from src/Magnum/MultisampleTexture.h
rename to src/Magnum/GL/MultisampleTexture.h
index 6b0d5ad15..dde7a80c2 100644
--- a/src/Magnum/MultisampleTexture.h
+++ b/src/Magnum/GL/MultisampleTexture.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_MultisampleTexture_h
-#define Magnum_MultisampleTexture_h
+#ifndef Magnum_GL_MultisampleTexture_h
+#define Magnum_GL_MultisampleTexture_h
/*
This file is part of Magnum.
@@ -31,8 +31,8 @@
*/
#endif
-#include "Magnum/AbstractTexture.h"
#include "Magnum/DimensionTraits.h"
+#include "Magnum/GL/AbstractTexture.h"
#include "Magnum/Math/Vector3.h"
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
@@ -50,8 +50,8 @@ namespace Implementation {
}
template VectorTypeFor maxMultisampleTextureSize();
- template<> MAGNUM_EXPORT Vector2i maxMultisampleTextureSize<2>();
- template<> MAGNUM_EXPORT Vector3i maxMultisampleTextureSize<3>();
+ template<> MAGNUM_GL_EXPORT Vector2i maxMultisampleTextureSize<2>();
+ template<> MAGNUM_GL_EXPORT Vector3i maxMultisampleTextureSize<3>();
}
/**
@@ -77,7 +77,7 @@ also @ref AbstractTexture documentation for more information.
As multisample textures have no sampler state, the only thing you need is to
set storage:
-@snippet Magnum.cpp MultisampleTexture-usage
+@snippet MagnumGL.cpp MultisampleTexture-usage
In shader, the texture is used via @glsl sampler2DMS @ce / @glsl sampler2DMSArray @ce,
@glsl isampler2DMS @ce / @glsl isampler2DMSArray @ce or @glsl usampler2DMS @ce
diff --git a/src/Magnum/OpenGL.cpp b/src/Magnum/GL/OpenGL.cpp
similarity index 98%
rename from src/Magnum/OpenGL.cpp
rename to src/Magnum/GL/OpenGL.cpp
index 317f859d2..bfd03b735 100644
--- a/src/Magnum/OpenGL.cpp
+++ b/src/Magnum/GL/OpenGL.cpp
@@ -25,8 +25,8 @@
#include
-#include "Magnum/OpenGL.h"
#include "Magnum/Types.h"
+#include "Magnum/GL/OpenGL.h"
namespace Magnum {
diff --git a/src/Magnum/OpenGL.h b/src/Magnum/GL/OpenGL.h
similarity index 97%
rename from src/Magnum/OpenGL.h
rename to src/Magnum/GL/OpenGL.h
index 3979f1678..59bf89bb5 100644
--- a/src/Magnum/OpenGL.h
+++ b/src/Magnum/GL/OpenGL.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_OpenGL_h
-#define Magnum_OpenGL_h
+#ifndef Magnum_GL_OpenGL_h
+#define Magnum_GL_OpenGL_h
/*
This file is part of Magnum.
diff --git a/src/Magnum/OpenGLTester.cpp b/src/Magnum/GL/OpenGLTester.cpp
similarity index 96%
rename from src/Magnum/OpenGLTester.cpp
rename to src/Magnum/GL/OpenGLTester.cpp
index 896dfbb69..fe772abe0 100644
--- a/src/Magnum/OpenGLTester.cpp
+++ b/src/Magnum/GL/OpenGLTester.cpp
@@ -25,10 +25,10 @@
#include "OpenGLTester.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
#ifndef MAGNUM_TARGET_WEBGL
-#include "Magnum/DebugOutput.h"
+#include "Magnum/GL/DebugOutput.h"
#endif
namespace Magnum {
diff --git a/src/Magnum/OpenGLTester.h b/src/Magnum/GL/OpenGLTester.h
similarity index 98%
rename from src/Magnum/OpenGLTester.h
rename to src/Magnum/GL/OpenGLTester.h
index 297b47414..e42b1b177 100644
--- a/src/Magnum/OpenGLTester.h
+++ b/src/Magnum/GL/OpenGLTester.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_OpenGLTester_h
-#define Magnum_OpenGLTester_h
+#ifndef Magnum_GL_OpenGLTester_h
+#define Magnum_GL_OpenGLTester_h
/*
This file is part of Magnum.
@@ -31,7 +31,7 @@
#include
-#include "Magnum/Renderer.h"
+#include "Magnum/GL/Renderer.h"
#if defined(MAGNUM_TARGET_HEADLESS) || defined(CORRADE_TARGET_EMSCRIPTEN) || defined(CORRADE_TARGET_ANDROID)
#include "Magnum/Platform/WindowlessEglApplication.h"
@@ -56,7 +56,7 @@
#endif
#ifndef MAGNUM_TARGET_WEBGL
-#include "Magnum/TimeQuery.h"
+#include "Magnum/GL/TimeQuery.h"
#endif
namespace Magnum {
@@ -271,7 +271,7 @@ class OpenGLTester: public TestSuite::Tester {
Equivalent to
-@snippet Magnum.cpp OpenGLTester-MAGNUM_VERIFY_NO_ERROR
+@snippet MagnumGL.cpp OpenGLTester-MAGNUM_VERIFY_NO_ERROR
*/
#define MAGNUM_VERIFY_NO_ERROR() CORRADE_COMPARE(Magnum::Renderer::error(), Magnum::Renderer::Error::NoError)
diff --git a/src/Magnum/PixelFormat.cpp b/src/Magnum/GL/PixelFormat.cpp
similarity index 100%
rename from src/Magnum/PixelFormat.cpp
rename to src/Magnum/GL/PixelFormat.cpp
diff --git a/src/Magnum/PixelFormat.h b/src/Magnum/GL/PixelFormat.h
similarity index 99%
rename from src/Magnum/PixelFormat.h
rename to src/Magnum/GL/PixelFormat.h
index f1abce9a1..b67cff20b 100644
--- a/src/Magnum/PixelFormat.h
+++ b/src/Magnum/GL/PixelFormat.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_PixelFormat_h
-#define Magnum_PixelFormat_h
+#ifndef Magnum_GL_PixelFormat_h
+#define Magnum_GL_PixelFormat_h
/*
This file is part of Magnum.
@@ -30,8 +30,8 @@
*/
#include "Magnum/Magnum.h"
-#include "Magnum/OpenGL.h"
-#include "Magnum/visibility.h"
+#include "Magnum/GL/OpenGL.h"
+#include "Magnum/GL/visibility.h"
namespace Magnum {
@@ -1235,13 +1235,13 @@ enum class CompressedPixelFormat: GLenum {
};
/** @debugoperatorenum{Magnum::PixelFormat} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, PixelFormat value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, PixelFormat value);
/** @debugoperatorenum{Magnum::PixelType} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, PixelType value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, PixelType value);
/** @debugoperatorenum{Magnum::CompressedPixelFormat} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, CompressedPixelFormat value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, CompressedPixelFormat value);
}
diff --git a/src/Magnum/PrimitiveQuery.cpp b/src/Magnum/GL/PrimitiveQuery.cpp
similarity index 100%
rename from src/Magnum/PrimitiveQuery.cpp
rename to src/Magnum/GL/PrimitiveQuery.cpp
diff --git a/src/Magnum/PrimitiveQuery.h b/src/Magnum/GL/PrimitiveQuery.h
similarity index 97%
rename from src/Magnum/PrimitiveQuery.h
rename to src/Magnum/GL/PrimitiveQuery.h
index 917484521..e5c9b37ed 100644
--- a/src/Magnum/PrimitiveQuery.h
+++ b/src/Magnum/GL/PrimitiveQuery.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_PrimitiveQuery_h
-#define Magnum_PrimitiveQuery_h
+#ifndef Magnum_GL_PrimitiveQuery_h
+#define Magnum_GL_PrimitiveQuery_h
/*
This file is part of Magnum.
@@ -31,7 +31,7 @@
*/
#endif
-#include "Magnum/AbstractQuery.h"
+#include "Magnum/GL/AbstractQuery.h"
#ifndef MAGNUM_TARGET_GLES2
namespace Magnum {
@@ -42,14 +42,14 @@ namespace Magnum {
Queries count of generated primitives from vertex shader, geometry shader or
transform feedback. Example usage:
-@snippet Magnum.cpp PrimitiveQuery-usage
+@snippet MagnumGL.cpp PrimitiveQuery-usage
@see @ref SampleQuery, @ref TimeQuery, @ref TransformFeedback
@requires_gl30 Extension @extension{EXT,transform_feedback}
@requires_gles30 Only sample queries are available in OpenGL ES 2.0.
@requires_webgl20 Queries are not available in WebGL 1.0.
*/
-class MAGNUM_EXPORT PrimitiveQuery: public AbstractQuery {
+class MAGNUM_GL_EXPORT PrimitiveQuery: public AbstractQuery {
public:
/**
* @brief Query target
diff --git a/src/Magnum/RectangleTexture.cpp b/src/Magnum/GL/RectangleTexture.cpp
similarity index 93%
rename from src/Magnum/RectangleTexture.cpp
rename to src/Magnum/GL/RectangleTexture.cpp
index b26d8b9ba..582721b55 100644
--- a/src/Magnum/RectangleTexture.cpp
+++ b/src/Magnum/GL/RectangleTexture.cpp
@@ -26,13 +26,13 @@
#include "RectangleTexture.h"
#ifndef MAGNUM_TARGET_GLES
-#include "Magnum/BufferImage.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
#include "Magnum/Image.h"
+#include "Magnum/GL/BufferImage.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
-#include "Implementation/State.h"
-#include "Implementation/TextureState.h"
+#include "Magnum/GL/Implementation/State.h"
+#include "Magnum/GL/Implementation/TextureState.h"
namespace Magnum {
diff --git a/src/Magnum/RectangleTexture.h b/src/Magnum/GL/RectangleTexture.h
similarity index 96%
rename from src/Magnum/RectangleTexture.h
rename to src/Magnum/GL/RectangleTexture.h
index b81581b0a..f35d8c935 100644
--- a/src/Magnum/RectangleTexture.h
+++ b/src/Magnum/GL/RectangleTexture.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_RectangleTexture_h
-#define Magnum_RectangleTexture_h
+#ifndef Magnum_GL_RectangleTexture_h
+#define Magnum_GL_RectangleTexture_h
/*
This file is part of Magnum.
@@ -31,8 +31,8 @@
*/
#endif
-#include "Magnum/AbstractTexture.h"
#include "Magnum/Array.h"
+#include "Magnum/GL/AbstractTexture.h"
#include "Magnum/Math/Vector2.h"
#ifndef MAGNUM_TARGET_GLES
@@ -48,7 +48,7 @@ See also @ref AbstractTexture documentation for more information.
Common usage is to fully configure all texture parameters and then set the
data from e.g. @ref Image2D. Example configuration:
-@snippet Magnum.cpp RectangleTexture-usage
+@snippet MagnumGL.cpp RectangleTexture-usage
In a shader, the texture is used via @glsl sampler2DRect @ce,
@glsl sampler2DRectShadow @ce, @glsl isampler2DRect @ce or @glsl usampler2DRect @ce.
@@ -61,7 +61,7 @@ in shaders.
@requires_gl31 Extension @extension{ARB,texture_rectangle}
@requires_gl Rectangle textures are not available in OpenGL ES and WebGL.
*/
-class MAGNUM_EXPORT RectangleTexture: public AbstractTexture {
+class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture {
public:
/**
* @brief Max supported rectangle texture size
@@ -327,7 +327,7 @@ class MAGNUM_EXPORT RectangleTexture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp RectangleTexture-image1
+ * @snippet MagnumGL.cpp RectangleTexture-image1
*/
Image2D image(Image2D&& image);
@@ -345,7 +345,7 @@ class MAGNUM_EXPORT RectangleTexture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp RectangleTexture-image2
+ * @snippet MagnumGL.cpp RectangleTexture-image2
*/
BufferImage2D image(BufferImage2D&& image, BufferUsage usage);
@@ -363,7 +363,7 @@ class MAGNUM_EXPORT RectangleTexture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp RectangleTexture-compressedImage1
+ * @snippet MagnumGL.cpp RectangleTexture-compressedImage1
*/
CompressedImage2D compressedImage(CompressedImage2D&& image);
@@ -381,7 +381,7 @@ class MAGNUM_EXPORT RectangleTexture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp RectangleTexture-compressedImage2
+ * @snippet MagnumGL.cpp RectangleTexture-compressedImage2
*/
CompressedBufferImage2D compressedImage(CompressedBufferImage2D&& image, BufferUsage usage);
@@ -400,7 +400,7 @@ class MAGNUM_EXPORT RectangleTexture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp RectangleTexture-subImage1
+ * @snippet MagnumGL.cpp RectangleTexture-subImage1
*/
Image2D subImage(const Range2Di& range, Image2D&& image);
@@ -419,7 +419,7 @@ class MAGNUM_EXPORT RectangleTexture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp RectangleTexture-subImage2
+ * @snippet MagnumGL.cpp RectangleTexture-subImage2
*/
BufferImage2D subImage(const Range2Di& range, BufferImage2D&& image, BufferUsage usage);
@@ -442,7 +442,7 @@ class MAGNUM_EXPORT RectangleTexture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp RectangleTexture-compressedSubImage1
+ * @snippet MagnumGL.cpp RectangleTexture-compressedSubImage1
*/
CompressedImage2D compressedSubImage(const Range2Di& range, CompressedImage2D&& image);
@@ -465,7 +465,7 @@ class MAGNUM_EXPORT RectangleTexture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp RectangleTexture-compressedSubImage2
+ * @snippet MagnumGL.cpp RectangleTexture-compressedSubImage2
*/
CompressedBufferImage2D compressedSubImage(const Range2Di& range, CompressedBufferImage2D&& image, BufferUsage usage);
diff --git a/src/Magnum/Renderbuffer.cpp b/src/Magnum/GL/Renderbuffer.cpp
similarity index 96%
rename from src/Magnum/Renderbuffer.cpp
rename to src/Magnum/GL/Renderbuffer.cpp
index e9f1cf1c4..715e6f2fb 100644
--- a/src/Magnum/Renderbuffer.cpp
+++ b/src/Magnum/GL/Renderbuffer.cpp
@@ -25,14 +25,14 @@
#include "Renderbuffer.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
#ifndef MAGNUM_TARGET_WEBGL
-#include "Implementation/DebugState.h"
+#include "Magnum/GL/Implementation/DebugState.h"
#endif
-#include "Implementation/FramebufferState.h"
-#include "Implementation/State.h"
+#include "Magnum/GL/Implementation/FramebufferState.h"
+#include "Magnum/GL/Implementation/State.h"
namespace Magnum {
diff --git a/src/Magnum/Renderbuffer.h b/src/Magnum/GL/Renderbuffer.h
similarity index 90%
rename from src/Magnum/Renderbuffer.h
rename to src/Magnum/GL/Renderbuffer.h
index 949b22ed5..ae904dc53 100644
--- a/src/Magnum/Renderbuffer.h
+++ b/src/Magnum/GL/Renderbuffer.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Renderbuffer_h
-#define Magnum_Renderbuffer_h
+#ifndef Magnum_GL_Renderbuffer_h
+#define Magnum_GL_Renderbuffer_h
/*
This file is part of Magnum.
@@ -31,9 +31,9 @@
#include
-#include "Magnum/AbstractObject.h"
-#include "Magnum/Magnum.h"
#include "Magnum/Tags.h"
+#include "Magnum/GL/AbstractObject.h"
+#include "Magnum/GL/GL.h"
namespace Magnum {
@@ -60,7 +60,7 @@ information.
@requires_gl30 Extension @extension{ARB,framebuffer_object}
*/
-class MAGNUM_EXPORT Renderbuffer: public AbstractObject {
+class MAGNUM_GL_EXPORT Renderbuffer: public AbstractObject {
friend Implementation::FramebufferState;
public:
@@ -251,35 +251,35 @@ class MAGNUM_EXPORT Renderbuffer: public AbstractObject {
private:
explicit Renderbuffer(GLuint id, ObjectFlags flags) noexcept: _id{id}, _flags{flags} {}
- void MAGNUM_LOCAL createImplementationDefault();
+ void MAGNUM_GL_LOCAL createImplementationDefault();
#ifndef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL createImplementationDSA();
+ void MAGNUM_GL_LOCAL createImplementationDSA();
#endif
- void MAGNUM_LOCAL createIfNotAlready();
+ void MAGNUM_GL_LOCAL createIfNotAlready();
#ifndef MAGNUM_TARGET_WEBGL
Renderbuffer& setLabelInternal(Containers::ArrayView label);
#endif
- void MAGNUM_LOCAL storageImplementationDefault(RenderbufferFormat internalFormat, const Vector2i& size);
+ void MAGNUM_GL_LOCAL storageImplementationDefault(RenderbufferFormat internalFormat, const Vector2i& size);
#ifndef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL storageImplementationDSA(RenderbufferFormat internalFormat, const Vector2i& size);
- void MAGNUM_LOCAL storageImplementationDSAEXT(RenderbufferFormat internalFormat, const Vector2i& size);
+ void MAGNUM_GL_LOCAL storageImplementationDSA(RenderbufferFormat internalFormat, const Vector2i& size);
+ void MAGNUM_GL_LOCAL storageImplementationDSAEXT(RenderbufferFormat internalFormat, const Vector2i& size);
#endif
#ifndef MAGNUM_TARGET_GLES2
- void MAGNUM_LOCAL storageMultisampleImplementationDefault(GLsizei samples, RenderbufferFormat internalFormat, const Vector2i& size);
+ void MAGNUM_GL_LOCAL storageMultisampleImplementationDefault(GLsizei samples, RenderbufferFormat internalFormat, const Vector2i& size);
#ifndef MAGNUM_TARGET_GLES
- void MAGNUM_LOCAL storageMultisampleImplementationDSA(GLsizei samples, RenderbufferFormat internalFormat, const Vector2i& size);
- void MAGNUM_LOCAL storageMultisampleImplementationDSAEXT(GLsizei samples, RenderbufferFormat internalFormat, const Vector2i& size);
+ void MAGNUM_GL_LOCAL storageMultisampleImplementationDSA(GLsizei samples, RenderbufferFormat internalFormat, const Vector2i& size);
+ void MAGNUM_GL_LOCAL storageMultisampleImplementationDSAEXT(GLsizei samples, RenderbufferFormat internalFormat, const Vector2i& size);
#endif
#elif !defined(MAGNUM_TARGET_WEBGL)
- void MAGNUM_LOCAL storageMultisampleImplementationANGLE(GLsizei samples, RenderbufferFormat internalFormat, const Vector2i& size);
- void MAGNUM_LOCAL storageMultisampleImplementationNV(GLsizei samples, RenderbufferFormat internalFormat, const Vector2i& size);
+ void MAGNUM_GL_LOCAL storageMultisampleImplementationANGLE(GLsizei samples, RenderbufferFormat internalFormat, const Vector2i& size);
+ void MAGNUM_GL_LOCAL storageMultisampleImplementationNV(GLsizei samples, RenderbufferFormat internalFormat, const Vector2i& size);
#endif
- void MAGNUM_LOCAL bind();
+ void MAGNUM_GL_LOCAL bind();
GLuint _id;
ObjectFlags _flags;
diff --git a/src/Magnum/RenderbufferFormat.h b/src/Magnum/GL/RenderbufferFormat.h
similarity index 99%
rename from src/Magnum/RenderbufferFormat.h
rename to src/Magnum/GL/RenderbufferFormat.h
index 53debbe8a..bff4e20dd 100644
--- a/src/Magnum/RenderbufferFormat.h
+++ b/src/Magnum/GL/RenderbufferFormat.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_RenderbufferFormat_h
-#define Magnum_RenderbufferFormat_h
+#ifndef Magnum_GL_RenderbufferFormat_h
+#define Magnum_GL_RenderbufferFormat_h
/*
This file is part of Magnum.
@@ -29,7 +29,7 @@
* @brief Enum @ref Magnum::RenderbufferFormat
*/
-#include "Magnum/OpenGL.h"
+#include "Magnum/GL/OpenGL.h"
namespace Magnum {
diff --git a/src/Magnum/Renderer.cpp b/src/Magnum/GL/Renderer.cpp
similarity index 98%
rename from src/Magnum/Renderer.cpp
rename to src/Magnum/GL/Renderer.cpp
index 2e039eab4..5d33f9dc9 100644
--- a/src/Magnum/Renderer.cpp
+++ b/src/Magnum/GL/Renderer.cpp
@@ -25,13 +25,13 @@
#include "Renderer.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
#include "Magnum/Math/Color.h"
#include "Magnum/Math/Range.h"
-#include "Implementation/State.h"
-#include "Implementation/RendererState.h"
+#include "Magnum/GL/Implementation/State.h"
+#include "Magnum/GL/Implementation/RendererState.h"
namespace Magnum {
diff --git a/src/Magnum/Renderer.h b/src/Magnum/GL/Renderer.h
similarity index 98%
rename from src/Magnum/Renderer.h
rename to src/Magnum/GL/Renderer.h
index 154d5e917..2450223fb 100644
--- a/src/Magnum/Renderer.h
+++ b/src/Magnum/GL/Renderer.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Renderer_h
-#define Magnum_Renderer_h
+#ifndef Magnum_GL_Renderer_h
+#define Magnum_GL_Renderer_h
/*
This file is part of Magnum.
@@ -32,8 +32,9 @@
#include
#include "Magnum/Magnum.h"
-#include "Magnum/OpenGL.h"
-#include "Magnum/visibility.h"
+#include "Magnum/GL/GL.h"
+#include "Magnum/GL/OpenGL.h"
+#include "Magnum/GL/visibility.h"
namespace Magnum {
@@ -47,7 +48,7 @@ namespace Implementation { struct RendererState; }
@todo `GL_STEREO`, `GL_DOUBLEBUFFER` (?)
@todo `GL_MAX_CLIP_DISTANCES`...
*/
-class MAGNUM_EXPORT Renderer {
+class MAGNUM_GL_EXPORT Renderer {
friend Context;
friend Implementation::RendererState;
@@ -1617,16 +1618,16 @@ class MAGNUM_EXPORT Renderer {
/*@}*/
private:
- static void MAGNUM_LOCAL initializeContextBasedFunctionality();
+ static void MAGNUM_GL_LOCAL initializeContextBasedFunctionality();
#ifndef MAGNUM_TARGET_GLES
- static void MAGNUM_LOCAL clearDepthfImplementationDefault(GLfloat depth);
+ static void MAGNUM_GL_LOCAL clearDepthfImplementationDefault(GLfloat depth);
#endif
- static void MAGNUM_LOCAL clearDepthfImplementationES(GLfloat depth);
+ static void MAGNUM_GL_LOCAL clearDepthfImplementationES(GLfloat depth);
#ifndef MAGNUM_TARGET_WEBGL
- static GraphicsResetStatus MAGNUM_LOCAL graphicsResetStatusImplementationDefault();
- static GraphicsResetStatus MAGNUM_LOCAL graphicsResetStatusImplementationRobustness();
+ static GraphicsResetStatus MAGNUM_GL_LOCAL graphicsResetStatusImplementationDefault();
+ static GraphicsResetStatus MAGNUM_GL_LOCAL graphicsResetStatusImplementationRobustness();
#endif
};
@@ -1635,14 +1636,14 @@ CORRADE_ENUMSET_OPERATORS(Renderer::MemoryBarriers)
#endif
/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::Error} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, Renderer::Error value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Renderer::Error value);
#ifndef MAGNUM_TARGET_WEBGL
/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::ResetNotificationStrategy} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, Renderer::ResetNotificationStrategy value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Renderer::ResetNotificationStrategy value);
/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::GraphicsResetStatus} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, Renderer::GraphicsResetStatus value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Renderer::GraphicsResetStatus value);
#endif
}
diff --git a/src/Magnum/SampleQuery.h b/src/Magnum/GL/SampleQuery.h
similarity index 98%
rename from src/Magnum/SampleQuery.h
rename to src/Magnum/GL/SampleQuery.h
index cb34ebf0c..9dd56d48f 100644
--- a/src/Magnum/SampleQuery.h
+++ b/src/Magnum/GL/SampleQuery.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_SampleQuery_h
-#define Magnum_SampleQuery_h
+#ifndef Magnum_GL_SampleQuery_h
+#define Magnum_GL_SampleQuery_h
/*
This file is part of Magnum.
@@ -31,7 +31,7 @@
*/
#endif
-#include "Magnum/AbstractQuery.h"
+#include "Magnum/GL/AbstractQuery.h"
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
namespace Magnum {
@@ -43,7 +43,7 @@ Queries count of samples passed from fragment shader or boolean value
indicating whether any samples passed. Can be used for example for conditional
rendering:
-@snippet Magnum.cpp SampleQuery-usage
+@snippet MagnumGL.cpp SampleQuery-usage
This approach has some drawbacks, as the rendering is blocked until result is
available for the CPU to decide. This can be improved by using conditional
@@ -51,7 +51,7 @@ rendering on GPU itself. The drawing commands will be sent to the GPU and
processed or discarded later, so CPU can continue executing the code without
waiting for the result.
-@snippet Magnum.cpp SampleQuery-conditional-render
+@snippet MagnumGL.cpp SampleQuery-conditional-render
@see @ref PrimitiveQuery, @ref TimeQuery
@requires_gles30 Extension @extension{EXT,occlusion_query_boolean} in
diff --git a/src/Magnum/Sampler.cpp b/src/Magnum/GL/Sampler.cpp
similarity index 97%
rename from src/Magnum/Sampler.cpp
rename to src/Magnum/GL/Sampler.cpp
index 9b099360a..1ca3017ce 100644
--- a/src/Magnum/Sampler.cpp
+++ b/src/Magnum/GL/Sampler.cpp
@@ -27,10 +27,10 @@
#include
-#include "Magnum/Context.h"
-#include "Magnum/Implementation/State.h"
-#include "Magnum/Implementation/TextureState.h"
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
+#include "Magnum/GL/Implementation/State.h"
+#include "Magnum/GL/Implementation/TextureState.h"
namespace Magnum {
diff --git a/src/Magnum/Sampler.h b/src/Magnum/GL/Sampler.h
similarity index 94%
rename from src/Magnum/Sampler.h
rename to src/Magnum/GL/Sampler.h
index 1927f13c8..be21f60dd 100644
--- a/src/Magnum/Sampler.h
+++ b/src/Magnum/GL/Sampler.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Sampler_h
-#define Magnum_Sampler_h
+#ifndef Magnum_GL_Sampler_h
+#define Magnum_GL_Sampler_h
/*
This file is part of Magnum.
@@ -30,8 +30,8 @@
*/
#include "Magnum/Magnum.h"
-#include "Magnum/OpenGL.h"
-#include "Magnum/visibility.h"
+#include "Magnum/GL/OpenGL.h"
+#include "Magnum/GL/visibility.h"
namespace Magnum {
@@ -41,7 +41,7 @@ namespace Magnum {
@see @ref Texture, @ref TextureArray, @ref CubeMapTexture,
@ref CubeMapTextureArray, @ref RectangleTexture
*/
-class MAGNUM_EXPORT Sampler {
+class MAGNUM_GL_EXPORT Sampler {
public:
/**
* @brief Texture filtering
@@ -276,25 +276,25 @@ class MAGNUM_EXPORT Sampler {
};
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Filter} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, Sampler::Filter value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Sampler::Filter value);
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Mipmap} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, Sampler::Mipmap value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Sampler::Mipmap value);
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Wrapping} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, Sampler::Wrapping value);
+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} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, Sampler::CompareMode value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Sampler::CompareMode value);
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::CompareFunction} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, Sampler::CompareFunction value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Sampler::CompareFunction value);
#endif
#ifndef MAGNUM_TARGET_GLES
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::DepthStencilMode} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, Sampler::DepthStencilMode value);
+MAGNUM_GL_EXPORT Debug& operator<<(Debug& debug, Sampler::DepthStencilMode value);
#endif
}
diff --git a/src/Magnum/Shader.cpp b/src/Magnum/GL/Shader.cpp
similarity index 99%
rename from src/Magnum/Shader.cpp
rename to src/Magnum/GL/Shader.cpp
index 10eb7239c..516003328 100644
--- a/src/Magnum/Shader.cpp
+++ b/src/Magnum/GL/Shader.cpp
@@ -30,14 +30,13 @@
#include
#include
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
-
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
#ifndef MAGNUM_TARGET_WEBGL
-#include "Implementation/DebugState.h"
+#include "Magnum/GL/Implementation/DebugState.h"
#endif
-#include "Implementation/State.h"
-#include "Implementation/ShaderState.h"
+#include "Magnum/GL/Implementation/State.h"
+#include "Magnum/GL/Implementation/ShaderState.h"
/* libgles-omap3-dev_4.03.00.02-r15.6 on BeagleBoard/Ångström linux 2011.3 doesn't have GLchar */
#ifdef MAGNUM_TARGET_GLES
diff --git a/src/Magnum/Shader.h b/src/Magnum/GL/Shader.h
similarity index 98%
rename from src/Magnum/Shader.h
rename to src/Magnum/GL/Shader.h
index 1e9a6dd80..55055fb13 100644
--- a/src/Magnum/Shader.h
+++ b/src/Magnum/GL/Shader.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Shader_h
-#define Magnum_Shader_h
+#ifndef Magnum_GL_Shader_h
+#define Magnum_GL_Shader_h
/*
This file is part of Magnum.
@@ -34,8 +34,8 @@
#include
#include
-#include "Magnum/AbstractObject.h"
-#include "Magnum/Magnum.h"
+#include "Magnum/GL/AbstractObject.h"
+#include "Magnum/GL/GL.h"
namespace Magnum {
@@ -51,7 +51,7 @@ See @ref AbstractShaderProgram for usage information.
Shader limits and implementation-defined values (such as @ref maxUniformComponents())
are cached, so repeated queries don't result in repeated @fn_gl{Get} calls.
*/
-class MAGNUM_EXPORT Shader: public AbstractObject {
+class MAGNUM_GL_EXPORT Shader: public AbstractObject {
friend Implementation::ShaderState;
public:
@@ -619,9 +619,9 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
private:
Shader& setLabelInternal(Containers::ArrayView label);
- void MAGNUM_LOCAL addSourceImplementationDefault(std::string source);
+ void MAGNUM_GL_LOCAL addSourceImplementationDefault(std::string source);
#if defined(CORRADE_TARGET_EMSCRIPTEN) && defined(__EMSCRIPTEN_PTHREADS__)
- void MAGNUM_LOCAL addSourceImplementationEmscriptenPthread(std::string source);
+ void MAGNUM_GL_LOCAL addSourceImplementationEmscriptenPthread(std::string source);
#endif
Type _type;
@@ -631,7 +631,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
};
/** @debugoperatorclassenum{Magnum::Shader,Magnum::Shader::Type} */
-MAGNUM_EXPORT Debug& operator<<(Debug& debug, Shader::Type value);
+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)) {
other._id = 0;
diff --git a/src/Magnum/Test/AbstractObjectGLTest.cpp b/src/Magnum/GL/Test/AbstractObjectGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/AbstractObjectGLTest.cpp
rename to src/Magnum/GL/Test/AbstractObjectGLTest.cpp
diff --git a/src/Magnum/Test/AbstractQueryGLTest.cpp b/src/Magnum/GL/Test/AbstractQueryGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/AbstractQueryGLTest.cpp
rename to src/Magnum/GL/Test/AbstractQueryGLTest.cpp
diff --git a/src/Magnum/Test/AbstractShaderProgramGLTest.cpp b/src/Magnum/GL/Test/AbstractShaderProgramGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/AbstractShaderProgramGLTest.cpp
rename to src/Magnum/GL/Test/AbstractShaderProgramGLTest.cpp
diff --git a/src/Magnum/Test/AbstractShaderProgramGLTestFiles/ComputeShader.comp b/src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/ComputeShader.comp
similarity index 100%
rename from src/Magnum/Test/AbstractShaderProgramGLTestFiles/ComputeShader.comp
rename to src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/ComputeShader.comp
diff --git a/src/Magnum/Test/AbstractShaderProgramGLTestFiles/MyShader.frag b/src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/MyShader.frag
similarity index 100%
rename from src/Magnum/Test/AbstractShaderProgramGLTestFiles/MyShader.frag
rename to src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/MyShader.frag
diff --git a/src/Magnum/Test/AbstractShaderProgramGLTestFiles/MyShader.vert b/src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/MyShader.vert
similarity index 100%
rename from src/Magnum/Test/AbstractShaderProgramGLTestFiles/MyShader.vert
rename to src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/MyShader.vert
diff --git a/src/Magnum/Test/AbstractShaderProgramGLTestFiles/MyShaderFragmentOutputs.frag b/src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/MyShaderFragmentOutputs.frag
similarity index 100%
rename from src/Magnum/Test/AbstractShaderProgramGLTestFiles/MyShaderFragmentOutputs.frag
rename to src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/MyShaderFragmentOutputs.frag
diff --git a/src/Magnum/Test/AbstractShaderProgramGLTestFiles/UniformBlockShader.frag b/src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/UniformBlockShader.frag
similarity index 100%
rename from src/Magnum/Test/AbstractShaderProgramGLTestFiles/UniformBlockShader.frag
rename to src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/UniformBlockShader.frag
diff --git a/src/Magnum/Test/AbstractShaderProgramGLTestFiles/UniformBlockShader.vert b/src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/UniformBlockShader.vert
similarity index 100%
rename from src/Magnum/Test/AbstractShaderProgramGLTestFiles/UniformBlockShader.vert
rename to src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/UniformBlockShader.vert
diff --git a/src/Magnum/Test/AbstractShaderProgramGLTestFiles/resources.conf b/src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/resources.conf
similarity index 100%
rename from src/Magnum/Test/AbstractShaderProgramGLTestFiles/resources.conf
rename to src/Magnum/GL/Test/AbstractShaderProgramGLTestFiles/resources.conf
diff --git a/src/Magnum/Test/AbstractShaderProgramTest.cpp b/src/Magnum/GL/Test/AbstractShaderProgramTest.cpp
similarity index 100%
rename from src/Magnum/Test/AbstractShaderProgramTest.cpp
rename to src/Magnum/GL/Test/AbstractShaderProgramTest.cpp
diff --git a/src/Magnum/Test/AbstractTextureGLTest.cpp b/src/Magnum/GL/Test/AbstractTextureGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/AbstractTextureGLTest.cpp
rename to src/Magnum/GL/Test/AbstractTextureGLTest.cpp
diff --git a/src/Magnum/Test/AttributeTest.cpp b/src/Magnum/GL/Test/AttributeTest.cpp
similarity index 100%
rename from src/Magnum/Test/AttributeTest.cpp
rename to src/Magnum/GL/Test/AttributeTest.cpp
diff --git a/src/Magnum/Test/BufferGLTest.cpp b/src/Magnum/GL/Test/BufferGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/BufferGLTest.cpp
rename to src/Magnum/GL/Test/BufferGLTest.cpp
diff --git a/src/Magnum/Test/BufferImageGLTest.cpp b/src/Magnum/GL/Test/BufferImageGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/BufferImageGLTest.cpp
rename to src/Magnum/GL/Test/BufferImageGLTest.cpp
diff --git a/src/Magnum/Test/BufferImageTest.cpp b/src/Magnum/GL/Test/BufferImageTest.cpp
similarity index 100%
rename from src/Magnum/Test/BufferImageTest.cpp
rename to src/Magnum/GL/Test/BufferImageTest.cpp
diff --git a/src/Magnum/Test/BufferTest.cpp b/src/Magnum/GL/Test/BufferTest.cpp
similarity index 100%
rename from src/Magnum/Test/BufferTest.cpp
rename to src/Magnum/GL/Test/BufferTest.cpp
diff --git a/src/Magnum/Test/BufferTextureGLTest.cpp b/src/Magnum/GL/Test/BufferTextureGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/BufferTextureGLTest.cpp
rename to src/Magnum/GL/Test/BufferTextureGLTest.cpp
diff --git a/src/Magnum/Test/BufferTextureTest.cpp b/src/Magnum/GL/Test/BufferTextureTest.cpp
similarity index 100%
rename from src/Magnum/Test/BufferTextureTest.cpp
rename to src/Magnum/GL/Test/BufferTextureTest.cpp
diff --git a/src/Magnum/GL/Test/CMakeLists.txt b/src/Magnum/GL/Test/CMakeLists.txt
new file mode 100644
index 000000000..b32e23547
--- /dev/null
+++ b/src/Magnum/GL/Test/CMakeLists.txt
@@ -0,0 +1,205 @@
+#
+# This file is part of Magnum.
+#
+# Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
+# Vladimír Vondruš
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+corrade_add_test(GLAttributeTest AttributeTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLAbstractShaderProgramTest AbstractShaderProgramTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLBufferTest BufferTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLFormatTest FormatTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLContextTest ContextTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLCubeMapTextureTest CubeMapTextureTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLDefaultFramebufferTest DefaultFramebufferTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLFramebufferTest FramebufferTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLImageTest ../../Test/ImageTest.cpp LIBRARIES MagnumGL) # temporary
+corrade_add_test(GLImageViewTest ../../Test/ImageViewTest.cpp LIBRARIES MagnumGL) # temporary
+corrade_add_test(GLMeshTest MeshTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLPixelStorageTest ../../Test/PixelStorageTest.cpp LIBRARIES MagnumGL) # temporary
+corrade_add_test(GLRendererTest RendererTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLRenderbufferTest RenderbufferTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLSamplerTest SamplerTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLShaderTest ShaderTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLTextureTest TextureTest.cpp LIBRARIES MagnumGL)
+corrade_add_test(GLVersionTest VersionTest.cpp LIBRARIES MagnumGL)
+
+set_target_properties(
+ GLAttributeTest
+ GLAbstractShaderProgramTest
+ GLBufferTest
+ GLFormatTest
+ GLContextTest
+ GLCubeMapTextureTest
+ GLDefaultFramebufferTest
+ GLFramebufferTest
+ GLImageTest
+ GLImageViewTest
+ GLMeshTest
+ GLPixelStorageTest
+ GLRendererTest
+ GLRenderbufferTest
+ GLSamplerTest
+ GLShaderTest
+ GLTextureTest
+ GLVersionTest
+ PROPERTIES FOLDER "Magnum/GL/Test")
+
+if(NOT MAGNUM_TARGET_WEBGL)
+ corrade_add_test(GLDebugOutputTest DebugOutputTest.cpp LIBRARIES MagnumGL)
+ set_target_properties(GLDebugOutputTest PROPERTIES FOLDER "Magnum/GL/Test")
+endif()
+
+if(NOT MAGNUM_TARGET_GLES2)
+ corrade_add_test(GLBufferImageTest BufferImageTest.cpp LIBRARIES MagnumGL)
+ corrade_add_test(GLPrimitiveQueryTest PrimitiveQueryTest.cpp LIBRARIES MagnumGL)
+ corrade_add_test(GLTextureArrayTest TextureArrayTest.cpp LIBRARIES MagnumGL)
+ corrade_add_test(GLTransformFeedbackTest TransformFeedbackTest.cpp LIBRARIES MagnumGL)
+
+ set_target_properties(
+ GLBufferImageTest
+ GLPrimitiveQueryTest
+ GLTextureArrayTest
+ GLTransformFeedbackTest
+ PROPERTIES FOLDER "Magnum/GL/Test")
+endif()
+
+if(NOT MAGNUM_TARGET_GLES2 AND NOT MAGNUM_TARGET_WEBGL)
+ corrade_add_test(GLBufferTextureTest BufferTextureTest.cpp LIBRARIES MagnumGL)
+ corrade_add_test(GLCubeMapTextureArrayTest CubeMapTextureArrayTest.cpp LIBRARIES MagnumGL)
+ corrade_add_test(GLMultisampleTextureTest MultisampleTextureTest.cpp LIBRARIES MagnumGL)
+
+ set_target_properties(
+ GLBufferTextureTest
+ GLCubeMapTextureArrayTest
+ GLMultisampleTextureTest
+ PROPERTIES FOLDER "Magnum/GL/Test")
+endif()
+
+if(NOT (MAGNUM_TARGET_WEBGL AND MAGNUM_TARGET_GLES2))
+ corrade_add_test(GLSampleQueryTest SampleQueryTest.cpp LIBRARIES MagnumGL)
+ set_target_properties(GLSampleQueryTest PROPERTIES FOLDER "Magnum/GL/Test")
+endif()
+
+if(NOT MAGNUM_TARGET_WEBGL)
+ corrade_add_test(GLTimeQueryTest TimeQueryTest.cpp LIBRARIES MagnumGL)
+ set_target_properties(GLTimeQueryTest PROPERTIES FOLDER "Magnum/GL/Test")
+endif()
+
+if(NOT MAGNUM_TARGET_GLES)
+ corrade_add_test(GLRectangleTextureTest RectangleTextureTest.cpp LIBRARIES MagnumGL)
+ set_target_properties(GLRectangleTextureTest PROPERTIES FOLDER "Magnum/GL/Test")
+endif()
+
+if(BUILD_GL_TESTS)
+ corrade_add_test(GLAbstractTextureGLTest AbstractTextureGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLBufferGLTest BufferGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLContextGLTest ContextGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLCubeMapTextureGLTest CubeMapTextureGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLFramebufferGLTest FramebufferGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLMeshGLTest MeshGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLRenderbufferGLTest RenderbufferGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLTextureGLTest TextureGLTest.cpp LIBRARIES MagnumOpenGLTester)
+
+ corrade_add_resource(GLAbstractShaderProgramGLTest_RES AbstractShaderProgramGLTestFiles/resources.conf)
+ corrade_add_test(GLAbstractShaderProgramGLTest
+ AbstractShaderProgramGLTest.cpp
+ ${GLAbstractShaderProgramGLTest_RES}
+ LIBRARIES MagnumOpenGLTester)
+
+ if(CORRADE_TARGET_EMSCRIPTEN OR CORRADE_TARGET_ANDROID)
+ set(SHADERGLTEST_FILES_DIR "ShaderGLTestFiles")
+ else()
+ set(SHADERGLTEST_FILES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ShaderGLTestFiles)
+ endif()
+
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/configure.h)
+ corrade_add_test(GLShaderGLTest ShaderGLTest.cpp
+ LIBRARIES MagnumOpenGLTester
+ FILES ShaderGLTestFiles/shader.glsl)
+ target_include_directories(GLShaderGLTest PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+
+ set_target_properties(
+ GLAbstractTextureGLTest
+ GLBufferGLTest
+ GLContextGLTest
+ GLCubeMapTextureGLTest
+ GLFramebufferGLTest
+ GLMeshGLTest
+ GLRenderbufferGLTest
+ GLTextureGLTest
+
+ GLAbstractShaderProgramGLTest
+ GLAbstractShaderProgramGLTest_RES-dependencies
+
+ GLShaderGLTest
+ PROPERTIES FOLDER "Magnum/GL/Test")
+
+ if(NOT MAGNUM_TARGET_WEBGL)
+ corrade_add_test(GLAbstractObjectGLTest AbstractObjectGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLDebugOutputGLTest DebugOutputGLTest.cpp LIBRARIES MagnumOpenGLTester)
+
+ set_target_properties(
+ GLAbstractObjectGLTest
+ GLDebugOutputGLTest
+ PROPERTIES FOLDER "Magnum/GL/Test")
+ endif()
+
+ if(NOT (MAGNUM_TARGET_WEBGL AND MAGNUM_TARGET_GLES2))
+ corrade_add_test(GLAbstractQueryGLTest AbstractQueryGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLPixelStorageGLTest PixelStorageGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLSampleQueryGLTest SampleQueryGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLTimeQueryGLTest TimeQueryGLTest.cpp LIBRARIES MagnumOpenGLTester)
+
+ set_target_properties(
+ GLAbstractQueryGLTest
+ GLPixelStorageGLTest
+ GLSampleQueryGLTest
+ GLTimeQueryGLTest
+ PROPERTIES FOLDER "Magnum/GL/Test")
+ endif()
+
+ if(NOT MAGNUM_TARGET_GLES2)
+ corrade_add_test(GLBufferImageGLTest BufferImageGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLBufferTextureGLTest BufferTextureGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLCubeMapTextureArrayGLTest CubeMapTextureArrayGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLMultisampleTextureGLTest MultisampleTextureGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLPrimitiveQueryGLTest PrimitiveQueryGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLTextureArrayGLTest TextureArrayGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ corrade_add_test(GLTransformFeedbackGLTest TransformFeedbackGLTest.cpp LIBRARIES MagnumOpenGLTester)
+
+ set_target_properties(
+ GLBufferImageGLTest
+ GLBufferTextureGLTest
+ GLCubeMapTextureArrayGLTest
+ GLMultisampleTextureGLTest
+ GLPrimitiveQueryGLTest
+ GLTextureArrayGLTest
+ GLTransformFeedbackGLTest
+ PROPERTIES FOLDER "Magnum/GL/Test")
+ endif()
+
+ if(NOT MAGNUM_TARGET_GLES)
+ corrade_add_test(GLRectangleTextureGLTest RectangleTextureGLTest.cpp LIBRARIES MagnumOpenGLTester)
+ set_target_properties(GLRectangleTextureGLTest PROPERTIES FOLDER "Magnum/GL/Test")
+ endif()
+endif()
diff --git a/src/Magnum/Test/ContextGLTest.cpp b/src/Magnum/GL/Test/ContextGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/ContextGLTest.cpp
rename to src/Magnum/GL/Test/ContextGLTest.cpp
diff --git a/src/Magnum/Test/ContextTest.cpp b/src/Magnum/GL/Test/ContextTest.cpp
similarity index 100%
rename from src/Magnum/Test/ContextTest.cpp
rename to src/Magnum/GL/Test/ContextTest.cpp
diff --git a/src/Magnum/Test/CubeMapTextureArrayGLTest.cpp b/src/Magnum/GL/Test/CubeMapTextureArrayGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/CubeMapTextureArrayGLTest.cpp
rename to src/Magnum/GL/Test/CubeMapTextureArrayGLTest.cpp
diff --git a/src/Magnum/Test/CubeMapTextureArrayTest.cpp b/src/Magnum/GL/Test/CubeMapTextureArrayTest.cpp
similarity index 100%
rename from src/Magnum/Test/CubeMapTextureArrayTest.cpp
rename to src/Magnum/GL/Test/CubeMapTextureArrayTest.cpp
diff --git a/src/Magnum/Test/CubeMapTextureGLTest.cpp b/src/Magnum/GL/Test/CubeMapTextureGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/CubeMapTextureGLTest.cpp
rename to src/Magnum/GL/Test/CubeMapTextureGLTest.cpp
diff --git a/src/Magnum/Test/CubeMapTextureTest.cpp b/src/Magnum/GL/Test/CubeMapTextureTest.cpp
similarity index 100%
rename from src/Magnum/Test/CubeMapTextureTest.cpp
rename to src/Magnum/GL/Test/CubeMapTextureTest.cpp
diff --git a/src/Magnum/Test/DebugOutputGLTest.cpp b/src/Magnum/GL/Test/DebugOutputGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/DebugOutputGLTest.cpp
rename to src/Magnum/GL/Test/DebugOutputGLTest.cpp
diff --git a/src/Magnum/Test/DebugOutputTest.cpp b/src/Magnum/GL/Test/DebugOutputTest.cpp
similarity index 100%
rename from src/Magnum/Test/DebugOutputTest.cpp
rename to src/Magnum/GL/Test/DebugOutputTest.cpp
diff --git a/src/Magnum/Test/DefaultFramebufferTest.cpp b/src/Magnum/GL/Test/DefaultFramebufferTest.cpp
similarity index 100%
rename from src/Magnum/Test/DefaultFramebufferTest.cpp
rename to src/Magnum/GL/Test/DefaultFramebufferTest.cpp
diff --git a/src/Magnum/Test/FormatTest.cpp b/src/Magnum/GL/Test/FormatTest.cpp
similarity index 100%
rename from src/Magnum/Test/FormatTest.cpp
rename to src/Magnum/GL/Test/FormatTest.cpp
diff --git a/src/Magnum/Test/FramebufferGLTest.cpp b/src/Magnum/GL/Test/FramebufferGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/FramebufferGLTest.cpp
rename to src/Magnum/GL/Test/FramebufferGLTest.cpp
diff --git a/src/Magnum/Test/FramebufferTest.cpp b/src/Magnum/GL/Test/FramebufferTest.cpp
similarity index 100%
rename from src/Magnum/Test/FramebufferTest.cpp
rename to src/Magnum/GL/Test/FramebufferTest.cpp
diff --git a/src/Magnum/Test/MeshGLTest.cpp b/src/Magnum/GL/Test/MeshGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/MeshGLTest.cpp
rename to src/Magnum/GL/Test/MeshGLTest.cpp
diff --git a/src/Magnum/Test/MeshTest.cpp b/src/Magnum/GL/Test/MeshTest.cpp
similarity index 100%
rename from src/Magnum/Test/MeshTest.cpp
rename to src/Magnum/GL/Test/MeshTest.cpp
diff --git a/src/Magnum/Test/MultisampleTextureGLTest.cpp b/src/Magnum/GL/Test/MultisampleTextureGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/MultisampleTextureGLTest.cpp
rename to src/Magnum/GL/Test/MultisampleTextureGLTest.cpp
diff --git a/src/Magnum/Test/MultisampleTextureTest.cpp b/src/Magnum/GL/Test/MultisampleTextureTest.cpp
similarity index 100%
rename from src/Magnum/Test/MultisampleTextureTest.cpp
rename to src/Magnum/GL/Test/MultisampleTextureTest.cpp
diff --git a/src/Magnum/Test/PixelStorageGLTest.cpp b/src/Magnum/GL/Test/PixelStorageGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/PixelStorageGLTest.cpp
rename to src/Magnum/GL/Test/PixelStorageGLTest.cpp
diff --git a/src/Magnum/Test/PrimitiveQueryGLTest.cpp b/src/Magnum/GL/Test/PrimitiveQueryGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/PrimitiveQueryGLTest.cpp
rename to src/Magnum/GL/Test/PrimitiveQueryGLTest.cpp
diff --git a/src/Magnum/Test/PrimitiveQueryTest.cpp b/src/Magnum/GL/Test/PrimitiveQueryTest.cpp
similarity index 100%
rename from src/Magnum/Test/PrimitiveQueryTest.cpp
rename to src/Magnum/GL/Test/PrimitiveQueryTest.cpp
diff --git a/src/Magnum/Test/RectangleTextureGLTest.cpp b/src/Magnum/GL/Test/RectangleTextureGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/RectangleTextureGLTest.cpp
rename to src/Magnum/GL/Test/RectangleTextureGLTest.cpp
diff --git a/src/Magnum/Test/RectangleTextureTest.cpp b/src/Magnum/GL/Test/RectangleTextureTest.cpp
similarity index 100%
rename from src/Magnum/Test/RectangleTextureTest.cpp
rename to src/Magnum/GL/Test/RectangleTextureTest.cpp
diff --git a/src/Magnum/Test/RenderbufferGLTest.cpp b/src/Magnum/GL/Test/RenderbufferGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/RenderbufferGLTest.cpp
rename to src/Magnum/GL/Test/RenderbufferGLTest.cpp
diff --git a/src/Magnum/Test/RenderbufferTest.cpp b/src/Magnum/GL/Test/RenderbufferTest.cpp
similarity index 100%
rename from src/Magnum/Test/RenderbufferTest.cpp
rename to src/Magnum/GL/Test/RenderbufferTest.cpp
diff --git a/src/Magnum/Test/RendererTest.cpp b/src/Magnum/GL/Test/RendererTest.cpp
similarity index 100%
rename from src/Magnum/Test/RendererTest.cpp
rename to src/Magnum/GL/Test/RendererTest.cpp
diff --git a/src/Magnum/Test/SampleQueryGLTest.cpp b/src/Magnum/GL/Test/SampleQueryGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/SampleQueryGLTest.cpp
rename to src/Magnum/GL/Test/SampleQueryGLTest.cpp
diff --git a/src/Magnum/Test/SampleQueryTest.cpp b/src/Magnum/GL/Test/SampleQueryTest.cpp
similarity index 100%
rename from src/Magnum/Test/SampleQueryTest.cpp
rename to src/Magnum/GL/Test/SampleQueryTest.cpp
diff --git a/src/Magnum/Test/SamplerTest.cpp b/src/Magnum/GL/Test/SamplerTest.cpp
similarity index 100%
rename from src/Magnum/Test/SamplerTest.cpp
rename to src/Magnum/GL/Test/SamplerTest.cpp
diff --git a/src/Magnum/Test/ShaderGLTest.cpp b/src/Magnum/GL/Test/ShaderGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/ShaderGLTest.cpp
rename to src/Magnum/GL/Test/ShaderGLTest.cpp
diff --git a/src/Magnum/Test/ShaderGLTestFiles/.gitattributes b/src/Magnum/GL/Test/ShaderGLTestFiles/.gitattributes
similarity index 100%
rename from src/Magnum/Test/ShaderGLTestFiles/.gitattributes
rename to src/Magnum/GL/Test/ShaderGLTestFiles/.gitattributes
diff --git a/src/Magnum/Test/ShaderGLTestFiles/shader.glsl b/src/Magnum/GL/Test/ShaderGLTestFiles/shader.glsl
similarity index 100%
rename from src/Magnum/Test/ShaderGLTestFiles/shader.glsl
rename to src/Magnum/GL/Test/ShaderGLTestFiles/shader.glsl
diff --git a/src/Magnum/Test/ShaderTest.cpp b/src/Magnum/GL/Test/ShaderTest.cpp
similarity index 100%
rename from src/Magnum/Test/ShaderTest.cpp
rename to src/Magnum/GL/Test/ShaderTest.cpp
diff --git a/src/Magnum/Test/TextureArrayGLTest.cpp b/src/Magnum/GL/Test/TextureArrayGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/TextureArrayGLTest.cpp
rename to src/Magnum/GL/Test/TextureArrayGLTest.cpp
diff --git a/src/Magnum/Test/TextureArrayTest.cpp b/src/Magnum/GL/Test/TextureArrayTest.cpp
similarity index 100%
rename from src/Magnum/Test/TextureArrayTest.cpp
rename to src/Magnum/GL/Test/TextureArrayTest.cpp
diff --git a/src/Magnum/Test/TextureGLTest.cpp b/src/Magnum/GL/Test/TextureGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/TextureGLTest.cpp
rename to src/Magnum/GL/Test/TextureGLTest.cpp
diff --git a/src/Magnum/Test/TextureTest.cpp b/src/Magnum/GL/Test/TextureTest.cpp
similarity index 100%
rename from src/Magnum/Test/TextureTest.cpp
rename to src/Magnum/GL/Test/TextureTest.cpp
diff --git a/src/Magnum/Test/TimeQueryGLTest.cpp b/src/Magnum/GL/Test/TimeQueryGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/TimeQueryGLTest.cpp
rename to src/Magnum/GL/Test/TimeQueryGLTest.cpp
diff --git a/src/Magnum/Test/TimeQueryTest.cpp b/src/Magnum/GL/Test/TimeQueryTest.cpp
similarity index 100%
rename from src/Magnum/Test/TimeQueryTest.cpp
rename to src/Magnum/GL/Test/TimeQueryTest.cpp
diff --git a/src/Magnum/Test/TransformFeedbackGLTest.cpp b/src/Magnum/GL/Test/TransformFeedbackGLTest.cpp
similarity index 100%
rename from src/Magnum/Test/TransformFeedbackGLTest.cpp
rename to src/Magnum/GL/Test/TransformFeedbackGLTest.cpp
diff --git a/src/Magnum/Test/TransformFeedbackTest.cpp b/src/Magnum/GL/Test/TransformFeedbackTest.cpp
similarity index 100%
rename from src/Magnum/Test/TransformFeedbackTest.cpp
rename to src/Magnum/GL/Test/TransformFeedbackTest.cpp
diff --git a/src/Magnum/Test/VersionTest.cpp b/src/Magnum/GL/Test/VersionTest.cpp
similarity index 100%
rename from src/Magnum/Test/VersionTest.cpp
rename to src/Magnum/GL/Test/VersionTest.cpp
diff --git a/src/Magnum/Test/configure.h.cmake b/src/Magnum/GL/Test/configure.h.cmake
similarity index 100%
rename from src/Magnum/Test/configure.h.cmake
rename to src/Magnum/GL/Test/configure.h.cmake
diff --git a/src/Magnum/Texture.cpp b/src/Magnum/GL/Texture.cpp
similarity index 87%
rename from src/Magnum/Texture.cpp
rename to src/Magnum/GL/Texture.cpp
index db27aa7d6..cc0043662 100644
--- a/src/Magnum/Texture.cpp
+++ b/src/Magnum/GL/Texture.cpp
@@ -25,18 +25,17 @@
#include "Texture.h"
-#include "Magnum/Context.h"
-#include "Magnum/Extensions.h"
+#include "Magnum/GL/Context.h"
+#include "Magnum/GL/Extensions.h"
+#include "Magnum/GL/Implementation/maxTextureSize.h"
+#include "Magnum/GL/Implementation/State.h"
+#include "Magnum/GL/Implementation/TextureState.h"
#ifndef MAGNUM_TARGET_GLES
-#include "Magnum/BufferImage.h"
#include "Magnum/Image.h"
+#include "Magnum/GL/BufferImage.h"
#endif
-#include "Implementation/maxTextureSize.h"
-#include "Implementation/State.h"
-#include "Implementation/TextureState.h"
-
namespace Magnum {
namespace Implementation {
@@ -46,12 +45,12 @@ template VectorTypeFor maxTextureSize()
}
#ifndef MAGNUM_TARGET_GLES
-template MAGNUM_EXPORT Math::Vector<1, Int> maxTextureSize<1>();
+template MAGNUM_GL_EXPORT Math::Vector<1, Int> maxTextureSize<1>();
#endif
-template MAGNUM_EXPORT Vector2i maxTextureSize<2>();
+template MAGNUM_GL_EXPORT Vector2i maxTextureSize<2>();
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
-template<> MAGNUM_EXPORT Vector3i maxTextureSize<3>() {
+template<> MAGNUM_GL_EXPORT Vector3i maxTextureSize<3>() {
#ifdef MAGNUM_TARGET_GLES2
if(!Context::current().isExtensionSupported())
return {};
@@ -103,9 +102,9 @@ template CompressedBufferImage Texture;
-template class MAGNUM_EXPORT Texture<2>;
-template class MAGNUM_EXPORT Texture<3>;
+template class MAGNUM_GL_EXPORT Texture<1>;
+template class MAGNUM_GL_EXPORT Texture<2>;
+template class MAGNUM_GL_EXPORT Texture<3>;
#endif
}
diff --git a/src/Magnum/Texture.h b/src/Magnum/GL/Texture.h
similarity index 98%
rename from src/Magnum/Texture.h
rename to src/Magnum/GL/Texture.h
index 07311e0c6..19cd18281 100644
--- a/src/Magnum/Texture.h
+++ b/src/Magnum/GL/Texture.h
@@ -1,5 +1,5 @@
-#ifndef Magnum_Texture_h
-#define Magnum_Texture_h
+#ifndef Magnum_GL_Texture_h
+#define Magnum_GL_Texture_h
/*
This file is part of Magnum.
@@ -29,9 +29,9 @@
* @brief Class @ref Magnum::Texture, typedef @ref Magnum::Texture1D, @ref Magnum::Texture2D, @ref Magnum::Texture3D
*/
-#include "Magnum/AbstractTexture.h"
#include "Magnum/Array.h"
#include "Magnum/DimensionTraits.h"
+#include "Magnum/GL/AbstractTexture.h"
#include "Magnum/Math/Vector3.h"
namespace Magnum {
@@ -53,7 +53,7 @@ namespace Implementation {
#endif
template VectorTypeFor maxTextureSize();
- template<> MAGNUM_EXPORT Vector3i maxTextureSize<3>();
+ template<> MAGNUM_GL_EXPORT Vector3i maxTextureSize<3>();
}
/**
@@ -68,7 +68,7 @@ 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
trilinear anisotropic filtering, i.e. the best you can ask for:
-@snippet Magnum.cpp Texture-usage
+@snippet MagnumGL.cpp Texture-usage
@attention Note that default configuration is to use mipmaps. Be sure to either
reduce mip level count using @ref setBaseLevel() and @ref setMaxLevel(),
@@ -585,7 +585,7 @@ template class Texture: public AbstractTexture {
* @cpp '1' @ce for zero and one, similarly as in the
* @ref Math::swizzle() function. Example usage:
*
- * @snippet Magnum.cpp Texture-setSwizzle
+ * @snippet MagnumGL.cpp Texture-setSwizzle
*
* If neither @extension{ARB,direct_state_access} (part of OpenGL 4.5)
* nor @extension{EXT,direct_state_access} desktop extension is
@@ -783,7 +783,7 @@ template class Texture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp Texture-image1
+ * @snippet MagnumGL.cpp Texture-image1
*/
Image image(Int level, Image&& image);
@@ -810,7 +810,7 @@ template class Texture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp Texture-image2
+ * @snippet MagnumGL.cpp Texture-image2
*/
BufferImage image(Int level, BufferImage&& image, BufferUsage usage);
@@ -854,7 +854,7 @@ template class Texture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp Texture-compressedImage1
+ * @snippet MagnumGL.cpp Texture-compressedImage1
*/
CompressedImage compressedImage(Int level, CompressedImage&& image);
@@ -881,7 +881,7 @@ template class Texture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp Texture-compressedImage2
+ * @snippet MagnumGL.cpp Texture-compressedImage2
*/
CompressedBufferImage compressedImage(Int level, CompressedBufferImage&& image, BufferUsage usage);
@@ -909,7 +909,7 @@ template class Texture: public AbstractTexture {
*
* Convenience alternative to the above, example usage:
*
- * @snippet Magnum.cpp Texture-subImage1
+ * @snippet MagnumGL.cpp Texture-subImage1
*/
Image subImage(Int level, const RangeTypeFor& range, Image