]> git.tdb.fi Git - libs/gl.git/commitdiff
Decorate things which constitute the public API of the library
authorMikko Rasa <tdb@tdb.fi>
Wed, 4 Jan 2023 22:36:12 +0000 (00:36 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 5 Jan 2023 09:34:21 +0000 (11:34 +0200)
142 files changed:
source/animation/animatedobject.h
source/animation/animation.h
source/animation/animationplayer.h
source/animation/armature.h
source/animation/keyframe.h
source/animation/pose.h
source/animation/transform.h
source/backends/opengl/batch_backend.h
source/backends/opengl/buffer_backend.h
source/backends/opengl/commands_backend.h
source/backends/opengl/device_backend.h
source/backends/opengl/framebuffer_backend.h
source/backends/opengl/module_backend.h
source/backends/opengl/pipelinestate_backend.h
source/backends/opengl/program_backend.h
source/backends/opengl/query_backend.h
source/backends/opengl/renderer_backend.h
source/backends/opengl/sampler_backend.h
source/backends/opengl/texture1d_backend.h
source/backends/opengl/texture2d_backend.h
source/backends/opengl/texture2darray_backend.h
source/backends/opengl/texture2dmultisample_backend.h
source/backends/opengl/texture3d_backend.h
source/backends/opengl/texture_backend.h
source/backends/opengl/texturecube_backend.h
source/backends/opengl/uniformblock_backend.h
source/backends/opengl/vertexsetup_backend.h
source/backends/opengl/windowview_backend.h
source/backends/vulkan/batch_backend.h
source/backends/vulkan/buffer_backend.h
source/backends/vulkan/commands_backend.h
source/backends/vulkan/device_backend.h
source/backends/vulkan/framebuffer_backend.h
source/backends/vulkan/memoryallocator.h
source/backends/vulkan/module_backend.h
source/backends/vulkan/pipelinestate_backend.h
source/backends/vulkan/program_backend.h
source/backends/vulkan/query_backend.h
source/backends/vulkan/renderer_backend.h
source/backends/vulkan/sampler_backend.h
source/backends/vulkan/texture1d_backend.h
source/backends/vulkan/texture2d_backend.h
source/backends/vulkan/texture2darray_backend.h
source/backends/vulkan/texture2dmultisample_backend.h
source/backends/vulkan/texture3d_backend.h
source/backends/vulkan/texture_backend.h
source/backends/vulkan/texturecube_backend.h
source/backends/vulkan/uniformblock_backend.h
source/backends/vulkan/vertexsetup_backend.h
source/backends/vulkan/windowview_backend.h
source/builders/box.h
source/builders/capsule.h
source/builders/cylinder.h
source/builders/font.h
source/builders/geometrybuilder.h
source/builders/grid.h
source/builders/meshbuilder.h
source/builders/primitivebuilder.h
source/builders/sequencebuilder.h
source/builders/sequencetemplate.h
source/builders/sphere.h
source/builders/vertexarraybuilder.h
source/core/backend.h
source/core/batch.h
source/core/blend.h
source/core/buffer.h
source/core/bufferable.h
source/core/commands.h
source/core/cullface.h
source/core/datatype.h
source/core/depthtest.h
source/core/device.h
source/core/error.h
source/core/framebuffer.h
source/core/frameformat.h
source/core/matrix.h
source/core/mesh.h
source/core/module.h
source/core/pipelinestate.h
source/core/pixelformat.h
source/core/predicate.h
source/core/primitivetype.h
source/core/program.h
source/core/query.h
source/core/sampler.h
source/core/stenciltest.h
source/core/tag.h
source/core/texture.h
source/core/texture1d.h
source/core/texture2d.h
source/core/texture2darray.h
source/core/texture2dmultisample.h
source/core/texture3d.h
source/core/texturecube.h
source/core/uniformblock.h
source/core/vertexarray.h
source/core/vertexformat.h
source/core/vertexsetup.h
source/effects/ambientocclusion.h
source/effects/bloom.h
source/effects/colorcurve.h
source/effects/effect.h
source/effects/environmentmap.h
source/effects/postprocessor.h
source/effects/shadowmap.h
source/effects/sky.h
source/glsl/compiler.h
source/glsl/features.h
source/materials/basicmaterial.h
source/materials/directionallight.h
source/materials/light.h
source/materials/lighting.h
source/materials/material.h
source/materials/pbrmaterial.h
source/materials/pointlight.h
source/materials/programdata.h
source/materials/rendermethod.h
source/materials/splatmaterial.h
source/materials/technique.h
source/materials/unlitmaterial.h
source/render/camera.h
source/render/instancearray.h
source/render/object.h
source/render/objectinstance.h
source/render/occludedscene.h
source/render/offscreenview.h
source/render/orderedscene.h
source/render/placeable.h
source/render/renderable.h
source/render/renderer.h
source/render/rendertarget.h
source/render/scene.h
source/render/sequence.h
source/render/simplescene.h
source/render/slot.h
source/render/text.h
source/render/view.h
source/render/windowview.h
source/render/zsortedscene.h
source/resources/resource.h
source/resources/resourcemanager.h
source/resources/resources.h

index df920755729e05e17da5a617a546d8460f63704c..ead6231cf0490b09bb6359477d452ac5fee5ea42 100644 (file)
@@ -6,6 +6,7 @@
 #include <msp/datafile/objectloader.h>
 #include "keyframe.h"
 #include "matrix.h"
+#include "mspgl_api.h"
 #include "objectinstance.h"
 
 namespace Msp {
@@ -14,10 +15,10 @@ namespace GL {
 /**
 An object instance that can be animated by an AnimationPlayer.
 */
-class AnimatedObject: public ObjectInstance
+class MSPGL_API AnimatedObject: public ObjectInstance
 {
 public:
-       class Loader: public DataFile::DerivedObjectLoader<AnimatedObject, ObjectInstance::Loader>
+       class MSPGL_API Loader: public DataFile::DerivedObjectLoader<AnimatedObject, ObjectInstance::Loader>
        {
        public:
                Loader(AnimatedObject &);
index 7d55bb61b7be33e01c7ed851fe08111784ad15b6..2e0536d419de22e5c1c3901cade56dbe7c4e95ad 100644 (file)
@@ -6,6 +6,7 @@
 #include <msp/interpolate/spline.h>
 #include <msp/time/timedelta.h>
 #include "keyframe.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -19,10 +20,10 @@ class Pose;
 An Animation is a sequence of KeyFrames combined with timing information.  The
 state at any point in the animation can be interpolated from the keyframes.
 */
-class Animation
+class MSPGL_API Animation
 {
 public:
-       class Loader: public DataFile::CollectionObjectLoader<Animation>
+       class MSPGL_API Loader: public DataFile::CollectionObjectLoader<Animation>
        {
        private:
                Time::TimeDelta current_time;
@@ -142,7 +143,7 @@ private:
        };
 
 public:
-       class Iterator
+       class MSPGL_API Iterator
        {
        private:
                const Animation *animation;
index 4b0beb6c236f8b728df2f9f5a0382b128f773e1c..4947a8c9e503cdca5f95e56e2b171b1e0423457d 100644 (file)
@@ -5,6 +5,7 @@
 #include "animation.h"
 #include "animationeventobserver.h"
 #include "matrix.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -15,7 +16,7 @@ class AnimatedObject;
 The bridge between Animations and AnimatedObjects.  A single AnimationPlayer
 can handle an arbitrary number of animations simultaneously.
 */
-class AnimationPlayer
+class MSPGL_API AnimationPlayer
 {
 private:
        struct PlayingAnimation
index 9dc2f505a0e62378d022fd6a525043e32c956ca3..9476812ff5175ffccd8d9f1ed1253dfc5f9daa9e 100644 (file)
@@ -4,16 +4,17 @@
 #include <list>
 #include <string>
 #include <msp/datafile/objectloader.h>
+#include "mspgl_api.h"
 #include "pose.h"
 #include "vector.h"
 
 namespace Msp {
 namespace GL {
 
-class Armature
+class MSPGL_API Armature
 {
 public:
-       class Loader: public DataFile::ObjectLoader<Armature>
+       class MSPGL_API Loader: public DataFile::ObjectLoader<Armature>
        {
        public:
                Loader(Armature &);
@@ -21,7 +22,7 @@ public:
                void link(const std::string &);
        };
 
-       class Link
+       class MSPGL_API Link
        {
        public:
                class Loader: public DataFile::ObjectLoader<Link>
index 5e70aa730c970bf11ac51231c72ad8defd695344..e5067158df5526d278b5cf66f56a4307ba9c7775 100644 (file)
@@ -4,6 +4,7 @@
 #include <msp/core/refptr.h>
 #include <msp/datafile/objectloader.h>
 #include "matrix.h"
+#include "mspgl_api.h"
 #include "transform.h"
 
 namespace Msp {
@@ -14,10 +15,10 @@ class Pose;
 /**
 Keyframes are used to encapsulate object state for animation.
 */
-class KeyFrame
+class MSPGL_API KeyFrame
 {
 public:
-       class Loader: public DataFile::CollectionObjectLoader<KeyFrame>
+       class MSPGL_API Loader: public DataFile::CollectionObjectLoader<KeyFrame>
        {
        private:
                std::string inline_base_name;
index d0c127edc9eaaf4b7d03744c93d5723988701018..b4ee9cf01be24f39f82c62289360f8295ce4d6ab 100644 (file)
@@ -4,16 +4,17 @@
 #include <map>
 #include <msp/datafile/objectloader.h>
 #include "matrix.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
 class Armature;
 
-class Pose
+class MSPGL_API Pose
 {
 public:
-       class Loader: public DataFile::CollectionObjectLoader<Pose>
+       class MSPGL_API Loader: public DataFile::CollectionObjectLoader<Pose>
        {
        public:
                Loader(Pose &, Collection &);
index 5854c4175e2e023b17ed7ad88b56f490a733ea0b..55d1e14226d5374383cc31315be46953afbea94c 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <msp/datafile/objectloader.h>
 #include "matrix.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -12,10 +13,10 @@ Stores a coordinate space transform as individual components.  Primarily
 intended for loading data from external sources.  At runtime transforms
 should generally be stored as matrices.
 */
-class Transform
+class MSPGL_API Transform
 {
 public:
-       class Loader: public DataFile::ObjectLoader<Transform>
+       class MSPGL_API Loader: public DataFile::ObjectLoader<Transform>
        {
        public:
                Loader(Transform &);
index b04b1431995ad5e1a376f9a4785748465fd82c19..183db91ced92aa1958aacd863b7058135a08e8f8 100644 (file)
@@ -2,12 +2,13 @@
 #define MSP_GL_BATCH_BACKEND_H_
 
 #include "datatype.h"
+#include "mspgl_api.h"
 #include "primitivetype.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLBatch
+class MSPGL_API OpenGLBatch
 {
        friend class OpenGLCommands;
 
index 446b1d2db2c550ac11838230285c4d1f2617c213..a419e6026d5ca260ef6915fbc00119344fecadca 100644 (file)
@@ -2,11 +2,12 @@
 #define MSP_GL_BUFFER_BACKEND_H_
 
 #include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLBuffer: public NonCopyable
+class MSPGL_API OpenGLBuffer: public NonCopyable
 {
        friend class OpenGLPipelineState;
        friend class OpenGLTexture2D;
index 94ddc56026f6cb8c6e9fb9960ec8267566d4efbc..128d0ccf7ac9788d499484588a16aaf4c9b2eb70 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef MSP_GL_COMMANDS_BACKEND_H_
 #define MSP_GL_COMMANDS_BACKEND_H_
 
+#include "mspgl_api.h"
+
 namespace Msp {
 namespace GL {
 
@@ -10,7 +12,7 @@ class Framebuffer;
 class PipelineState;
 class QueryPool;
 
-class OpenGLCommands
+class MSPGL_API OpenGLCommands
 {
 protected:
        const PipelineState *pipeline_state = 0;
index 2583d5822173af93ce0bb92882c72f5e392aa124..cb945b726460e489086fc81b80ca4a41f31262f5 100644 (file)
@@ -4,6 +4,7 @@
 #include <vector>
 #include <msp/core/noncopyable.h>
 #include <msp/graphics/glcontext.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -24,7 +25,7 @@ struct OpenGLDeviceState
        const OpenGLTexture *scratch_texture = 0;
 };
 
-class OpenGLDevice: public NonCopyable
+class MSPGL_API OpenGLDevice: public NonCopyable
 {
 protected:
        Graphics::GLContext context;
index 258db95fe9bbc0438ca01f77b95f6614a5ea444e..2e3654dae68a19e86d2eb7cde83d68184146a3e5 100644 (file)
@@ -4,11 +4,12 @@
 #include <string>
 #include <msp/core/noncopyable.h>
 #include "frameformat.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLFramebuffer: public NonCopyable
+class MSPGL_API OpenGLFramebuffer: public NonCopyable
 {
        friend class OpenGLCommands;
        friend class OpenGLPipelineState;
index 656b2025be3c870e4c9e4c4780bee07f5812c594..d0b308cad5cb31a5848f17ac24b33812acc9545c 100644 (file)
@@ -2,11 +2,12 @@
 #define MSP_GL_MODULE_BACKEND_H_
 
 #include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLSpirVModule: public NonCopyable
+class MSPGL_API OpenGLSpirVModule: public NonCopyable
 {
 protected:
        OpenGLSpirVModule() = default;
index 9198706c7344d7f23f4369f3ddc8208598dcfbd5..6da1375c248971286fdfaca63b50ce515f4db0f2 100644 (file)
@@ -3,13 +3,14 @@
 
 #include <vector>
 #include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
 class Device;
 
-class OpenGLPipelineState: public NonCopyable
+class MSPGL_API OpenGLPipelineState: public NonCopyable
 {
        friend class OpenGLCommands;
 
index 9cce0f7e187ca4390e86962059955de5e1451c4f..9f77afdfba06c066a24a32ae14bf935b1a46d481 100644 (file)
@@ -5,12 +5,13 @@
 #include <string>
 #include <vector>
 #include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
 #include "reflectdata.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLProgram: public NonCopyable
+class MSPGL_API OpenGLProgram: public NonCopyable
 {
        friend class OpenGLPipelineState;
 
index ccda73b0b9e57cebf7ab31540aa898b501d2badb..75b548cf088d2376fea1cfed054161b40ac956fd 100644 (file)
@@ -3,11 +3,12 @@
 
 #include <msp/core/noncopyable.h>
 #include <vector>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLQueryPool: public NonCopyable
+class MSPGL_API OpenGLQueryPool: public NonCopyable
 {
        friend class OpenGLCommands;
 
index 685b6464286e767c1837f47bc3e08a9a0fdcf083..33f59aacfb3b108b0d68490579c0a1fad9090ede 100644 (file)
@@ -2,12 +2,13 @@
 #define MSP_GL_RENDERER_BACKEND_H_
 
 #include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
 #include "pipelinestate.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLRenderer: public NonCopyable
+class MSPGL_API OpenGLRenderer: public NonCopyable
 {
 protected:
        PipelineState pipeline_state;
index f90fbb22e298fd4b86f37b5b2e5bf6b97b57321b..7b1bd35a1c5d31006886c259e90f010f43f7fcdd 100644 (file)
@@ -2,11 +2,12 @@
 #define MSP_GL_SAMPLER_BACKEND_H_
 
 #include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLSampler: public NonCopyable
+class MSPGL_API OpenGLSampler: public NonCopyable
 {
        friend class OpenGLPipelineState;
 
index 8c0fa8c690e38b3445f32bf99e53a333a417c4d0..754552b2a42ee2cc1bb2955add9afc4a89b43aa9 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef MSP_GL_TEXTURE1D_BACKEND_H_
 #define MSP_GL_TEXTURE1D_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "texture.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLTexture1D: public Texture
+class MSPGL_API OpenGLTexture1D: public Texture
 {
 protected:
        OpenGLTexture1D();
index 9d469f2be5950fe6149dea23081738fcf62e1828..470884d36da8b648bae2ef3121128bf296c37caf 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_GL_TEXTURE2D_BACKEND_H_
 #define MSP_GL_TEXTURE2D_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "texture.h"
 
 namespace Msp {
@@ -8,10 +9,10 @@ namespace GL {
 
 class Buffer;
 
-class OpenGLTexture2D: public Texture
+class MSPGL_API OpenGLTexture2D: public Texture
 {
 protected:
-       class AsyncTransfer: public NonCopyable
+       class MSPGL_API AsyncTransfer: public NonCopyable
        {
        protected:
                Buffer *pixel_buffer = 0;
index 68a85386dd1185bb253ccdcd7afb1b77ce4bdc8b..3b8859eff67ff4135c362ae3c4de63df1bb4a55a 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef MSP_GL_TEXTURE2DARRAY_BACKEND_H_
 #define MSP_GL_TEXTURE2DARRAY_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "texture3d.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLTexture2DArray: public Texture3D
+class MSPGL_API OpenGLTexture2DArray: public Texture3D
 {
 protected:
        OpenGLTexture2DArray();
index 7adb0bf028fe550e8de40f52f443c4ca1b1eec31..88a98fd4a6e819a8a1387258c152dbd5bb37678f 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef MSP_GL_TEXTURE2DMULTISAMPLE_BACKEND_H_
 #define MSP_GL_TEXTURE2DMULTISAMPLE_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "texture.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLTexture2DMultisample: public Texture
+class MSPGL_API OpenGLTexture2DMultisample: public Texture
 {
 protected:
        OpenGLTexture2DMultisample();
index 9e79f2496617b3c62f4193a10431e1572996228e..c6ebd8154c6aef10ac220968d91eef4d0e8e3e63 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef MSP_GL_TEXTURE3D_BACKEND_H_
 #define MSP_GL_TEXTURE3D_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "texture.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLTexture3D: public Texture
+class MSPGL_API OpenGLTexture3D: public Texture
 {
 protected:
        OpenGLTexture3D();
index 623bd813291771ec39a10c5bdfbb501a49ee44c8..2c300bc79eaee4ae38605b0fa71d25528ab9efee 100644 (file)
@@ -2,11 +2,12 @@
 #define MSP_GL_TEXTURE_BACKEND_H_
 
 #include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLTexture: public NonCopyable
+class MSPGL_API OpenGLTexture: public NonCopyable
 {
        friend class OpenGLFramebuffer;
        friend class OpenGLPipelineState;
index ed5f29cba9136c8fba21ed02393f9b70d2c47df9..7434a4ef0aecc1b68270985197cf79ab65317723 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef MSP_GL_TEXTURECUBE_BACKEND_H_
 #define MSP_GL_TEXTURECUBE_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "texture.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLTextureCube: public Texture
+class MSPGL_API OpenGLTextureCube: public Texture
 {
 protected:
        OpenGLTextureCube();
index 9607ea69a6017c08958fd2c44a82c7cdbb933b24..ba68fdec672cbeba478b016cd16ec7f39e69690f 100644 (file)
@@ -1,10 +1,12 @@
 #ifndef MSP_GL_UNIFORMBLOCK_BACKEND_H_
 #define MSP_GL_UNIFORMBLOCK_BACKEND_H_
 
+#include "mspgl_api.h"
+
 namespace Msp {
 namespace GL {
 
-class OpenGLUniformBlock
+class MSPGL_API OpenGLUniformBlock
 {
 protected:
        OpenGLUniformBlock(bool);
index e0dae1bc970e4c871ad5e1b7f2f65668cfa02965..e074d566cacf5a78be034d070109434dbdb6ca27 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_VERTEXSETUP_BACKEND_H_
 
 #include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -9,7 +10,7 @@ namespace GL {
 class VertexArray;
 class VertexFormat;
 
-class OpenGLVertexSetup: public NonCopyable
+class MSPGL_API OpenGLVertexSetup: public NonCopyable
 {
        friend class OpenGLPipelineState;
 
index da9921c36cc327df99a8b05bcbb5d0e9957fb9a3..2160a0df46e4c8cc818264c3436df83c1b2de7a3 100644 (file)
@@ -1,13 +1,14 @@
 #ifndef MSP_GL_WINDOWVIEW_BACKEND_H_
 #define MSP_GL_WINDOWVIEW_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "systemframebuffer.h"
 #include "view.h"
 
 namespace Msp {
 namespace GL {
 
-class OpenGLWindowView: public View
+class MSPGL_API OpenGLWindowView: public View
 {
 protected:
        OpenGLSystemFramebuffer sys_framebuf;
index 78fdd9d0f34b635d55449240db8c4fc3b05d1f70..4bdc64fbf73b6475690ce8c18c06b4050ab2a07a 100644 (file)
@@ -2,12 +2,13 @@
 #define MSP_GL_BATCH_BACKEND_H_
 
 #include "datatype.h"
+#include "mspgl_api.h"
 #include "primitivetype.h"
 
 namespace Msp {
 namespace GL {
 
-class VulkanBatch
+class MSPGL_API VulkanBatch
 {
        friend class VulkanCommands;
 
index 5902704f83e7460fb629f8f9f874b85ab34f72e6..55e24e69fa96ce426eb867d2ca853f07536b8b45 100644 (file)
@@ -3,13 +3,14 @@
 
 #include <msp/core/noncopyable.h>
 #include "handles.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
 class Device;
 
-class VulkanBuffer: public NonCopyable
+class MSPGL_API VulkanBuffer: public NonCopyable
 {
        friend class Synchronizer;
        friend class VulkanPipelineState;
index e17636a8a315ac1cfb18f3952e238b5cc952c531..efc1dbd3f8b308356eb59c98084433f958c2ff2b 100644 (file)
@@ -4,6 +4,7 @@
 #include <vector>
 #include "fence.h"
 #include "handles.h"
+#include "mspgl_api.h"
 #include "rect.h"
 
 namespace Msp {
@@ -18,7 +19,7 @@ class QueryPool;
 class Semaphore;
 class SwapChain;
 
-class VulkanCommands
+class MSPGL_API VulkanCommands
 {
 protected:
        struct CommandBuffers
index 1011da6bbcb184d9550905703ca531608f8768b8..e5881b2d69b4827f3ba9d9a1a10bb70170b24534 100644 (file)
@@ -8,6 +8,7 @@
 #include "destroyqueue.h"
 #include "handles.h"
 #include "memoryallocator.h"
+#include "mspgl_api.h"
 #include "pipelinecache.h"
 #include "synchronizer.h"
 #include "transferqueue.h"
@@ -19,7 +20,7 @@ struct VulkanFunctions;
 
 constexpr unsigned MAX_FRAMES_IN_FLIGHT = 3;
 
-class VulkanDevice: public NonCopyable
+class MSPGL_API VulkanDevice: public NonCopyable
 {
 protected:
        Graphics::VulkanContext context;
index 24c1d9c6d0b238b4866cb5b2617c575372eafdc7..729898a7ad8836d38c7f5f1ae5c1aa2e3803254e 100644 (file)
@@ -4,6 +4,7 @@
 #include <string>
 #include "frameformat.h"
 #include "handles.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -11,7 +12,7 @@ namespace GL {
 class Device;
 class Texture;
 
-class VulkanFramebuffer: public NonCopyable
+class MSPGL_API VulkanFramebuffer: public NonCopyable
 {
        friend class RenderPass;
        friend class VulkanCommands;
index 70cda51643137e89e5af061fccd4b7f2e02b6460..6e3413f36d2ab199dae04abf62f98d79e46c366e 100644 (file)
@@ -5,6 +5,7 @@
 #include <msp/core/noncopyable.h>
 #include <msp/graphics/vulkancontext.h>
 #include "handles.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -93,7 +94,7 @@ public:
        void *map(unsigned);
        void unmap(unsigned);
 
-       std::string get_debug() const;
+       MSPGL_API std::string get_debug() const;
 };
 
 } // namespace GL
index c472997607807223be41f3f11992ba8191ec663e..d717b53d624ff6cf3defc6862f7cecc52f063ed1 100644 (file)
@@ -2,13 +2,14 @@
 #define MSP_GL_MODULE_BACKEND_H_
 
 #include "handles.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
 class Device;
 
-class VulkanSpirVModule
+class MSPGL_API VulkanSpirVModule
 {
        friend class VulkanProgram;
 
index 2195b2f38e6bff1014ba81630f9996bb219eaf6e..f59bc76068ce9715e4a25ab6584fad3a051488bc 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <msp/core/noncopyable.h>
 #include "handles.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -10,7 +11,7 @@ namespace GL {
 class Device;
 class VulkanCommandRecorder;
 
-class VulkanPipelineState: public NonCopyable
+class MSPGL_API VulkanPipelineState: public NonCopyable
 {
        friend class DescriptorPool;
        friend class PipelineCache;
index 654b19c73f0bffc444940f71126fcb8a197ca984..78d03a1237105ed794516a47336f31fd58d624e4 100644 (file)
@@ -5,6 +5,7 @@
 #include <string>
 #include <vector>
 #include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
 #include "reflectdata.h"
 
 namespace Msp {
@@ -12,7 +13,7 @@ namespace GL {
 
 class Device;
 
-class VulkanProgram: public NonCopyable
+class MSPGL_API VulkanProgram: public NonCopyable
 {
        friend class VulkanPipelineState;
 
index 25c44dcff8a9480f0b636eac0173a7278763ed4a..f056b0184e1abdcb648ca2fccfbe6bca20ba4e7b 100644 (file)
@@ -3,11 +3,12 @@
 
 #include <msp/core/noncopyable.h>
 #include <vector>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
-class VulkanQueryPool: public NonCopyable
+class MSPGL_API VulkanQueryPool: public NonCopyable
 {
        friend class VulkanCommands;
 
index 3b0c2f0ff284fc422c27837d66c3d8259418dc37..577d29a461c365201cf3b80c615081e6eae1aaef 100644 (file)
@@ -3,12 +3,13 @@
 
 #include <msp/core/noncopyable.h>
 #include "commands.h"
+#include "mspgl_api.h"
 #include "pipelinestate.h"
 
 namespace Msp {
 namespace GL {
 
-class VulkanRenderer: public NonCopyable
+class MSPGL_API VulkanRenderer: public NonCopyable
 {
 protected:
        std::map<std::uintptr_t, PipelineState> pipeline_states;
index f96d43c8ee68d1e75e6bfbd0e924c7985e1a748a..2603d13ffe816f932c48848bf652f7c3cd3de0f9 100644 (file)
@@ -2,13 +2,14 @@
 #define MSP_GL_SAMPLER_BACKEND_H_
 
 #include "handles.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
 class Device;
 
-class VulkanSampler
+class MSPGL_API VulkanSampler
 {
        friend class VulkanPipelineState;
 
index fdc74d9dfd6b016471ec85baaf5dc6d1f63524a5..691ccdb9318e84179453b53c48c56217ee2eb7d4 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef MSP_GL_TEXTURE1D_BACKEND_H_
 #define MSP_GL_TEXTURE1D_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "texture.h"
 
 namespace Msp {
 namespace GL {
 
-class VulkanTexture1D: public Texture
+class MSPGL_API VulkanTexture1D: public Texture
 {
 protected:
        VulkanTexture1D();
index 139f8bef417bf03509425127f11668c3f0bbd8f9..ccc41c2653b35187871d8cd9c3bf5a2153c81cbf 100644 (file)
@@ -1,15 +1,16 @@
 #ifndef MSP_GL_TEXTURE2D_BACKEND_H_
 #define MSP_GL_TEXTURE2D_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "texture.h"
 
 namespace Msp {
 namespace GL {
 
-class VulkanTexture2D: public Texture
+class MSPGL_API VulkanTexture2D: public Texture
 {
 protected:
-       class AsyncTransfer: public NonCopyable
+       class MSPGL_API AsyncTransfer: public NonCopyable
        {
        protected:
                AsyncTransfer() = default;
index 39db1f5ca2638f87085dd874f25b1e76e0dedf24..bac9efffdfb5377bc4d4892a0bad51867dc46aab 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef MSP_GL_TEXTURE2DARRAY_BACKEND_H_
 #define MSP_GL_TEXTURE2DARRAY_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "texture3d.h"
 
 namespace Msp {
 namespace GL {
 
-class VulkanTexture2DArray: public Texture3D
+class MSPGL_API VulkanTexture2DArray: public Texture3D
 {
 protected:
        VulkanTexture2DArray();
index 392fb0fb03fd679af1e032eafe2123eabde943e3..b5931e19b041c0f419d35e55f480f86240c2b22d 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef MSP_GL_TEXTURE2DMULTISAMPLE_BACKEND_H_
 #define MSP_GL_TEXTURE2DMULTISAMPLE_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "texture.h"
 
 namespace Msp {
 namespace GL {
 
-class VulkanTexture2DMultisample: public Texture
+class MSPGL_API VulkanTexture2DMultisample: public Texture
 {
 protected:
        VulkanTexture2DMultisample();
index 49b7497c97181a86209c0cb2dee81e91caa1eab9..134f3d4d3592d4c5b3b52122c11fa739d341bba2 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef MSP_GL_TEXTURE3D_BACKEND_H_
 #define MSP_GL_TEXTURE3D_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "texture.h"
 
 namespace Msp {
 namespace GL {
 
-class VulkanTexture3D: public Texture
+class MSPGL_API VulkanTexture3D: public Texture
 {
 protected:
        VulkanTexture3D();
index c977e82e287f120fb13727e32c7c956617573804..ce4e540feeb31de2c02a11f2364970d166454751 100644 (file)
@@ -3,13 +3,14 @@
 
 #include <msp/core/noncopyable.h>
 #include "handles.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
 class Device;
 
-class VulkanTexture: public NonCopyable
+class MSPGL_API VulkanTexture: public NonCopyable
 {
        friend class VulkanFramebuffer;
        friend class VulkanPipelineState;
index 1146c7051f52f1a147980ac489e138895e89ae17..7fdb8189c4240c9f75e8de1eb339521a5dc39ca4 100644 (file)
@@ -1,12 +1,13 @@
 #ifndef MSP_GL_TEXTURECUBE_BACKEND_H_
 #define MSP_GL_TEXTURECUBE_BACKEND_H_
 
+#include "mspgl_api.h"
 #include "texture.h"
 
 namespace Msp {
 namespace GL {
 
-class VulkanTextureCube: public Texture
+class MSPGL_API VulkanTextureCube: public Texture
 {
 protected:
        VulkanTextureCube();
index 47e7a5fd9c93010ed08aa518cd6f2d51885b1746..ba83e82f1153476f2c90fc2e60737e6ad046791c 100644 (file)
@@ -1,10 +1,12 @@
 #ifndef MSP_GL_UNIFORMBLOCK_BACKEND_H_
 #define MSP_GL_UNIFORMBLOCK_BACKEND_H_
 
+#include "mspgl_api.h"
+
 namespace Msp {
 namespace GL {
 
-class VulkanUniformBlock
+class MSPGL_API VulkanUniformBlock
 {
 protected:
        VulkanUniformBlock(bool) { }
index 87e780628d509db070c55c4481bfc97b5a648149..d6809fba4a380b8e7fff975af4556c17fd9e0dd9 100644 (file)
@@ -5,6 +5,7 @@
 #include <vector>
 #include <msp/core/noncopyable.h>
 #include "handles.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -12,7 +13,7 @@ namespace GL {
 class VertexArray;
 class VertexFormat;
 
-class VulkanVertexSetup: public NonCopyable
+class MSPGL_API VulkanVertexSetup: public NonCopyable
 {
        friend class VulkanPipelineState;
 
index 1d42374e44ccbdc0821353efe7f75373a974af9f..f2658c2705864d10118f2cfd5f855cc13fc4ac2c 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "device.h"
 #include "framebuffer.h"
+#include "mspgl_api.h"
 #include "semaphore.h"
 #include "swapchain.h"
 #include "view.h"
@@ -10,7 +11,7 @@
 namespace Msp {
 namespace GL {
 
-class VulkanWindowView: public View
+class MSPGL_API VulkanWindowView: public View
 {
 protected:
        SwapChain *swap_chain = 0;
index 1059d21918b0e119cabaa68041da7a6d3b9cd389..dec6ffa5a901e9a88eae3174f3f30d5628bc96b5 100644 (file)
@@ -2,12 +2,13 @@
 #define MSP_GL_BOX_H_
 
 #include "geometrybuilder.h"
+#include "mspgl_api.h"
 #include "vector.h"
 
 namespace Msp {
 namespace GL {
 
-class BoxBuilder: public GeometryBuilder
+class MSPGL_API BoxBuilder: public GeometryBuilder
 {
 private:
        Vector3 origin;
index 375f4a74de4ec0095a1c9b3e4c1a8b187efe76fe..49ff3a5fff8c24964e6d70ee298d81da98387935 100644 (file)
@@ -2,11 +2,12 @@
 #define MSP_GL_CAPSULE_H_
 
 #include "geometrybuilder.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
-class CapsuleBuilder: public GeometryBuilder
+class MSPGL_API CapsuleBuilder: public GeometryBuilder
 {
 private:
        float radius;
index dee4c4f5fbda1e4cbe44eb5293af69cf0536f329..85e66bdc127cbe153820c13408e24dcc6c08b221 100644 (file)
@@ -2,11 +2,12 @@
 #define MSP_GL_CYLINDER_H_
 
 #include "geometrybuilder.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
-class CylinderBuilder: public GeometryBuilder
+class MSPGL_API CylinderBuilder: public GeometryBuilder
 {
 private:
        float radius;
index adbfc82830c9d5ae69ff7f0e0cea0c893c21978e..26af2cbb495631a25454e25dd484d9991e2a316c 100644 (file)
@@ -5,6 +5,7 @@
 #include <string>
 #include <msp/datafile/objectloader.h>
 #include <msp/stringcodec/utf8.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -15,10 +16,10 @@ class Texture2D;
 /**
 Stores a set of glyphs and creates strings out of them.
 */
-class Font
+class MSPGL_API Font
 {
 public:
-       class Loader: public DataFile::CollectionObjectLoader<Font>
+       class MSPGL_API Loader: public DataFile::CollectionObjectLoader<Font>
        {
        public:
                Loader(Font &, Collection &);
index 04b262519a8f4075310d04f0eb17cb5f031daa4f..17401fbd630a21780b85d35bc4efaddb8802fb38 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_GEOMETRYBUILDER_H_
 
 #include <msp/core/attributes.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -9,7 +10,7 @@ namespace GL {
 class Mesh;
 class PrimitiveBuilder;
 
-class GeometryBuilder
+class MSPGL_API GeometryBuilder
 {
 public:
        enum TextureFit
index a66051277f02e32e967e4338338408a2c0ea120c..a731aa0f325f7e26b938edee26dd9a626aa7501f 100644 (file)
@@ -2,12 +2,13 @@
 #define MSP_GL_GRID_H_
 
 #include "geometrybuilder.h"
+#include "mspgl_api.h"
 #include "vector.h"
 
 namespace Msp {
 namespace GL {
 
-class GridBuilder: public GeometryBuilder
+class MSPGL_API GridBuilder: public GeometryBuilder
 {
 private:
        Vector3 origin;
index 5f4a9dc83ec1cceae9410468051caa86c6a36770..e94b6effa128e9e6b38826dbcf94739828b1b3ce 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_GL_MESHBUILDER_H_
 #define MSP_GL_MESHBUILDER_H_
 
+#include "mspgl_api.h"
 #include "primitivebuilder.h"
 
 namespace Msp {
@@ -9,7 +10,7 @@ namespace GL {
 class Batch;
 class Mesh;
 
-class MeshBuilder: public PrimitiveBuilder
+class MSPGL_API MeshBuilder: public PrimitiveBuilder
 {
 private:
        Mesh &mesh;
index 0ffd170cd3e82659cef26528b0bfaf341f2d634e..1e2fda4b1cd8e90d488361d47a405262b84da5d0 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_GL_PRIMITIVEBUILDER_H_
 #define MSP_GL_PRIMITIVEBUILDER_H_
 
+#include "mspgl_api.h"
 #include "primitivetype.h"
 #include "vertexarray.h"
 #include "vertexbuilder.h"
@@ -16,7 +17,7 @@ Base class for primitive builders.  This is derived from VertexBuilder and adds
 begin() and end() functions for specifying batches of primitives instead of
 just vertices.
 */
-class PrimitiveBuilder: public VertexBuilder
+class MSPGL_API PrimitiveBuilder: public VertexBuilder
 {
 protected:
        VertexArray &array;
index 931641fee8a7f6338de6b02289199194556f9544..a34f3603a45bd2884b60f7cc4b1def9307b91f1c 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <map>
 #include <string>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -15,7 +16,7 @@ class PostProcessor;
 class Renderable;
 class View;
 
-class SequenceBuilder
+class MSPGL_API SequenceBuilder
 {
 private:
        const SequenceTemplate &tmpl;
index 5c45a9005c5c661d2edf367725a31166818f6234..9da7693c4526224ed7ae1656fd784b9310c49a31 100644 (file)
@@ -9,6 +9,7 @@
 #include "color.h"
 #include "depthtest.h"
 #include "effect.h"
+#include "mspgl_api.h"
 #include "postprocessor.h"
 #include "resources.h"
 #include "stenciltest.h"
@@ -19,7 +20,7 @@ namespace GL {
 class Lighting;
 class Renderable;
 
-class SequenceTemplate
+class MSPGL_API SequenceTemplate
 {
 private:
        template<typename T>
@@ -38,7 +39,7 @@ private:
        using TemplateRegistry = typename TemplateLoader<T>::TypeRegistry;
 
 public:
-       class Loader: public DataFile::CollectionObjectLoader<SequenceTemplate>
+       class MSPGL_API Loader: public DataFile::CollectionObjectLoader<SequenceTemplate>
        {
        private:
                static ActionMap shared_actions;
index 47b896431eaf7c6202bdd23123ba0d5b27d5c62d..f78994c64797197aacef6ecf3a600953f820b628 100644 (file)
@@ -2,11 +2,12 @@
 #define MSP_GL_SPHERE_H_
 
 #include "geometrybuilder.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
-class UvSphereBuilder: public GeometryBuilder
+class MSPGL_API UvSphereBuilder: public GeometryBuilder
 {
 private:
        float radius;
@@ -21,7 +22,7 @@ public:
 };
 
 
-class IcoSphereBuilder: public GeometryBuilder
+class MSPGL_API IcoSphereBuilder: public GeometryBuilder
 {
 private:
        float radius;
index 523359609a2153614c07e68497f8fca47e29cacb..19792980d4a90dc78de773c725f08f2b7fc7b997 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_VERTEXARRAYBUIDER_H_
 
 #include <vector>
+#include "mspgl_api.h"
 #include "vertexbuilder.h"
 #include "vertexformat.h"
 
@@ -10,7 +11,7 @@ namespace GL {
 
 class VertexArray;
 
-class VertexArrayBuilder: public VertexBuilder
+class MSPGL_API VertexArrayBuilder: public VertexBuilder
 {
 private:
        VertexArray &array;
index abdb4ccf4b27a72e6af5375f5a0ce0839816b928..777fdacf8abb017bd15a12ca6ef7bedf77af5417 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_BACKEND_H_
 
 #include <string>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -13,7 +14,7 @@ enum GraphicsApi
        VULKAN
 };
 
-struct Version
+struct MSPGL_API Version
 {
        unsigned short major = 0;
        unsigned short minor = 0;
index 2ac2c43c17f1eeb26c75626c2efd4064bf3d4880..88ed613a5a5ffb64ee823d9e2ddb2f936ef2234a 100644 (file)
@@ -21,7 +21,7 @@ index, but can also be manually overridden.
 
 Batches are normally contained in a Mesh.
 */
-class Batch: public BatchBackend, public Bufferable
+class MSPGL_API Batch: public BatchBackend, public Bufferable
 {
 public:
        class Loader: public DataFile::ObjectLoader<Batch>
index 874230c682c9ccf82e21c88a644f1dc61aa6034d..e5ee10e2dba998455766ea34d4b9bb2d3d1d8b67 100644 (file)
@@ -4,6 +4,7 @@
 #include <msp/datafile/objectloader.h>
 #include <msp/strings/lexicalcast.h>
 #include "color.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -48,9 +49,9 @@ enum ColorWriteMask: std::uint8_t
 /**
 Blends incoming fragment color values with those already in the framebuffer.
 */
-struct Blend
+struct MSPGL_API Blend
 {
-       class Loader: public DataFile::ObjectLoader<Blend>
+       class MSPGL_API Loader: public DataFile::ObjectLoader<Blend>
        {
        public:
                Loader(Blend &);
@@ -88,14 +89,14 @@ inline bool Blend::operator==(const Blend &other) const
 inline ColorWriteMask operator|(ColorWriteMask m1, ColorWriteMask m2)
 { return static_cast<ColorWriteMask>(static_cast<int>(m1)|static_cast<int>(m2)); }
 
-void operator>>(const LexicalConverter &, BlendEquation &);
-void operator<<(LexicalConverter &, BlendEquation);
+MSPGL_API void operator>>(const LexicalConverter &, BlendEquation &);
+MSPGL_API void operator<<(LexicalConverter &, BlendEquation);
 
-void operator>>(const LexicalConverter &, BlendFactor &);
-void operator<<(LexicalConverter &, BlendFactor);
+MSPGL_API void operator>>(const LexicalConverter &, BlendFactor &);
+MSPGL_API void operator<<(LexicalConverter &, BlendFactor);
 
-void operator>>(const LexicalConverter &, ColorWriteMask &);
-void operator<<(LexicalConverter &, ColorWriteMask);
+MSPGL_API void operator>>(const LexicalConverter &, ColorWriteMask &);
+MSPGL_API void operator<<(LexicalConverter &, ColorWriteMask);
 
 } // namespace GL
 } // namespace Msp
index 9b1293615832a615318cf0212400c08b3af10961..37e042ec505f9e703d00c9e6e03f05e440ebbf3f 100644 (file)
@@ -8,7 +8,7 @@
 namespace Msp {
 namespace GL {
 
-class buffer_too_small: public std::logic_error
+class MSPGL_API buffer_too_small: public std::logic_error
 {
 public:
        buffer_too_small(const std::string &w): std::logic_error(w) { }
@@ -35,7 +35,7 @@ the buffer is updated only rarely, static is recommended.
 Applications normally don't need to deal with Buffers directly.  They're
 managed by other classes such as Mesh and ProgramData.
 */
-class Buffer: public BufferBackend
+class MSPGL_API Buffer: public BufferBackend
 {
        friend BufferBackend;
 
index 29acafe0f346c3e914bfe76d7ca4134e0c7822f6..6c9832a99f6b49796efb9c0ee032557fdd07096a 100644 (file)
@@ -4,6 +4,7 @@
 #include <cstddef>
 #include <msp/core/noncopyable.h>
 #include "buffer.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -14,7 +15,7 @@ may be put in the same buffer.
 
 Derived classes should call mark_dirty() when the stored data has changed.
 */
-class Bufferable: public NonCopyable
+class MSPGL_API Bufferable: public NonCopyable
 {
 public:
        /**
@@ -22,7 +23,7 @@ public:
        calls are done in the constructor and desctructor, so upload_data may be
        called from a different thread.
        */
-       class AsyncUpdater
+       class MSPGL_API AsyncUpdater
        {
        private:
                const Bufferable &bufferable;
index 793b258901b0b706482cc3cf72a5ed2c1caa0448..3cb3b614c3150d4b5e8f511d378b5d4ac2b5ae19 100644 (file)
@@ -11,7 +11,7 @@ Interface for low-level graphics commands.
 
 Applications normally use the higher-level Renderer class rather than this.
 */
-class Commands: public CommandsBackend
+class MSPGL_API Commands: public CommandsBackend
 {
 public:
        using CommandsBackend::begin_frame;
index fd90ef20eedc8e5e3afba7edbe780884061283c8..30578d8a1c26b2c8b41c2e04183c764ee468f636 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_CULLFACE_H_
 
 #include <msp/strings/lexicalcast.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -20,8 +21,8 @@ enum CullMode
        CULL_BACK
 };
 
-void operator>>(const LexicalConverter &, FaceWinding &);
-void operator>>(const LexicalConverter &, CullMode &);
+MSPGL_API void operator>>(const LexicalConverter &, FaceWinding &);
+MSPGL_API void operator>>(const LexicalConverter &, CullMode &);
 
 } // namespace GL
 } // namespace Msp
index 29789907cdb78ca9863c328251aa826419b72442..08ae7ebbefa680fad591290523d40c9286af7758 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <msp/linal/matrix.h>
 #include <msp/linal/vector.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -138,7 +139,7 @@ struct TypeTraits<LinAl::Matrix<T, N, M>>
        static const DataType type = static_cast<DataType>((TypeTraits<T>::type&0xF00) | ((TypeTraits<T>::type&0xFF)*N*M) | ((N-1)<<12) | ((M-1)<<14));
 };
 
-void require_type(DataType);
+MSPGL_API void require_type(DataType);
 
 } // namespace GL
 } // namespace Msp
index 76602269a137848fc7a3b5cc6f84199c28d6358e..977eb8f0a88b27b8211c5f21f5512b6d7055a191 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_DEPTHTEST_H_
 
 #include <msp/datafile/objectloader.h>
+#include "mspgl_api.h"
 #include "predicate.h"
 
 namespace Msp {
@@ -11,9 +12,9 @@ namespace GL {
 Tests incoming fragment depth values against the depth buffer.  If the test
 fails, the fragment is discarded.
 */
-struct DepthTest
+struct MSPGL_API DepthTest
 {
-       class Loader: public DataFile::ObjectLoader<DepthTest>
+       class MSPGL_API Loader: public DataFile::ObjectLoader<DepthTest>
        {
        public:
                Loader(DepthTest &);
index 8c7e92a99f0144e6d4e0f8052314239d90913191..b010baaaac93dcf4ff36384e1fbcf3fe702dfd2a 100644 (file)
@@ -39,7 +39,7 @@ struct DeviceInfo
 /**
 Represents a graphics device.  An instance must be created to use the library.
 */
-class Device: public DeviceBackend
+class MSPGL_API Device: public DeviceBackend
 {
        friend DeviceBackend;
 
index 8af3ec6b4e3fb13394c943ecbc89280e3dfe9332..230a2617b1032cb9ebd1fb1d728082e1c97d6a7f 100644 (file)
@@ -2,46 +2,47 @@
 #define MSP_GL_ERROR_H_
 
 #include <stdexcept>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
 
-class unsupported_extension: public std::runtime_error
+class MSPGL_API unsupported_extension: public std::runtime_error
 {
 public:
        unsupported_extension(const std::string &w): std::runtime_error(w) { }
        virtual ~unsupported_extension() throw() { }
 };
 
-class invalid_operation: public std::logic_error
+class MSPGL_API invalid_operation: public std::logic_error
 {
 public:
        invalid_operation(const std::string &w): std::logic_error(w) { }
        virtual ~invalid_operation() throw() { }
 };
 
-class stack_underflow: public std::logic_error
+class MSPGL_API stack_underflow: public std::logic_error
 {
 public:
        stack_underflow(const std::string &w): std::logic_error(w) { }
        virtual ~stack_underflow() throw() { }
 };
 
-class incompatible_data: public std::logic_error
+class MSPGL_API incompatible_data: public std::logic_error
 {
 public:
        incompatible_data(const std::string &w): std::logic_error(w) { }
        virtual ~incompatible_data() throw() { }
 };
 
-class compile_error: public std::runtime_error
+class MSPGL_API compile_error: public std::runtime_error
 {
 public:
        compile_error(const std::string &w): std::runtime_error(w) { }
        virtual ~compile_error() throw() { }
 };
 
-class incomplete_uniform_block: public std::runtime_error
+class MSPGL_API incomplete_uniform_block: public std::runtime_error
 {
 public:
        incomplete_uniform_block(const std::string &w): std::runtime_error(w) { }
index 4932f29a31b687dff3fe8cd9abe52818eeef7b00..1222b304ea811221388681f64e2faaefdf29fcc5 100644 (file)
@@ -16,7 +16,7 @@ class Texture2DMultisample;
 class Texture3D;
 class WindowView;
 
-class framebuffer_incomplete: public std::runtime_error
+class MSPGL_API framebuffer_incomplete: public std::runtime_error
 {
 public:
        framebuffer_incomplete(const std::string &);
@@ -37,7 +37,7 @@ pixel in the corresponding resolve attachments.
 RenderTarget provides a higher-level interface which manages the textures as
 well as the framebuffer itself.
 */
-class Framebuffer: public FramebufferBackend
+class MSPGL_API Framebuffer: public FramebufferBackend
 {
        friend FramebufferBackend;
 
index 669261ff6f49582b5e663d2d8fee756e3c329408..53f1e725fff96274c111c7de8585991692a5904f 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_FRAMEFORMAT_H_
 
 #include <cstdint>
+#include "mspgl_api.h"
 #include "pixelformat.h"
 
 namespace Msp {
@@ -34,7 +35,7 @@ enum FrameAttachment: std::uint16_t
 Describes the complete format of a framebuffer.  It can hold multiple
 attachments (currently up to seven) as well as a sample count.
 */
-class FrameFormat
+class MSPGL_API FrameFormat
 {
 public:
        static constexpr unsigned MAX_ATTACHMENTS = 7;
@@ -65,12 +66,12 @@ public:
 inline FrameFormat operator,(FrameAttachment fa1, FrameAttachment fa2)
 { return (FrameFormat(fa1), fa2); }
 
-FrameAttachment make_typed_attachment(FrameAttachment, PixelFormat);
+MSPGL_API FrameAttachment make_typed_attachment(FrameAttachment, PixelFormat);
 
 inline FrameAttachment operator,(FrameAttachment fa, PixelFormat pf)
 { return make_typed_attachment(fa, pf); }
 
-FrameAttachment make_indexed_attachment(FrameAttachment, unsigned);
+MSPGL_API FrameAttachment make_indexed_attachment(FrameAttachment, unsigned);
 
 inline FrameAttachment operator,(FrameAttachment fa, unsigned i)
 { return make_indexed_attachment(fa, i); }
@@ -78,7 +79,7 @@ inline FrameAttachment operator,(FrameAttachment fa, unsigned i)
 inline unsigned get_attach_point(FrameAttachment fa)
 { return fa>>10; }
 
-PixelFormat get_attachment_pixelformat(FrameAttachment);
+MSPGL_API PixelFormat get_attachment_pixelformat(FrameAttachment);
 
 } // namespace GL
 } // namespace Msp
index 4a51ddce65da8af12b2c1efd04e9ed10d08027d4..5995f5969933f2201a7e8f984b3cb1f97f4d289a 100644 (file)
@@ -3,12 +3,13 @@
 
 #include <msp/geometry/angle.h>
 #include <msp/linal/matrix.h>
+#include "mspgl_api.h"
 #include "vector.h"
 
 namespace Msp {
 namespace GL {
 
-class Matrix: public LinAl::Matrix<float, 4, 4>
+class MSPGL_API Matrix: public LinAl::Matrix<float, 4, 4>
 {
 private:
        typedef LinAl::Matrix<float, 4, 4> Base;
index ba2aebc76c1fd35254f66429f5035e4370d587b5..717f7f935fe9b1123c52498ffb33f1116047499c 100644 (file)
@@ -6,6 +6,7 @@
 #include <msp/datafile/objectloader.h>
 #include "batch.h"
 #include "cullface.h"
+#include "mspgl_api.h"
 #include "resource.h"
 #include "vertexarray.h"
 #include "vertexsetup.h"
@@ -24,13 +25,13 @@ Meshes can be created at runtime using the MeshBuilder class.
 The Object class provides a higher-level interface which associates a Mesh with
 a Technique and is usually the appropriate way to of rendering geometry.
 */
-class Mesh: public Resource
+class MSPGL_API Mesh: public Resource
 {
        friend class MeshBuilder;
        class AsyncLoader;
 
 public:
-       class Loader: public DataFile::ObjectLoader<Mesh>
+       class MSPGL_API Loader: public DataFile::ObjectLoader<Mesh>
        {
                friend class AsyncLoader;
 
index 4d1511121e4191165bd3c9c13b7fb5f866c3e54b..994aaca462a490509287ce440d9a0a5651236a5d 100644 (file)
@@ -13,7 +13,7 @@
 namespace Msp {
 namespace GL {
 
-class invalid_module: public std::runtime_error
+class MSPGL_API invalid_module: public std::runtime_error
 {
 public:
        invalid_module(const std::string &w): runtime_error(w) { }
@@ -30,7 +30,7 @@ Modules can be loaded from files.
 
 Applications normally use the Program class to access shaders.
 */
-class Module
+class MSPGL_API Module
 {
 public:
        enum Format
@@ -69,7 +69,7 @@ public:
 /**
 A shader module in GLSL source code format.
 */
-class GlslModule: public Module
+class MSPGL_API GlslModule: public Module
 {
 private:
        std::string prepared_source;
@@ -95,7 +95,7 @@ compiled to SPIR-V.  Pre-compiled SPIR-V modules can also be loaded.
 Afterwards reflection data is available, providing information about variables
 forming the module's interface.
 */
-class SpirVModule: public Module, public SpirVModuleBackend
+class MSPGL_API SpirVModule: public Module, public SpirVModuleBackend
 {
        friend SpirVModuleBackend;
 
index 16fd5bc8e0fb3326331088bdf39429f44269d19a..9284f5d4e5ac621b7c4824f975780d0a8817af12 100644 (file)
@@ -27,7 +27,7 @@ Stores state for the entire GPU pipeline.
 
 Applications normally use the higher-level Renderer class rather than this.
 */
-class PipelineState: public PipelineStateBackend
+class MSPGL_API PipelineState: public PipelineStateBackend
 {
        friend PipelineStateBackend;
 
index 13bc03a8c059325d7272120f5a486b58e7e5d01e..c325309dbdb03daff1cd4de2604f5d9f8b5f04a3 100644 (file)
@@ -4,6 +4,7 @@
 #include <msp/graphics/image.h>
 #include <msp/strings/lexicalcast.h>
 #include "datatype.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -95,17 +96,17 @@ enum PixelFormat
        STENCIL_INDEX8 = 0x0100|STENCIL_INDEX
 };
 
-void operator>>(const LexicalConverter &, PixelComponents &);
-void operator>>(const LexicalConverter &, PixelFormat &);
+MSPGL_API void operator>>(const LexicalConverter &, PixelComponents &);
+MSPGL_API void operator>>(const LexicalConverter &, PixelFormat &);
 
-PixelComponents components_from_graphics(Graphics::PixelFormat);
-PixelFormat pixelformat_from_image(const Graphics::Image &, bool = false);
+MSPGL_API PixelComponents components_from_graphics(Graphics::PixelFormat);
+MSPGL_API PixelFormat pixelformat_from_image(const Graphics::Image &, bool = false);
 
-ComponentSwizzle get_required_swizzle(PixelComponents);
-PixelComponents swizzle_components(PixelComponents, ComponentSwizzle);
-PixelComponents unswizzle_components(PixelComponents, ComponentSwizzle);
+MSPGL_API ComponentSwizzle get_required_swizzle(PixelComponents);
+MSPGL_API PixelComponents swizzle_components(PixelComponents, ComponentSwizzle);
+MSPGL_API PixelComponents unswizzle_components(PixelComponents, ComponentSwizzle);
 
-PixelFormat make_pixelformat(PixelComponents, DataType, bool = false);
+MSPGL_API PixelFormat make_pixelformat(PixelComponents, DataType, bool = false);
 inline PixelComponents get_components(PixelFormat f) { return static_cast<PixelComponents>(f&0xFF); }
 inline unsigned get_component_count(PixelComponents c) { return c&7; }
 inline unsigned get_component_count(PixelFormat f) { return get_component_count(get_components(f)); }
@@ -114,7 +115,7 @@ inline unsigned get_component_size(PixelFormat f) { return get_type_size(get_com
 inline bool is_srgb(PixelFormat f) { return f&0x8000; }
 inline unsigned get_pixel_size(PixelFormat f) { return get_component_count(f)*get_type_size(get_component_type(f)); }
 
-void require_pixelformat(PixelFormat);
+MSPGL_API void require_pixelformat(PixelFormat);
 
 } // namespace GL
 } // namespace Msp
index 38053d03f53a40541b3c9570d2b4297318ef10ba..5668acc8281f3f85032280f3a930bb18d393dd6d 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_PREDICATE_H_
 
 #include <msp/strings/lexicalcast.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -18,8 +19,8 @@ enum Predicate: std::uint8_t
        NOTEQUAL
 };
 
-void operator>>(const LexicalConverter &, Predicate &);
-void operator<<(LexicalConverter &, Predicate);
+MSPGL_API void operator>>(const LexicalConverter &, Predicate &);
+MSPGL_API void operator<<(LexicalConverter &, Predicate);
 
 } // namespace GL
 } // namespace Msp
index ae9be607e006d4fc742bff379ce3716239ab0e22..e947026bf5f6bed1f147237cfb4d5d42902661b1 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_PRIMITIVETYPE_H_
 
 #include <msp/strings/lexicalcast.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -17,7 +18,7 @@ enum PrimitiveType
        PATCHES
 };
 
-void operator>>(const LexicalConverter &, PrimitiveType &);
+MSPGL_API void operator>>(const LexicalConverter &, PrimitiveType &);
 
 } // namespace GL
 } // namespace Msp
index 3e206a70e3c06c9fffe58fe4fd20f745f07be769..7495ce5ccc1bc72765be25020a0f5d203840402d 100644 (file)
@@ -18,12 +18,12 @@ A shader program consisting of one or more stages.
 Programs are created from Modules.  Specialization values can be applied to
 customize behaviour of the module.
 */
-class Program: public ProgramBackend
+class MSPGL_API Program: public ProgramBackend
 {
        friend ProgramBackend;
 
 public:
-       class Loader: public DataFile::CollectionObjectLoader<Program>
+       class MSPGL_API Loader: public DataFile::CollectionObjectLoader<Program>
        {
        public:
                Loader(Program &, Collection &);
index 8f9b17e8e398176032a0691d9566a5f94d802e51..0485761b338f8e7ee2491a988f46ebe4e23aa59f 100644 (file)
@@ -19,12 +19,12 @@ enum QueryType
 A collection of query objects, which can be used to gather feedback from the
 GPU.  Semantics of the queries depend on the query type.
 */
-class QueryPool: public QueryPoolBackend
+class MSPGL_API QueryPool: public QueryPoolBackend
 {
        friend QueryPoolBackend;
 
 public:
-       class Activate
+       class MSPGL_API Activate
        {
        private:
                Renderer &renderer;
index c9f8ec963bd462ea3bf978a3990b0ee481d55986..4d961f8c52b6c98b2d1a1a5ccbffee174068b336 100644 (file)
@@ -55,12 +55,12 @@ Texture coordinates are first transformed according to the wrap mode for each
 axis.  One or more texel values are then read and combined according to the
 filtering mode.
 */
-class Sampler: public SamplerBackend
+class MSPGL_API Sampler: public SamplerBackend
 {
        friend SamplerBackend;
 
 public:
-       class Loader: public DataFile::ObjectLoader<Sampler>
+       class MSPGL_API Loader: public DataFile::ObjectLoader<Sampler>
        {
        public:
                Loader(Sampler &);
@@ -158,10 +158,10 @@ public:
 };
 
 
-bool is_mipmapped(TextureFilter);
+MSPGL_API bool is_mipmapped(TextureFilter);
 
-void operator>>(const LexicalConverter &, TextureFilter &);
-void operator>>(const LexicalConverter &, TextureWrap &);
+MSPGL_API void operator>>(const LexicalConverter &, TextureFilter &);
+MSPGL_API void operator>>(const LexicalConverter &, TextureWrap &);
 
 } // namespace GL
 } // namespace Msp
index 2a4338f2012afef716c7f2b91494e32d7abeb7cd..f455f0248df12c6ba8d1d3c0d9542afc7b2b8c5f 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <msp/datafile/objectloader.h>
 #include <msp/strings/lexicalcast.h>
+#include "mspgl_api.h"
 #include "predicate.h"
 
 namespace Msp {
@@ -25,9 +26,9 @@ Tests values in the stencil buffer against a reference.  If the test fails, the
 incoming fragment is discarded.  The stencil buffer may be modified according
 to results of the stencil test and the depth test.
 */
-struct StencilTest
+struct MSPGL_API StencilTest
 {
-       class Loader: public DataFile::ObjectLoader<StencilTest>
+       class MSPGL_API Loader: public DataFile::ObjectLoader<StencilTest>
        {
        public:
                Loader(StencilTest &);
@@ -54,8 +55,8 @@ inline bool StencilTest::operator==(const StencilTest &other) const
                depth_fail_op==other.depth_fail_op && depth_pass_op==other.depth_pass_op && reference==other.reference;
 }
 
-void operator>>(const LexicalConverter &, StencilOp &);
-void operator<<(LexicalConverter &, StencilOp);
+MSPGL_API void operator>>(const LexicalConverter &, StencilOp &);
+MSPGL_API void operator<<(LexicalConverter &, StencilOp);
 
 } // namespace GL
 } // namespace Msp
index edc33c631ba0c5df750809302b6a170a82545acb..d0b5dc56b1a74b46b25d2963c703afcce1594240 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <string>
 #include <msp/strings/lexicalcast.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -11,7 +12,7 @@ namespace GL {
 Provides transparent string-to-hash conversion for faster comparison.  An empty
 string is guaranteed to have an id of 0.
 */
-struct Tag
+struct MSPGL_API Tag
 {
        unsigned id = 0;
 
index 96b17b8910752e0f0f46f7466b2acf7d014e2746..6a9f62552e6f12bd607aca5cca5ce36469b309a9 100644 (file)
@@ -27,12 +27,12 @@ read from a texture in a shader, it must be paired with a Sampler to determine
 how the texels are accessed.  To draw into a texture, it must be attached to a
 Framebuffer.
 */
-class Texture: public TextureBackend, public Resource
+class MSPGL_API Texture: public TextureBackend, public Resource
 {
        friend TextureBackend;
 
 protected:
-       class Loader: public DataFile::CollectionObjectLoader<Texture>
+       class MSPGL_API Loader: public DataFile::CollectionObjectLoader<Texture>
        {
        protected:
                unsigned levels;
index abe6c8879e5dbd07469bc1319e2fc2e6ac91230a..2efa95c3c51d21086482af9188920cf8d4648dbb 100644 (file)
@@ -10,12 +10,12 @@ namespace GL {
 /**
 One-dimensional texture, consisting of a single row of texels.
 */
-class Texture1D: public Texture1DBackend
+class MSPGL_API Texture1D: public Texture1DBackend
 {
        friend Texture1DBackend;
 
 public:
-       class Loader: public DataFile::DerivedObjectLoader<Texture1D, Texture::Loader>
+       class MSPGL_API Loader: public DataFile::DerivedObjectLoader<Texture1D, Texture::Loader>
        {
        public:
                Loader(Texture1D &);
index b13b8b3ca3bd8c274c04056d00999bbd26707b4e..12803df2d7ecc0ae1a6704e2453afaa1b9e5143c 100644 (file)
@@ -11,12 +11,12 @@ namespace GL {
 /**
 Two-dimensional texture, consisting of a rectangular array of texels.
 */
-class Texture2D: public Texture2DBackend
+class MSPGL_API Texture2D: public Texture2DBackend
 {
        friend Texture2DBackend;
 
 public:
-       class Loader: public Msp::DataFile::DerivedObjectLoader<Texture2D, Texture::Loader>
+       class MSPGL_API Loader: public Msp::DataFile::DerivedObjectLoader<Texture2D, Texture::Loader>
        {
        public:
                Loader(Texture2D &);
@@ -31,7 +31,7 @@ public:
        /**
        An RAII handle for asynchronously writing texel data into a texture.
        */
-       class AsyncTransfer: public Texture2DBackend::AsyncTransfer
+       class MSPGL_API AsyncTransfer: public Texture2DBackend::AsyncTransfer
        {
                friend Texture2DBackend;
                friend class Texture2D;
index 98cb1bdc13917871abcd21b2742ab0e367e57b46..7c315c1dbd0670365859206dcc99a0128bec0edc 100644 (file)
@@ -12,10 +12,10 @@ mipmapping and filtering is not applied on the third dimension.  When sampling
 the texture, the third coordinate is not normalized and is rounded to the
 nearest integer to select the layer.
 */
-class Texture2DArray: public Texture2DArrayBackend
+class MSPGL_API Texture2DArray: public Texture2DArrayBackend
 {
 public:
-       class Loader: public Msp::DataFile::DerivedObjectLoader<Texture2DArray, Texture3D::Loader>
+       class MSPGL_API Loader: public Msp::DataFile::DerivedObjectLoader<Texture2DArray, Texture3D::Loader>
        {
        public:
                Loader(Texture2DArray &);
index 8e234835e182fee9f6845b3ed4783a5ec7f00cde..5c515111c4129365caaefb12eb9f659fac88e6d0 100644 (file)
@@ -15,7 +15,7 @@ use is as Framebuffer attachments.
 
 Multisample textures can't have mipmaps.
 */
-class Texture2DMultisample: public Texture2DMultisampleBackend
+class MSPGL_API Texture2DMultisample: public Texture2DMultisampleBackend
 {
        friend Texture2DMultisampleBackend;
 
index e7e3a79e951909f081349e32a53661b5f844cb1a..be1a0574810ade4827fd62472063294bc25eb060 100644 (file)
@@ -11,12 +11,12 @@ namespace GL {
 /**
 Three-dimensional texture, consisting of a cuboid-shaped array of texels.
 */
-class Texture3D: public Texture3DBackend
+class MSPGL_API Texture3D: public Texture3DBackend
 {
        friend Texture3DBackend;
 
 public:
-       class Loader: public Msp::DataFile::DerivedObjectLoader<Texture3D, Texture::Loader>
+       class MSPGL_API Loader: public Msp::DataFile::DerivedObjectLoader<Texture3D, Texture::Loader>
        {
        public:
                Loader(Texture3D &);
index 127251d6497735b50267672807e8f4459b608988..a3bdf1387597e7c3496bf051795e133539b494d5 100644 (file)
@@ -27,12 +27,12 @@ selecting the face and the remaining two used to sample from the face image.
 The images are oriented so that the cross product of the s and t axes will
 point into the cube.
 */
-class TextureCube: public TextureCubeBackend
+class MSPGL_API TextureCube: public TextureCubeBackend
 {
        friend TextureCubeBackend;
 
 public:
-       class Loader: public Msp::DataFile::DerivedObjectLoader<TextureCube, Texture::Loader>
+       class MSPGL_API Loader: public Msp::DataFile::DerivedObjectLoader<TextureCube, Texture::Loader>
        {
        public:
                Loader(TextureCube &);
@@ -97,7 +97,7 @@ public:
        Vector3 get_texel_direction(TextureCubeFace, unsigned, unsigned);
 };
 
-void operator>>(const LexicalConverter &, TextureCubeFace &);
+MSPGL_API void operator>>(const LexicalConverter &, TextureCubeFace &);
 
 } // namespace GL
 } // namespace Msp
index 1144158d2ee3ae760bb994be535b8657c9650faa..b543049ec2d92e2c2f7c8ab40f156710b7bf6d7e 100644 (file)
@@ -21,7 +21,7 @@ Applications normally don't need to deal with UniformBlocks directly.  They're
 managed by the ProgramData class, which provides a higher-level interface for
 setting uniform values.
 */
-class UniformBlock: public UniformBlockBackend, public Bufferable
+class MSPGL_API UniformBlock: public UniformBlockBackend, public Bufferable
 {
 private:
        std::vector<char> data;
index 575a716e86f42a125a81b976d8965085b61a936f..c146f9b7f66ee1bf59374c47299e98e1ab64e1c3 100644 (file)
@@ -4,6 +4,7 @@
 #include <vector>
 #include <msp/datafile/loader.h>
 #include "bufferable.h"
+#include "mspgl_api.h"
 #include "vertexarraybuilder.h"
 #include "vertexformat.h"
 
@@ -23,10 +24,10 @@ VertexArrayBuilder provides a convenient way of filling in vertex data.
 Applications normally don't need to deal with VertexArrays directly.  They're
 managed by the Mesh and InstanceArray classes.
 */
-class VertexArray: public Bufferable
+class MSPGL_API VertexArray: public Bufferable
 {
 public:
-       class Loader: public DataFile::Loader, public VertexArrayBuilder
+       class MSPGL_API Loader: public DataFile::Loader, public VertexArrayBuilder
        {
        public:
                Loader(VertexArray &);
index e8ba702db1746c4c4b0ec5357f0f13fe6bf4fc77..ac448c944df2a576977f8e428410a71a1b7e72bb 100644 (file)
@@ -4,6 +4,7 @@
 #include <cstdint>
 #include <msp/strings/lexicalcast.h>
 #include "datatype.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -78,7 +79,7 @@ enum VertexAttribute: std::uint16_t
 /**
 Describes the attributes of a vertex.  Up to 15 attributes are allowed.
 */
-class VertexFormat
+class MSPGL_API VertexFormat
 {
 public:
        static constexpr unsigned MAX_ATTRIBUTES = 15;
@@ -114,12 +115,12 @@ public:
 inline VertexFormat operator,(VertexAttribute a1, VertexAttribute a2)
 { return (VertexFormat(a1), a2); }
 
-VertexAttribute make_typed_attribute(VertexAttribute, DataType);
+MSPGL_API VertexAttribute make_typed_attribute(VertexAttribute, DataType);
 
 inline VertexAttribute operator,(VertexAttribute a, DataType t)
 { return make_typed_attribute(a, t); }
 
-VertexAttribute make_indexed_attribute(VertexAttribute, unsigned);
+MSPGL_API VertexAttribute make_indexed_attribute(VertexAttribute, unsigned);
 
 inline VertexAttribute operator,(VertexAttribute a, unsigned i)
 { return make_indexed_attribute(a, i); }
@@ -142,7 +143,7 @@ inline bool is_integer_attribute(VertexAttribute a)
 inline bool is_padding(VertexAttribute a)
 { return get_attribute_semantic(a)==get_attribute_semantic(PADDING1); }
 
-void operator>>(const LexicalConverter &, VertexAttribute &);
+MSPGL_API void operator>>(const LexicalConverter &, VertexAttribute &);
 
 } // namespace GL
 } // namespace Msp
index 1cdedc79e7bf2c4186f78c0b59304d800a58564e..2ea5dfdfce881c4caa728d26944925707e0c0f1b 100644 (file)
@@ -18,7 +18,7 @@ description of vertex input state.
 Applications normally don't need to deal with VertexSetups directly.  They're
 managed by the Mesh and InstanceArray classes.
 */
-class VertexSetup: public VertexSetupBackend
+class MSPGL_API VertexSetup: public VertexSetupBackend
 {
        friend VertexSetupBackend;
 
index d055c6851e1aa362c4aaab1ea2fb8a3c91ef5662..255f2d82102fd37e852b6ec1479d4e6a2ad7f69e 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_GL_AMBIENTOCCLUSION_H_
 #define MSP_GL_AMBIENTOCCLUSION_H_
 
+#include "mspgl_api.h"
 #include "postprocessor.h"
 #include "programdata.h"
 #include "rendertarget.h"
@@ -15,12 +16,12 @@ Darkens recessed areas of the scene to simulate the occlusion of ambient light.
 
 http://en.wikipedia.org/wiki/Screen_Space_Ambient_Occlusion
 */
-class AmbientOcclusion: public PostProcessor
+class MSPGL_API AmbientOcclusion: public PostProcessor
 {
 public:
-       struct Template: PostProcessor::Template
+       struct MSPGL_API Template: PostProcessor::Template
        {
-               class Loader: public DataFile::DerivedObjectLoader<Template, PostProcessor::Template::Loader>
+               class MSPGL_API Loader: public DataFile::DerivedObjectLoader<Template, PostProcessor::Template::Loader>
                {
                public:
                        Loader(Template &);
index 30e98f7ee75f95a52e8f3e0ef7764daf380f3876..ef5a8600aa7612e8f17d4840face9ba3684ed8cf 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_GL_BLOOM_H_
 #define MSP_GL_BLOOM_H_
 
+#include "mspgl_api.h"
 #include "postprocessor.h"
 #include "programdata.h"
 #include "rendertarget.h"
@@ -17,12 +18,12 @@ optical imperfections in lenses.
 The input image is blurred with a gaussian kernel to simulate the Airy disc
 produced by a lens, then the blurred image is blended with the original.
 */
-class Bloom: public PostProcessor
+class MSPGL_API Bloom: public PostProcessor
 {
 public:
-       struct Template: public PostProcessor::Template
+       struct MSPGL_API Template: public PostProcessor::Template
        {
-               class Loader: public DataFile::DerivedObjectLoader<Template, PostProcessor::Template::Loader>
+               class MSPGL_API Loader: public DataFile::DerivedObjectLoader<Template, PostProcessor::Template::Loader>
                {
                public:
                        Loader(Template &);
index 99263407d965bccaea891025a8ef7df035f67dea..501eae10582cf592f1208754b9048e4cfc9de64f 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_GL_COLORCURVE_H_
 #define MSP_GL_COLORCURVE_H_
 
+#include "mspgl_api.h"
 #include "postprocessor.h"
 #include "programdata.h"
 #include "texture1d.h"
@@ -22,12 +23,12 @@ Gamma or sRGB correction can also be applied to the output.  It can be used to
 improve color reproduction by performing lighting calculations in linear color
 space and converting to sRGB for display.
 */
-class ColorCurve: public PostProcessor
+class MSPGL_API ColorCurve: public PostProcessor
 {
 public:
-       struct Template: public PostProcessor::Template
+       struct MSPGL_API Template: public PostProcessor::Template
        {
-               class Loader: public DataFile::DerivedObjectLoader<Template, PostProcessor::Template::Loader>
+               class MSPGL_API Loader: public DataFile::DerivedObjectLoader<Template, PostProcessor::Template::Loader>
                {
                public:
                        Loader(Template &);
index a77cdb5abae46023305c605b1dd7966203c07126..2d74d7472986d0e1426f783373fcba0aa00cedb5 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <set>
 #include <msp/datafile/objectloader.h>
+#include "mspgl_api.h"
 #include "renderable.h"
 
 namespace Msp {
@@ -20,15 +21,15 @@ If an Effect subclass needs to do any sideband rendering to prepare for a
 frame, that should be done in setup_frame().  The render() function should only
 set up the necessary state and call the content renderable's render() function.
 */
-class Effect: public Renderable
+class MSPGL_API Effect: public Renderable
 {
 public:
        /**
        Holds the parameters for an Effect.  Used with SequenceTemplate.
        */
-       struct Template
+       struct MSPGL_API Template
        {
-               class Loader: public DataFile::CollectionObjectLoader<Template>
+               class MSPGL_API Loader: public DataFile::CollectionObjectLoader<Template>
                {
                public:
                        Loader(Template &, Collection &);
index e6ce5f81583ff8abd772303f5f863919553755db..4f1f544b4c4dcbea422218016fa97a8bec9bb6c7 100644 (file)
@@ -5,6 +5,7 @@
 #include "camera.h"
 #include "effect.h"
 #include "framebuffer.h"
+#include "mspgl_api.h"
 #include "programdata.h"
 #include "texturecube.h"
 
@@ -27,12 +28,12 @@ artifacts if one is used to create reflections on a complex object.
 The shader fragment common.glsl provides interfaces to access the environment
 data.
 */
-class EnvironmentMap: public Effect
+class MSPGL_API EnvironmentMap: public Effect
 {
 public:
-       struct Template: Effect::Template
+       struct MSPGL_API Template: Effect::Template
        {
-               class Loader: public DataFile::DerivedObjectLoader<Template, Effect::Template::Loader>
+               class MSPGL_API Loader: public DataFile::DerivedObjectLoader<Template, Effect::Template::Loader>
                {
                private:
                        static ActionMap shared_actions;
index 02d9d17a6f104d3672dc152849eced83f5ca9adf..c57f328c832495be38357e076cd897a690109018 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_POSTPROCESSOR_H_
 
 #include <msp/datafile/objectloader.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -17,15 +18,15 @@ Base class for post-processing effects.
 PostProcessors can be added to a Sequence.  They receive the contents of the
 entire framebuffer as a texture and render it back, altering it in the process.
 */
-class PostProcessor
+class MSPGL_API PostProcessor
 {
 public:
        /**
        Holds the parameters for a PostProcessor.  Used with SequenceTemplate.
        */
-       struct Template
+       struct MSPGL_API Template
        {
-               class Loader: public Msp::DataFile::ObjectLoader<Template>
+               class MSPGL_API Loader: public Msp::DataFile::ObjectLoader<Template>
                {
                public:
                        Loader(Template &);
index da76062833c745a487549df4a2a88e265f70cf2c..980be57c96b3b81d61950e3fef635e202e0ef287 100644 (file)
@@ -4,6 +4,7 @@
 #include "camera.h"
 #include "effect.h"
 #include "framebuffer.h"
+#include "mspgl_api.h"
 #include "programdata.h"
 #include "rect.h"
 #include "texture2d.h"
@@ -29,12 +30,12 @@ and region information is added to the uniform values.
 
 The shader fragment shadow.glsl provides interfaces to access the shadow map.
 */
-class ShadowMap: public Effect
+class MSPGL_API ShadowMap: public Effect
 {
 public:
-       struct Template: Effect::Template
+       struct MSPGL_API Template: Effect::Template
        {
-               class Loader: public DataFile::DerivedObjectLoader<Template, Effect::Template::Loader>
+               class MSPGL_API Loader: public DataFile::DerivedObjectLoader<Template, Effect::Template::Loader>
                {
                private:
                        static ActionMap shared_actions;
@@ -51,7 +52,7 @@ public:
 
                struct ShadowedLight
                {
-                       class Loader: public DataFile::ObjectLoader<ShadowedLight>
+                       class MSPGL_API Loader: public DataFile::ObjectLoader<ShadowedLight>
                        {
                        private:
                                static ActionMap shared_actions;
index cb8403e77709ff0eb8ab81e9f306c3a4fa422e2b..64ab6f12c5db3298d2fe8de52371429cfa2290f0 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_SKY_H_
 
 #include "effect.h"
+#include "mspgl_api.h"
 #include "programdata.h"
 #include "rendertarget.h"
 
@@ -22,10 +23,10 @@ Based on the techniques described in "A Scalable and Production Ready Sky and
 Atmosphere Rendering Technique" by Sébastien Hillaire
 (https://sebh.github.io/publications/egsr2020.pdf).
 */
-class Sky: public Effect
+class MSPGL_API Sky: public Effect
 {
 public:
-       struct Planet
+       struct MSPGL_API Planet
        {
                Color rayleigh_scatter;
                Color mie_scatter;
@@ -44,9 +45,9 @@ public:
                static Planet earth();
        };
 
-       struct Template: Effect::Template
+       struct MSPGL_API Template: Effect::Template
        {
-               class Loader: public DataFile::DerivedObjectLoader<Template, Effect::Template::Loader>
+               class MSPGL_API Loader: public DataFile::DerivedObjectLoader<Template, Effect::Template::Loader>
                {
                private:
                        static ActionMap shared_actions;
index 0db1ca400de7f017b2991e414dd3c0c331bc8a3d..85be3013792915a348c8dcfcf01d58cec1147727 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <vector>
 #include <msp/datafile/collection.h>
+#include <msp/gl/mspgl_api.h>
 #include <msp/io/base.h>
 #include "parser.h"
 #include "syntax.h"
@@ -11,7 +12,7 @@ namespace Msp {
 namespace GL {
 namespace SL {
 
-class Compiler
+class MSPGL_API Compiler
 {
 public:
        enum Mode
index 28cefd0b411661af1a0c6f88b96918a5bc6e0ad0..a92fbf6140c0740accfc4232447aa727d18c74a5 100644 (file)
@@ -2,12 +2,13 @@
 #define MSP_GL_SL_FEATURES_H_
 
 #include <msp/gl/backend.h>
+#include <msp/gl/mspgl_api.h>
 
 namespace Msp {
 namespace GL {
 namespace SL {
 
-struct Features
+struct MSPGL_API Features
 {
        GraphicsApi target_api = OPENGL;
        Version glsl_version;
index 4fe4e10c2012bc9be0c3e2171bd39f01e8e341a5..b5e04d72aec101af8ad164b7a252561cc335c5b3 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_BASICMATERIAL_H_
 
 #include "material.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -13,7 +14,7 @@ equivalent to legacy OpenGL materials.
 In addition to the usual properties of the Phong shading model, normal mapping
 and reflections are supported.  Reflections require an EnvironmentMap effect.
 */
-class BasicMaterial: public Material
+class MSPGL_API BasicMaterial: public Material
 {
 public:
        class Loader: public DataFile::DerivedObjectLoader<BasicMaterial, Material::PropertyLoader<BasicMaterial> >
index cdd8b4b8753cb51587f26977be14bc9b213e314b..e1b816f5093c0ad06db26aef5e5e1a97abc7b8a4 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_DIRECTIONALLIGHT_H_
 
 #include "light.h"
+#include "mspgl_api.h"
 #include "vector.h"
 
 namespace Msp {
@@ -10,10 +11,10 @@ namespace GL {
 /**
 A light source which has uniform direction and strength everywhere.
 */
-class DirectionalLight: public Light
+class MSPGL_API DirectionalLight: public Light
 {
 public:
-       class Loader: public DataFile::DerivedObjectLoader<DirectionalLight, Light::Loader>
+       class MSPGL_API Loader: public DataFile::DerivedObjectLoader<DirectionalLight, Light::Loader>
        {
        private:
                static ActionMap shared_actions;
index 189380cdb7a1e2f1b619423761b708bfadc8b2dc..3d7cbcc46268830c98f80aad1b99ad569f449954 100644 (file)
@@ -5,6 +5,7 @@
 #include <msp/datafile/dynamicobjectloader.h>
 #include <msp/datafile/objectloader.h>
 #include "color.h"
+#include "mspgl_api.h"
 #include "placeable.h"
 
 namespace Msp {
@@ -21,7 +22,7 @@ Sequence::Step.
 
 Shadows can be added to lights by using the ShadowMap effect.
 */
-class Light: public Placeable
+class MSPGL_API Light: public Placeable
 {
 protected:
        class Loader: public DataFile::ObjectLoader<Light>
index 335e78872a23f2a0f9acfcf4b05ffddfa0fd2f56..84f2f3af7b2b23c6220e4187e6d8724378f066e3 100644 (file)
@@ -4,6 +4,7 @@
 #include <vector>
 #include <msp/geometry/angle.h>
 #include "color.h"
+#include "mspgl_api.h"
 #include "programdata.h"
 
 namespace Msp {
@@ -16,10 +17,10 @@ Combines multiple light sources with global lighting parameters.
 
 This class also stores ProgramData for using the lights in shaders.
 */
-class Lighting
+class MSPGL_API Lighting
 {
 public:
-       class Loader: public DataFile::CollectionObjectLoader<Lighting>
+       class MSPGL_API Loader: public DataFile::CollectionObjectLoader<Lighting>
        {
        private:
                static ActionMap shared_actions;
index 3586ad38208ec03222add65aa9af0e612d36f8bc..d2d741ccae762d3199237d5b3e6473a9a86c1e03 100644 (file)
@@ -5,6 +5,7 @@
 #include <msp/datafile/dynamicobjectloader.h>
 #include <msp/datafile/objectloader.h>
 #include "color.h"
+#include "mspgl_api.h"
 #include "programdata.h"
 #include "texture.h"
 
@@ -16,10 +17,10 @@ class Sampler;
 /**
 Base class for materials.  Subclasses provide different shading models.
 */
-class Material
+class MSPGL_API Material
 {
 private:
-       class Loader: public DataFile::CollectionObjectLoader<Material>
+       class MSPGL_API Loader: public DataFile::CollectionObjectLoader<Material>
        {
        protected:
                Loader(Material &, Collection &);
@@ -43,7 +44,7 @@ protected:
        };
 
        template<typename C>
-       class PropertyLoader: public DataFile::DerivedObjectLoader<Material, Loader>
+       class MSPGL_API PropertyLoader: public DataFile::DerivedObjectLoader<Material, Loader>
        {
        protected:
                PropertyLoader(C &m, Collection &c): DerivedObjectLoader<Material, Loader>(m, c) { }
@@ -61,7 +62,7 @@ protected:
        };
 
 public:
-       class GenericLoader: public DataFile::DynamicObjectLoader<Material>
+       class MSPGL_API GenericLoader: public DataFile::DynamicObjectLoader<Material>
        {
                friend class Material;
 
index e96236d2af8501597336d7e72037ba73a22ceba7..d21bece3fd1b1dbe253c2efd8e511050be14824c 100644 (file)
@@ -17,10 +17,10 @@ tinted by the base color.  For fully dielectric materials base color determines
 the color of the diffuse reflection; specular reflection is untinted.
 Roughness affects how blurry specular reflections are.
 */
-class PbrMaterial: public Material
+class MSPGL_API PbrMaterial: public Material
 {
 public:
-       class Loader: public DataFile::DerivedObjectLoader<PbrMaterial, Material::PropertyLoader<PbrMaterial> >
+       class MSPGL_API Loader: public DataFile::DerivedObjectLoader<PbrMaterial, Material::PropertyLoader<PbrMaterial> >
        {
        private:
                static ActionMap shared_actions;
index a49fbe0ef3de09b462cc54c44ad0d5e40b653be8..f94c9ca0c374848e81ac97c7c5f7f1891acbb636 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_POINTLIGHT_H_
 
 #include "light.h"
+#include "mspgl_api.h"
 #include "vector.h"
 
 namespace Msp {
@@ -11,10 +12,10 @@ namespace GL {
 A positional, omnidirectional light source.  The light's strength can be
 attenuated based on distance.
 */
-class PointLight: public Light
+class MSPGL_API PointLight: public Light
 {
 public:
-       class Loader: public DataFile::DerivedObjectLoader<PointLight, Light::Loader>
+       class MSPGL_API Loader: public DataFile::DerivedObjectLoader<PointLight, Light::Loader>
        {
        private:
                static ActionMap shared_actions;
index bc98847b26417f84dd18f1f3e17970276750f3e3..3b45c5c038701822017e1cb5c341488df718e9f8 100644 (file)
@@ -6,6 +6,7 @@
 #include <msp/datafile/objectloader.h>
 #include "datatype.h"
 #include "matrix.h"
+#include "mspgl_api.h"
 #include "reflectdata.h"
 #include "tag.h"
 #include "vector.h"
@@ -13,7 +14,7 @@
 namespace Msp {
 namespace GL {
 
-class too_many_uniforms: public std::runtime_error
+class MSPGL_API too_many_uniforms: public std::runtime_error
 {
 public:
        too_many_uniforms(const std::string &w): std::runtime_error(w) { }
@@ -36,10 +37,10 @@ programs have the same layout, the same block is used for them.
 The class is optimized for an access pattern where the set of uniforms and
 programs stays constants, with only the values changing.
 */
-class ProgramData: public NonCopyable
+class MSPGL_API ProgramData: public NonCopyable
 {
 public:
-       class Loader: public DataFile::ObjectLoader<ProgramData>
+       class MSPGL_API Loader: public DataFile::ObjectLoader<ProgramData>
        {
        public:
                Loader(ProgramData &);
index 8fd289fe47c4a6638c7bc25e3e9fa6dc7e25bc7e..d8d8b4c7de167b6ccce4317e34a948ce32336d2e 100644 (file)
@@ -6,6 +6,7 @@
 #include "blend.h"
 #include "cullface.h"
 #include "material.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -23,10 +24,10 @@ textures.
 A Material can be used to automatically populate most of the fields of a
 RenderMethod.
 */
-class RenderMethod
+class MSPGL_API RenderMethod
 {
 public:
-       class Loader: public DataFile::CollectionObjectLoader<RenderMethod>
+       class MSPGL_API Loader: public DataFile::CollectionObjectLoader<RenderMethod>
        {
        private:
                std::string inline_base_name;
index e929dac27a07ffea85fc20d07528f1a4f6de94d3..d957c71c968baebc1f31ecebdfe121eee3ed2bd4 100644 (file)
@@ -9,13 +9,13 @@ namespace GL {
 class Texture;
 class Texture2DArray;
 
-class SplatMaterial: public Material, public NonCopyable
+class MSPGL_API SplatMaterial: public Material, public NonCopyable
 {
 private:
        struct MapArray;
 
 public:
-       class Loader: public DataFile::DerivedObjectLoader<SplatMaterial, PropertyLoader<SplatMaterial>>
+       class MSPGL_API Loader: public DataFile::DerivedObjectLoader<SplatMaterial, PropertyLoader<SplatMaterial>>
        {
        private:
                static ActionMap shared_actions;
index 716c57cd0bb5903c71d778038a0eb6ac86248e77..49d916c139509a89d1462fdefb78f5809b04b476 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_TECHNIQUE_H_
 
 #include <map>
+#include "mspgl_api.h"
 #include "rendermethod.h"
 #include "tag.h"
 
@@ -14,10 +15,10 @@ class Texture;
 /**
 Ties multiple tagged render methods together.
 */
-class Technique
+class MSPGL_API Technique
 {
 public:
-       class Loader: public Msp::DataFile::CollectionObjectLoader<Technique>
+       class MSPGL_API Loader: public Msp::DataFile::CollectionObjectLoader<Technique>
        {
        private:
                std::string inline_base_name;
index f4f1086d32c68acd4aca0b557dd4d68b03551aa3..8640e7c50efbd62bbcfd0783f5a28162aea1f4d7 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_UNLITMATERIAL_H_
 
 #include "material.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -10,10 +11,10 @@ namespace GL {
 A material which performs no lighting calculations at all.  Useful for HUD
 graphics.
 */
-class UnlitMaterial: public Material
+class MSPGL_API UnlitMaterial: public Material
 {
 public:
-       class Loader: public DataFile::DerivedObjectLoader<UnlitMaterial, Material::PropertyLoader<UnlitMaterial> >
+       class MSPGL_API Loader: public DataFile::DerivedObjectLoader<UnlitMaterial, Material::PropertyLoader<UnlitMaterial> >
        {
        private:
                static ActionMap shared_actions;
index 59a0ac2e62f677c4c356339a97f5c794515d7562..c55157b593fa148c86d4f12f71e5c1174e7e2643 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_CAMERA_H_
 
 #include <msp/datafile/objectloader.h>
+#include "mspgl_api.h"
 #include "placeable.h"
 #include "programdata.h"
 
@@ -22,10 +23,10 @@ YZ plane of eye space is aligned to the plane formed by the look and up
 directions.  Setting the up direction to the opposite of gravity direction is
 an easy way to keep the camera upright.
 */
-class Camera: public Placeable
+class MSPGL_API Camera: public Placeable
 {
 public:
-       class Loader: public DataFile::ObjectLoader<Camera>
+       class MSPGL_API Loader: public DataFile::ObjectLoader<Camera>
        {
        public:
                Loader(Camera &);
index 6f4048ece6ea580dfcdf30f78de4d8388c82d3a5..e3fdf9a784ac2a91a47ef4da9f9d4cf1b75bc328 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <vector>
 #include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
 #include "programdata.h"
 #include "renderable.h"
 #include "vertexarray.h"
@@ -15,10 +16,10 @@ class Buffer;
 class Object;
 class ObjectInstance;
 
-class InstanceArrayBase: public Renderable, public NonCopyable
+class MSPGL_API InstanceArrayBase: public Renderable, public NonCopyable
 {
 protected:
-       class Loader: public DataFile::ObjectLoader<InstanceArrayBase>
+       class MSPGL_API Loader: public DataFile::ObjectLoader<InstanceArrayBase>
        {
        private:
                static ActionMap shared_actions;
index dc92326730c4f25a8abf8ec7d479a0d7966ca7f4..deb8d5d2d9fe98e6621a05b525029c8ee1241527 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_OBJECT_H_
 
 #include <vector>
+#include "mspgl_api.h"
 #include "renderable.h"
 #include "rendermethod.h"
 #include "resourceobserver.h"
@@ -28,7 +29,7 @@ determine which LoD to use.
 An Object can be rendered with any tag its Technique supports.  Unknown tags
 are silently ignored.
 */
-class Object: public Renderable, private ResourceObserver
+class MSPGL_API Object: public Renderable, private ResourceObserver
 {
 private:
        struct LevelOfDetail;
@@ -50,7 +51,7 @@ private:
        };
 
 public:
-       class Loader: public LodLoader
+       class MSPGL_API Loader: public LodLoader
        {
        public:
                Loader(Object &, Collection &);
index 5c36113daee00c89d7d9c8ba9a4931a603f584c9..9d815fb43d6c4337bc18f2205b788bcf4aa0888f 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_OBJETCINSTANCE_H_
 
 #include <string>
+#include "mspgl_api.h"
 #include "object.h"
 #include "placeable.h"
 
@@ -15,10 +16,10 @@ the Placeable base class.
 The state used to render the object can be customized by overriding the
 setup_render() and finish_render() functions.
 */
-class ObjectInstance: public PlacedRenderable
+class MSPGL_API ObjectInstance: public PlacedRenderable
 {
 public:
-       class Loader: public DataFile::ObjectLoader<ObjectInstance>
+       class MSPGL_API Loader: public DataFile::ObjectLoader<ObjectInstance>
        {
        public:
                Loader(ObjectInstance &);
index 1f447c39b2efec06ea25c3e0287185d5fb92d12e..b14e4f6751ef7216fddfed928d82c444b28cf17b 100644 (file)
@@ -5,6 +5,7 @@
 #include <vector>
 #include "blend.h"
 #include "depthtest.h"
+#include "mspgl_api.h"
 #include "query.h"
 #include "scene.h"
 
@@ -21,7 +22,7 @@ entirely occluded by others.
 Renderables must have valid model matrices and bounding spheres to participate
 in occlusion culling.  Those lacking one or both are always rendered.
 */
-class OccludedScene: public Scene
+class MSPGL_API OccludedScene: public Scene
 {
 public:
        using Scene::Loader;
index c72c1dd3c7049fe83952154b7712c4fe2ab16dcd..e845aea2fd1a06cd53b0fb74b3b3d267b0b8e962 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_GL_OFFSCREENVIEW_H_
 #define MSP_GL_OFFSCREENVIEW_H_
 
+#include "mspgl_api.h"
 #include "view.h"
 
 namespace Msp {
@@ -12,7 +13,7 @@ class RenderTarget;
 /**
 A View targeting an offscreen framebuffer.
 */
-class OffscreenView: public View
+class MSPGL_API OffscreenView: public View
 {
 private:
        Framebuffer &target;
index b7fa8c6c66869c2dbc52ed09aeea9aa4fa05d59e..e3218cb341a4c66a143f3f5f9cfc25582d97f3fc 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_ORDEREDSCENE_H_
 
 #include <vector>
+#include "mspgl_api.h"
 #include "scene.h"
 
 namespace Msp {
@@ -10,7 +11,7 @@ namespace GL {
 /**
 A scene which renders its contents in a specific order.
 */
-class OrderedScene: public Scene
+class MSPGL_API OrderedScene: public Scene
 {
 public:
        using Scene::Loader;
index 9d0c2dd7703fd38b86df2cea5ca93f11a319ed9a..7d8df5359269cc48bfc9b3d5d24ebfb4fa34bb8e 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_PLACEABLE_H_
 
 #include "matrix.h"
+#include "mspgl_api.h"
 #include "renderable.h"
 
 namespace Msp {
@@ -10,7 +11,7 @@ namespace GL {
 /**
 A base class for things that can be positioned and oriented in 3D space.
 */
-class Placeable
+class MSPGL_API Placeable
 {
 protected:
        Matrix matrix;
@@ -31,7 +32,7 @@ public:
 An intermediate base class combining the functionality of Renderable and
 Placeable.
 */
-class PlacedRenderable: public Renderable, public Placeable
+class MSPGL_API PlacedRenderable: public Renderable, public Placeable
 {
 protected:
        PlacedRenderable() = default;
index dcb7edd59cc474e97996cd056a3162fe415596aa..e9a0e064bf906546fbb7f4c98b9b771a5860037e 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_RENDERABLE_H_
 
 #include <msp/geometry/boundingsphere.h>
+#include "mspgl_api.h"
 #include "tag.h"
 
 namespace Msp {
@@ -25,7 +26,7 @@ rendering graphs, these functions may be called multiple times for one frame,
 but it's guaranteed that no render() calls will occur before a setup_frame()
 call or after a finish_frame() call.
 */
-class Renderable
+class MSPGL_API Renderable
 {
 protected:
        Renderable() = default;
index 2050c8c4be87a1dc1fb1616bec919fd9d8dae5ec..2d60a0c205cc6888f849535cbede1c5da6efcff6 100644 (file)
@@ -44,7 +44,7 @@ Renderables can save the state by pushing it on the stack before beginning
 their work, and pop it afterwards to restore it without disturbing state set
 by outer scopes.
 */
-class Renderer: public RendererBackend
+class MSPGL_API Renderer: public RendererBackend
 {
        friend RendererBackend;
 
index a59e382c105f81ad18916056deab8a94e27f333c..1646abceba7f2d4321e753b30770f8022c0a571a 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <msp/core/noncopyable.h>
 #include "framebuffer.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -17,7 +18,7 @@ All attachments will be created as 2D or 2D multisample textures, depending on
 the sample count of the format.  For multisampled formats, resolve attachments
 are also created.
 */
-class RenderTarget: public NonCopyable
+class MSPGL_API RenderTarget: public NonCopyable
 {
 private:
        unsigned width;
index e6115ae56541d9e9907818da03c780f45f80660d..bb694858ef609cca085bd66adcce04a114a46151 100644 (file)
@@ -5,6 +5,7 @@
 #include <msp/datafile/dynamicobjectloader.h>
 #include <msp/datafile/objectloader.h>
 #include "matrix.h"
+#include "mspgl_api.h"
 #include "renderable.h"
 
 namespace Msp {
@@ -21,10 +22,10 @@ renderable.
 
 SimpleScene is a good default choice if there are no specific requirements.
 */
-class Scene: public Renderable
+class MSPGL_API Scene: public Renderable
 {
 protected:
-       class Loader: public DataFile::CollectionObjectLoader<Scene>
+       class MSPGL_API Loader: public DataFile::CollectionObjectLoader<Scene>
        {
        public:
                typedef std::map<std::string, Renderable *> ContentMap;
index a5ae2e7c416122933ed3770dc3ec75d38775340c..c28b4bdd412d5b640e94b2a168f72627d2f2e264 100644 (file)
@@ -5,6 +5,7 @@
 #include "color.h"
 #include "depthtest.h"
 #include "frameformat.h"
+#include "mspgl_api.h"
 #include "renderable.h"
 #include "stenciltest.h"
 
@@ -34,10 +35,10 @@ format.
 A Sequence itself is normally rendered with an empty tag.  A special "noclear"
 tag can be used to suppress clearing.
 */
-class Sequence: public Renderable, public NonCopyable
+class MSPGL_API Sequence: public Renderable, public NonCopyable
 {
 public:
-       class Step
+       class MSPGL_API Step
        {
        private:
                Tag tag;
index 174a9e2ea80e3cd6c7da982bf4672e88b58201b4..9f3d3c12fbad269860090e24c101003feaa6770b 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_SIMPLESCENE_H_
 
 #include <set>
+#include "mspgl_api.h"
 #include "scene.h"
 
 namespace Msp {
@@ -10,7 +11,7 @@ namespace GL {
 /**
 A simple scene which renders its contents in an unspecified order.
 */
-class SimpleScene: public Scene
+class MSPGL_API SimpleScene: public Scene
 {
 public:
        using Scene::Loader;
index a675c64fb879a8f160e601dd5ccf1542aec0d313..f80330d3ca68405e073f89c31e4ea0edf524a06a 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_GL_SLOT_H_
 #define MSP_GL_SLOT_H_
 
+#include "mspgl_api.h"
 #include "renderable.h"
 
 namespace Msp {
@@ -10,7 +11,7 @@ namespace GL {
 A container for a single renderable.  Can be used if a part of the scene graph
 needs to be switched without affecting the rest.
 */
-class Slot: public Renderable
+class MSPGL_API Slot: public Renderable
 {
 private:
        Renderable *content = 0;
index b4fc8f52e9aae3ddc2aae3344dce51b3e567804e..2276b86263e71ad2f51084f4930e9228a6b5b507 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "font.h"
 #include "mesh.h"
+#include "mspgl_api.h"
 #include "object.h"
 #include "objectinstance.h"
 
@@ -18,7 +19,7 @@ scale it to the desired size.
 If you derive from Text to customize it, make sure you call Text::setup_render
 or otherwise set the appropriate texture to the Renderer.
 */
-class Text: public ObjectInstance
+class MSPGL_API Text: public ObjectInstance
 {
 public:
        enum HorizontalAlign
index b8a116a65e3b80435a4aa4cdae39020dffad6252..48048d32139e75759d71cac2dc7d48c7b1dc4216 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <msp/core/noncopyable.h>
 #include "framebuffer.h"
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -18,7 +19,7 @@ application in some way.
 The content renderable's render() function is called with an empty tag.  A
 Sequence can be used to specify other tags and add post-processing.
 */
-class View: public NonCopyable
+class MSPGL_API View: public NonCopyable
 {
 protected:
        Camera *camera = 0;
index 43b8d442ea85dd47fbf8745a0265f3c1d5086a68..f73d77fda5e69b32f498177d01c0092d5eb759d9 100644 (file)
@@ -17,7 +17,7 @@ After rendering, the result is presented in the window.
 The aspect ratio of the view's Camera is automatically updated to match that of
 the window.
 */
-class WindowView: public WindowViewBackend, public sigc::trackable
+class MSPGL_API WindowView: public WindowViewBackend, public sigc::trackable
 {
        friend WindowViewBackend;
 
index a498164cd6bea37806419ed92b59d6aa5cc01ef2..4e704a71dfa29f0665af93fc2e684beda43d9d36 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <set>
 #include <vector>
+#include "mspgl_api.h"
 #include "scene.h"
 
 namespace Msp {
@@ -28,7 +29,7 @@ rendering.
 Renderables must have valid model matrices to be sorted.  Those without a
 matrix are sorted as closest to the camera.
 */
-class ZSortedScene: public Scene
+class MSPGL_API ZSortedScene: public Scene
 {
 public:
        using Scene::Loader;
index 2a312e960acd8b1595dc5a93fe03a5b8ed54cff7..9ab8c553a243812c9e2b19f7d358dcf4c551159c 100644 (file)
@@ -4,6 +4,7 @@
 #include <cstdint>
 #include <msp/core/noncopyable.h>
 #include <msp/io/seekable.h>
+#include "mspgl_api.h"
 
 namespace Msp {
 namespace GL {
@@ -11,10 +12,10 @@ namespace GL {
 class ResourceManager;
 class Resources;
 
-class Resource: public NonCopyable
+class MSPGL_API Resource: public NonCopyable
 {
 public:
-       class AsyncLoader
+       class MSPGL_API AsyncLoader
        {
        protected:
                AsyncLoader() { }
index e2926be41a82a98ba184c7a6b5194a11a24db4bc..04067da723f65ac9d811156d4877871a8b8c5216 100644 (file)
@@ -8,6 +8,7 @@
 #include <msp/core/semaphore.h>
 #include <msp/core/thread.h>
 #include <msp/datafile/collection.h>
+#include "mspgl_api.h"
 #include "resource.h"
 
 namespace Msp {
@@ -15,7 +16,7 @@ namespace GL {
 
 class ResourceObserver;
 
-class resource_load_error: public std::runtime_error
+class MSPGL_API resource_load_error: public std::runtime_error
 {
 public:
        resource_load_error(const std::string &, const std::string &);
@@ -24,7 +25,7 @@ public:
 };
 
 
-class ResourceManager: public NonCopyable
+class MSPGL_API ResourceManager: public NonCopyable
 {
 public:
        enum LoadingPolicy
index 0743f763f306406920f175d541d1714429e09990..a04088444ec54ce26125132bf1de8838c50be693 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_RESOURCES_H_
 
 #include <msp/datafile/collection.h>
+#include "mspgl_api.h"
 #include "texture.h"
 
 namespace Msp {
@@ -55,10 +56,10 @@ A ResourceManager can be set to manage objects derived from Resource.  Bulk
 data for those objects will then be loaded in the background, without blocking
 the main thread.
 */
-class Resources: virtual public DataFile::Collection
+class MSPGL_API Resources: virtual public DataFile::Collection
 {
 public:
-       class Loader: public DataFile::DerivedObjectLoader<Resources, Collection::Loader>
+       class MSPGL_API Loader: public DataFile::DerivedObjectLoader<Resources, Collection::Loader>
        {
        public:
                Loader(Resources &);