From 7864decc15c5beb15ddbccc65c2ccba7d4052c99 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 5 Jan 2023 00:36:12 +0200 Subject: [PATCH] Decorate things which constitute the public API of the library --- source/animation/animatedobject.h | 5 +++-- source/animation/animation.h | 7 ++++--- source/animation/animationplayer.h | 3 ++- source/animation/armature.h | 7 ++++--- source/animation/keyframe.h | 5 +++-- source/animation/pose.h | 5 +++-- source/animation/transform.h | 5 +++-- source/backends/opengl/batch_backend.h | 3 ++- source/backends/opengl/buffer_backend.h | 3 ++- source/backends/opengl/commands_backend.h | 4 +++- source/backends/opengl/device_backend.h | 3 ++- source/backends/opengl/framebuffer_backend.h | 3 ++- source/backends/opengl/module_backend.h | 3 ++- .../backends/opengl/pipelinestate_backend.h | 3 ++- source/backends/opengl/program_backend.h | 3 ++- source/backends/opengl/query_backend.h | 3 ++- source/backends/opengl/renderer_backend.h | 3 ++- source/backends/opengl/sampler_backend.h | 3 ++- source/backends/opengl/texture1d_backend.h | 3 ++- source/backends/opengl/texture2d_backend.h | 5 +++-- .../backends/opengl/texture2darray_backend.h | 3 ++- .../opengl/texture2dmultisample_backend.h | 3 ++- source/backends/opengl/texture3d_backend.h | 3 ++- source/backends/opengl/texture_backend.h | 3 ++- source/backends/opengl/texturecube_backend.h | 3 ++- source/backends/opengl/uniformblock_backend.h | 4 +++- source/backends/opengl/vertexsetup_backend.h | 3 ++- source/backends/opengl/windowview_backend.h | 3 ++- source/backends/vulkan/batch_backend.h | 3 ++- source/backends/vulkan/buffer_backend.h | 3 ++- source/backends/vulkan/commands_backend.h | 3 ++- source/backends/vulkan/device_backend.h | 3 ++- source/backends/vulkan/framebuffer_backend.h | 3 ++- source/backends/vulkan/memoryallocator.h | 3 ++- source/backends/vulkan/module_backend.h | 3 ++- .../backends/vulkan/pipelinestate_backend.h | 3 ++- source/backends/vulkan/program_backend.h | 3 ++- source/backends/vulkan/query_backend.h | 3 ++- source/backends/vulkan/renderer_backend.h | 3 ++- source/backends/vulkan/sampler_backend.h | 3 ++- source/backends/vulkan/texture1d_backend.h | 3 ++- source/backends/vulkan/texture2d_backend.h | 5 +++-- .../backends/vulkan/texture2darray_backend.h | 3 ++- .../vulkan/texture2dmultisample_backend.h | 3 ++- source/backends/vulkan/texture3d_backend.h | 3 ++- source/backends/vulkan/texture_backend.h | 3 ++- source/backends/vulkan/texturecube_backend.h | 3 ++- source/backends/vulkan/uniformblock_backend.h | 4 +++- source/backends/vulkan/vertexsetup_backend.h | 3 ++- source/backends/vulkan/windowview_backend.h | 3 ++- source/builders/box.h | 3 ++- source/builders/capsule.h | 3 ++- source/builders/cylinder.h | 3 ++- source/builders/font.h | 5 +++-- source/builders/geometrybuilder.h | 3 ++- source/builders/grid.h | 3 ++- source/builders/meshbuilder.h | 3 ++- source/builders/primitivebuilder.h | 3 ++- source/builders/sequencebuilder.h | 3 ++- source/builders/sequencetemplate.h | 5 +++-- source/builders/sphere.h | 5 +++-- source/builders/vertexarraybuilder.h | 3 ++- source/core/backend.h | 3 ++- source/core/batch.h | 2 +- source/core/blend.h | 17 +++++++++-------- source/core/buffer.h | 4 ++-- source/core/bufferable.h | 5 +++-- source/core/commands.h | 2 +- source/core/cullface.h | 5 +++-- source/core/datatype.h | 3 ++- source/core/depthtest.h | 5 +++-- source/core/device.h | 2 +- source/core/error.h | 13 +++++++------ source/core/framebuffer.h | 4 ++-- source/core/frameformat.h | 9 +++++---- source/core/matrix.h | 3 ++- source/core/mesh.h | 5 +++-- source/core/module.h | 8 ++++---- source/core/pipelinestate.h | 2 +- source/core/pixelformat.h | 19 ++++++++++--------- source/core/predicate.h | 5 +++-- source/core/primitivetype.h | 3 ++- source/core/program.h | 4 ++-- source/core/query.h | 4 ++-- source/core/sampler.h | 10 +++++----- source/core/stenciltest.h | 9 +++++---- source/core/tag.h | 3 ++- source/core/texture.h | 4 ++-- source/core/texture1d.h | 4 ++-- source/core/texture2d.h | 6 +++--- source/core/texture2darray.h | 4 ++-- source/core/texture2dmultisample.h | 2 +- source/core/texture3d.h | 4 ++-- source/core/texturecube.h | 6 +++--- source/core/uniformblock.h | 2 +- source/core/vertexarray.h | 5 +++-- source/core/vertexformat.h | 9 +++++---- source/core/vertexsetup.h | 2 +- source/effects/ambientocclusion.h | 7 ++++--- source/effects/bloom.h | 7 ++++--- source/effects/colorcurve.h | 7 ++++--- source/effects/effect.h | 7 ++++--- source/effects/environmentmap.h | 7 ++++--- source/effects/postprocessor.h | 7 ++++--- source/effects/shadowmap.h | 9 +++++---- source/effects/sky.h | 9 +++++---- source/glsl/compiler.h | 3 ++- source/glsl/features.h | 3 ++- source/materials/basicmaterial.h | 3 ++- source/materials/directionallight.h | 5 +++-- source/materials/light.h | 3 ++- source/materials/lighting.h | 5 +++-- source/materials/material.h | 9 +++++---- source/materials/pbrmaterial.h | 4 ++-- source/materials/pointlight.h | 5 +++-- source/materials/programdata.h | 7 ++++--- source/materials/rendermethod.h | 5 +++-- source/materials/splatmaterial.h | 4 ++-- source/materials/technique.h | 5 +++-- source/materials/unlitmaterial.h | 5 +++-- source/render/camera.h | 5 +++-- source/render/instancearray.h | 5 +++-- source/render/object.h | 5 +++-- source/render/objectinstance.h | 5 +++-- source/render/occludedscene.h | 3 ++- source/render/offscreenview.h | 3 ++- source/render/orderedscene.h | 3 ++- source/render/placeable.h | 5 +++-- source/render/renderable.h | 3 ++- source/render/renderer.h | 2 +- source/render/rendertarget.h | 3 ++- source/render/scene.h | 5 +++-- source/render/sequence.h | 5 +++-- source/render/simplescene.h | 3 ++- source/render/slot.h | 3 ++- source/render/text.h | 3 ++- source/render/view.h | 3 ++- source/render/windowview.h | 2 +- source/render/zsortedscene.h | 3 ++- source/resources/resource.h | 5 +++-- source/resources/resourcemanager.h | 5 +++-- source/resources/resources.h | 5 +++-- 142 files changed, 372 insertions(+), 250 deletions(-) diff --git a/source/animation/animatedobject.h b/source/animation/animatedobject.h index df920755..ead6231c 100644 --- a/source/animation/animatedobject.h +++ b/source/animation/animatedobject.h @@ -6,6 +6,7 @@ #include #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 + class MSPGL_API Loader: public DataFile::DerivedObjectLoader { public: Loader(AnimatedObject &); diff --git a/source/animation/animation.h b/source/animation/animation.h index 7d55bb61..2e0536d4 100644 --- a/source/animation/animation.h +++ b/source/animation/animation.h @@ -6,6 +6,7 @@ #include #include #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 + class MSPGL_API Loader: public DataFile::CollectionObjectLoader { private: Time::TimeDelta current_time; @@ -142,7 +143,7 @@ private: }; public: - class Iterator + class MSPGL_API Iterator { private: const Animation *animation; diff --git a/source/animation/animationplayer.h b/source/animation/animationplayer.h index 4b0beb6c..4947a8c9 100644 --- a/source/animation/animationplayer.h +++ b/source/animation/animationplayer.h @@ -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 diff --git a/source/animation/armature.h b/source/animation/armature.h index 9dc2f505..9476812f 100644 --- a/source/animation/armature.h +++ b/source/animation/armature.h @@ -4,16 +4,17 @@ #include #include #include +#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 + class MSPGL_API Loader: public DataFile::ObjectLoader { 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 diff --git a/source/animation/keyframe.h b/source/animation/keyframe.h index 5e70aa73..e5067158 100644 --- a/source/animation/keyframe.h +++ b/source/animation/keyframe.h @@ -4,6 +4,7 @@ #include #include #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 + class MSPGL_API Loader: public DataFile::CollectionObjectLoader { private: std::string inline_base_name; diff --git a/source/animation/pose.h b/source/animation/pose.h index d0c127ed..b4ee9cf0 100644 --- a/source/animation/pose.h +++ b/source/animation/pose.h @@ -4,16 +4,17 @@ #include #include #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 + class MSPGL_API Loader: public DataFile::CollectionObjectLoader { public: Loader(Pose &, Collection &); diff --git a/source/animation/transform.h b/source/animation/transform.h index 5854c417..55d1e142 100644 --- a/source/animation/transform.h +++ b/source/animation/transform.h @@ -3,6 +3,7 @@ #include #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 + class MSPGL_API Loader: public DataFile::ObjectLoader { public: Loader(Transform &); diff --git a/source/backends/opengl/batch_backend.h b/source/backends/opengl/batch_backend.h index b04b1431..183db91c 100644 --- a/source/backends/opengl/batch_backend.h +++ b/source/backends/opengl/batch_backend.h @@ -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; diff --git a/source/backends/opengl/buffer_backend.h b/source/backends/opengl/buffer_backend.h index 446b1d2d..a419e602 100644 --- a/source/backends/opengl/buffer_backend.h +++ b/source/backends/opengl/buffer_backend.h @@ -2,11 +2,12 @@ #define MSP_GL_BUFFER_BACKEND_H_ #include +#include "mspgl_api.h" namespace Msp { namespace GL { -class OpenGLBuffer: public NonCopyable +class MSPGL_API OpenGLBuffer: public NonCopyable { friend class OpenGLPipelineState; friend class OpenGLTexture2D; diff --git a/source/backends/opengl/commands_backend.h b/source/backends/opengl/commands_backend.h index 94ddc560..128d0ccf 100644 --- a/source/backends/opengl/commands_backend.h +++ b/source/backends/opengl/commands_backend.h @@ -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; diff --git a/source/backends/opengl/device_backend.h b/source/backends/opengl/device_backend.h index 2583d582..cb945b72 100644 --- a/source/backends/opengl/device_backend.h +++ b/source/backends/opengl/device_backend.h @@ -4,6 +4,7 @@ #include #include #include +#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; diff --git a/source/backends/opengl/framebuffer_backend.h b/source/backends/opengl/framebuffer_backend.h index 258db95f..2e3654da 100644 --- a/source/backends/opengl/framebuffer_backend.h +++ b/source/backends/opengl/framebuffer_backend.h @@ -4,11 +4,12 @@ #include #include #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; diff --git a/source/backends/opengl/module_backend.h b/source/backends/opengl/module_backend.h index 656b2025..d0b308ca 100644 --- a/source/backends/opengl/module_backend.h +++ b/source/backends/opengl/module_backend.h @@ -2,11 +2,12 @@ #define MSP_GL_MODULE_BACKEND_H_ #include +#include "mspgl_api.h" namespace Msp { namespace GL { -class OpenGLSpirVModule: public NonCopyable +class MSPGL_API OpenGLSpirVModule: public NonCopyable { protected: OpenGLSpirVModule() = default; diff --git a/source/backends/opengl/pipelinestate_backend.h b/source/backends/opengl/pipelinestate_backend.h index 9198706c..6da1375c 100644 --- a/source/backends/opengl/pipelinestate_backend.h +++ b/source/backends/opengl/pipelinestate_backend.h @@ -3,13 +3,14 @@ #include #include +#include "mspgl_api.h" namespace Msp { namespace GL { class Device; -class OpenGLPipelineState: public NonCopyable +class MSPGL_API OpenGLPipelineState: public NonCopyable { friend class OpenGLCommands; diff --git a/source/backends/opengl/program_backend.h b/source/backends/opengl/program_backend.h index 9cce0f7e..9f77afdf 100644 --- a/source/backends/opengl/program_backend.h +++ b/source/backends/opengl/program_backend.h @@ -5,12 +5,13 @@ #include #include #include +#include "mspgl_api.h" #include "reflectdata.h" namespace Msp { namespace GL { -class OpenGLProgram: public NonCopyable +class MSPGL_API OpenGLProgram: public NonCopyable { friend class OpenGLPipelineState; diff --git a/source/backends/opengl/query_backend.h b/source/backends/opengl/query_backend.h index ccda73b0..75b548cf 100644 --- a/source/backends/opengl/query_backend.h +++ b/source/backends/opengl/query_backend.h @@ -3,11 +3,12 @@ #include #include +#include "mspgl_api.h" namespace Msp { namespace GL { -class OpenGLQueryPool: public NonCopyable +class MSPGL_API OpenGLQueryPool: public NonCopyable { friend class OpenGLCommands; diff --git a/source/backends/opengl/renderer_backend.h b/source/backends/opengl/renderer_backend.h index 685b6464..33f59aac 100644 --- a/source/backends/opengl/renderer_backend.h +++ b/source/backends/opengl/renderer_backend.h @@ -2,12 +2,13 @@ #define MSP_GL_RENDERER_BACKEND_H_ #include +#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; diff --git a/source/backends/opengl/sampler_backend.h b/source/backends/opengl/sampler_backend.h index f90fbb22..7b1bd35a 100644 --- a/source/backends/opengl/sampler_backend.h +++ b/source/backends/opengl/sampler_backend.h @@ -2,11 +2,12 @@ #define MSP_GL_SAMPLER_BACKEND_H_ #include +#include "mspgl_api.h" namespace Msp { namespace GL { -class OpenGLSampler: public NonCopyable +class MSPGL_API OpenGLSampler: public NonCopyable { friend class OpenGLPipelineState; diff --git a/source/backends/opengl/texture1d_backend.h b/source/backends/opengl/texture1d_backend.h index 8c0fa8c6..754552b2 100644 --- a/source/backends/opengl/texture1d_backend.h +++ b/source/backends/opengl/texture1d_backend.h @@ -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(); diff --git a/source/backends/opengl/texture2d_backend.h b/source/backends/opengl/texture2d_backend.h index 9d469f2b..470884d3 100644 --- a/source/backends/opengl/texture2d_backend.h +++ b/source/backends/opengl/texture2d_backend.h @@ -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; diff --git a/source/backends/opengl/texture2darray_backend.h b/source/backends/opengl/texture2darray_backend.h index 68a85386..3b8859ef 100644 --- a/source/backends/opengl/texture2darray_backend.h +++ b/source/backends/opengl/texture2darray_backend.h @@ -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(); diff --git a/source/backends/opengl/texture2dmultisample_backend.h b/source/backends/opengl/texture2dmultisample_backend.h index 7adb0bf0..88a98fd4 100644 --- a/source/backends/opengl/texture2dmultisample_backend.h +++ b/source/backends/opengl/texture2dmultisample_backend.h @@ -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(); diff --git a/source/backends/opengl/texture3d_backend.h b/source/backends/opengl/texture3d_backend.h index 9e79f249..c6ebd815 100644 --- a/source/backends/opengl/texture3d_backend.h +++ b/source/backends/opengl/texture3d_backend.h @@ -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(); diff --git a/source/backends/opengl/texture_backend.h b/source/backends/opengl/texture_backend.h index 623bd813..2c300bc7 100644 --- a/source/backends/opengl/texture_backend.h +++ b/source/backends/opengl/texture_backend.h @@ -2,11 +2,12 @@ #define MSP_GL_TEXTURE_BACKEND_H_ #include +#include "mspgl_api.h" namespace Msp { namespace GL { -class OpenGLTexture: public NonCopyable +class MSPGL_API OpenGLTexture: public NonCopyable { friend class OpenGLFramebuffer; friend class OpenGLPipelineState; diff --git a/source/backends/opengl/texturecube_backend.h b/source/backends/opengl/texturecube_backend.h index ed5f29cb..7434a4ef 100644 --- a/source/backends/opengl/texturecube_backend.h +++ b/source/backends/opengl/texturecube_backend.h @@ -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(); diff --git a/source/backends/opengl/uniformblock_backend.h b/source/backends/opengl/uniformblock_backend.h index 9607ea69..ba68fdec 100644 --- a/source/backends/opengl/uniformblock_backend.h +++ b/source/backends/opengl/uniformblock_backend.h @@ -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); diff --git a/source/backends/opengl/vertexsetup_backend.h b/source/backends/opengl/vertexsetup_backend.h index e0dae1bc..e074d566 100644 --- a/source/backends/opengl/vertexsetup_backend.h +++ b/source/backends/opengl/vertexsetup_backend.h @@ -2,6 +2,7 @@ #define MSP_GL_VERTEXSETUP_BACKEND_H_ #include +#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; diff --git a/source/backends/opengl/windowview_backend.h b/source/backends/opengl/windowview_backend.h index da9921c3..2160a0df 100644 --- a/source/backends/opengl/windowview_backend.h +++ b/source/backends/opengl/windowview_backend.h @@ -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; diff --git a/source/backends/vulkan/batch_backend.h b/source/backends/vulkan/batch_backend.h index 78fdd9d0..4bdc64fb 100644 --- a/source/backends/vulkan/batch_backend.h +++ b/source/backends/vulkan/batch_backend.h @@ -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; diff --git a/source/backends/vulkan/buffer_backend.h b/source/backends/vulkan/buffer_backend.h index 5902704f..55e24e69 100644 --- a/source/backends/vulkan/buffer_backend.h +++ b/source/backends/vulkan/buffer_backend.h @@ -3,13 +3,14 @@ #include #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; diff --git a/source/backends/vulkan/commands_backend.h b/source/backends/vulkan/commands_backend.h index e17636a8..efc1dbd3 100644 --- a/source/backends/vulkan/commands_backend.h +++ b/source/backends/vulkan/commands_backend.h @@ -4,6 +4,7 @@ #include #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 diff --git a/source/backends/vulkan/device_backend.h b/source/backends/vulkan/device_backend.h index 1011da6b..e5881b2d 100644 --- a/source/backends/vulkan/device_backend.h +++ b/source/backends/vulkan/device_backend.h @@ -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; diff --git a/source/backends/vulkan/framebuffer_backend.h b/source/backends/vulkan/framebuffer_backend.h index 24c1d9c6..729898a7 100644 --- a/source/backends/vulkan/framebuffer_backend.h +++ b/source/backends/vulkan/framebuffer_backend.h @@ -4,6 +4,7 @@ #include #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; diff --git a/source/backends/vulkan/memoryallocator.h b/source/backends/vulkan/memoryallocator.h index 70cda516..6e3413f3 100644 --- a/source/backends/vulkan/memoryallocator.h +++ b/source/backends/vulkan/memoryallocator.h @@ -5,6 +5,7 @@ #include #include #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 diff --git a/source/backends/vulkan/module_backend.h b/source/backends/vulkan/module_backend.h index c4729976..d717b53d 100644 --- a/source/backends/vulkan/module_backend.h +++ b/source/backends/vulkan/module_backend.h @@ -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; diff --git a/source/backends/vulkan/pipelinestate_backend.h b/source/backends/vulkan/pipelinestate_backend.h index 2195b2f3..f59bc760 100644 --- a/source/backends/vulkan/pipelinestate_backend.h +++ b/source/backends/vulkan/pipelinestate_backend.h @@ -3,6 +3,7 @@ #include #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; diff --git a/source/backends/vulkan/program_backend.h b/source/backends/vulkan/program_backend.h index 654b19c7..78d03a12 100644 --- a/source/backends/vulkan/program_backend.h +++ b/source/backends/vulkan/program_backend.h @@ -5,6 +5,7 @@ #include #include #include +#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; diff --git a/source/backends/vulkan/query_backend.h b/source/backends/vulkan/query_backend.h index 25c44dcf..f056b018 100644 --- a/source/backends/vulkan/query_backend.h +++ b/source/backends/vulkan/query_backend.h @@ -3,11 +3,12 @@ #include #include +#include "mspgl_api.h" namespace Msp { namespace GL { -class VulkanQueryPool: public NonCopyable +class MSPGL_API VulkanQueryPool: public NonCopyable { friend class VulkanCommands; diff --git a/source/backends/vulkan/renderer_backend.h b/source/backends/vulkan/renderer_backend.h index 3b0c2f0f..577d29a4 100644 --- a/source/backends/vulkan/renderer_backend.h +++ b/source/backends/vulkan/renderer_backend.h @@ -3,12 +3,13 @@ #include #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 pipeline_states; diff --git a/source/backends/vulkan/sampler_backend.h b/source/backends/vulkan/sampler_backend.h index f96d43c8..2603d13f 100644 --- a/source/backends/vulkan/sampler_backend.h +++ b/source/backends/vulkan/sampler_backend.h @@ -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; diff --git a/source/backends/vulkan/texture1d_backend.h b/source/backends/vulkan/texture1d_backend.h index fdc74d9d..691ccdb9 100644 --- a/source/backends/vulkan/texture1d_backend.h +++ b/source/backends/vulkan/texture1d_backend.h @@ -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(); diff --git a/source/backends/vulkan/texture2d_backend.h b/source/backends/vulkan/texture2d_backend.h index 139f8bef..ccc41c26 100644 --- a/source/backends/vulkan/texture2d_backend.h +++ b/source/backends/vulkan/texture2d_backend.h @@ -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; diff --git a/source/backends/vulkan/texture2darray_backend.h b/source/backends/vulkan/texture2darray_backend.h index 39db1f5c..bac9efff 100644 --- a/source/backends/vulkan/texture2darray_backend.h +++ b/source/backends/vulkan/texture2darray_backend.h @@ -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(); diff --git a/source/backends/vulkan/texture2dmultisample_backend.h b/source/backends/vulkan/texture2dmultisample_backend.h index 392fb0fb..b5931e19 100644 --- a/source/backends/vulkan/texture2dmultisample_backend.h +++ b/source/backends/vulkan/texture2dmultisample_backend.h @@ -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(); diff --git a/source/backends/vulkan/texture3d_backend.h b/source/backends/vulkan/texture3d_backend.h index 49b7497c..134f3d4d 100644 --- a/source/backends/vulkan/texture3d_backend.h +++ b/source/backends/vulkan/texture3d_backend.h @@ -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(); diff --git a/source/backends/vulkan/texture_backend.h b/source/backends/vulkan/texture_backend.h index c977e82e..ce4e540f 100644 --- a/source/backends/vulkan/texture_backend.h +++ b/source/backends/vulkan/texture_backend.h @@ -3,13 +3,14 @@ #include #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; diff --git a/source/backends/vulkan/texturecube_backend.h b/source/backends/vulkan/texturecube_backend.h index 1146c705..7fdb8189 100644 --- a/source/backends/vulkan/texturecube_backend.h +++ b/source/backends/vulkan/texturecube_backend.h @@ -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(); diff --git a/source/backends/vulkan/uniformblock_backend.h b/source/backends/vulkan/uniformblock_backend.h index 47e7a5fd..ba83e82f 100644 --- a/source/backends/vulkan/uniformblock_backend.h +++ b/source/backends/vulkan/uniformblock_backend.h @@ -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) { } diff --git a/source/backends/vulkan/vertexsetup_backend.h b/source/backends/vulkan/vertexsetup_backend.h index 87e78062..d6809fba 100644 --- a/source/backends/vulkan/vertexsetup_backend.h +++ b/source/backends/vulkan/vertexsetup_backend.h @@ -5,6 +5,7 @@ #include #include #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; diff --git a/source/backends/vulkan/windowview_backend.h b/source/backends/vulkan/windowview_backend.h index 1d42374e..f2658c27 100644 --- a/source/backends/vulkan/windowview_backend.h +++ b/source/backends/vulkan/windowview_backend.h @@ -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; diff --git a/source/builders/box.h b/source/builders/box.h index 1059d219..dec6ffa5 100644 --- a/source/builders/box.h +++ b/source/builders/box.h @@ -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; diff --git a/source/builders/capsule.h b/source/builders/capsule.h index 375f4a74..49ff3a5f 100644 --- a/source/builders/capsule.h +++ b/source/builders/capsule.h @@ -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; diff --git a/source/builders/cylinder.h b/source/builders/cylinder.h index dee4c4f5..85e66bdc 100644 --- a/source/builders/cylinder.h +++ b/source/builders/cylinder.h @@ -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; diff --git a/source/builders/font.h b/source/builders/font.h index adbfc828..26af2cbb 100644 --- a/source/builders/font.h +++ b/source/builders/font.h @@ -5,6 +5,7 @@ #include #include #include +#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 + class MSPGL_API Loader: public DataFile::CollectionObjectLoader { public: Loader(Font &, Collection &); diff --git a/source/builders/geometrybuilder.h b/source/builders/geometrybuilder.h index 04b26251..17401fbd 100644 --- a/source/builders/geometrybuilder.h +++ b/source/builders/geometrybuilder.h @@ -2,6 +2,7 @@ #define MSP_GL_GEOMETRYBUILDER_H_ #include +#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 diff --git a/source/builders/grid.h b/source/builders/grid.h index a6605127..a731aa0f 100644 --- a/source/builders/grid.h +++ b/source/builders/grid.h @@ -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; diff --git a/source/builders/meshbuilder.h b/source/builders/meshbuilder.h index 5f4a9dc8..e94b6eff 100644 --- a/source/builders/meshbuilder.h +++ b/source/builders/meshbuilder.h @@ -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; diff --git a/source/builders/primitivebuilder.h b/source/builders/primitivebuilder.h index 0ffd170c..1e2fda4b 100644 --- a/source/builders/primitivebuilder.h +++ b/source/builders/primitivebuilder.h @@ -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; diff --git a/source/builders/sequencebuilder.h b/source/builders/sequencebuilder.h index 931641fe..a34f3603 100644 --- a/source/builders/sequencebuilder.h +++ b/source/builders/sequencebuilder.h @@ -3,6 +3,7 @@ #include #include +#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; diff --git a/source/builders/sequencetemplate.h b/source/builders/sequencetemplate.h index 5c45a900..9da7693c 100644 --- a/source/builders/sequencetemplate.h +++ b/source/builders/sequencetemplate.h @@ -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 @@ -38,7 +39,7 @@ private: using TemplateRegistry = typename TemplateLoader::TypeRegistry; public: - class Loader: public DataFile::CollectionObjectLoader + class MSPGL_API Loader: public DataFile::CollectionObjectLoader { private: static ActionMap shared_actions; diff --git a/source/builders/sphere.h b/source/builders/sphere.h index 47b89643..f78994c6 100644 --- a/source/builders/sphere.h +++ b/source/builders/sphere.h @@ -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; diff --git a/source/builders/vertexarraybuilder.h b/source/builders/vertexarraybuilder.h index 52335960..19792980 100644 --- a/source/builders/vertexarraybuilder.h +++ b/source/builders/vertexarraybuilder.h @@ -2,6 +2,7 @@ #define MSP_GL_VERTEXARRAYBUIDER_H_ #include +#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; diff --git a/source/core/backend.h b/source/core/backend.h index abdb4ccf..777fdacf 100644 --- a/source/core/backend.h +++ b/source/core/backend.h @@ -2,6 +2,7 @@ #define MSP_GL_BACKEND_H_ #include +#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; diff --git a/source/core/batch.h b/source/core/batch.h index 2ac2c43c..88ed613a 100644 --- a/source/core/batch.h +++ b/source/core/batch.h @@ -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 diff --git a/source/core/blend.h b/source/core/blend.h index 874230c6..e5ee10e2 100644 --- a/source/core/blend.h +++ b/source/core/blend.h @@ -4,6 +4,7 @@ #include #include #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 + class MSPGL_API Loader: public DataFile::ObjectLoader { 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(static_cast(m1)|static_cast(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 diff --git a/source/core/buffer.h b/source/core/buffer.h index 9b129361..37e042ec 100644 --- a/source/core/buffer.h +++ b/source/core/buffer.h @@ -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; diff --git a/source/core/bufferable.h b/source/core/bufferable.h index 29acafe0..6c9832a9 100644 --- a/source/core/bufferable.h +++ b/source/core/bufferable.h @@ -4,6 +4,7 @@ #include #include #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; diff --git a/source/core/commands.h b/source/core/commands.h index 793b2589..3cb3b614 100644 --- a/source/core/commands.h +++ b/source/core/commands.h @@ -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; diff --git a/source/core/cullface.h b/source/core/cullface.h index fd90ef20..30578d8a 100644 --- a/source/core/cullface.h +++ b/source/core/cullface.h @@ -2,6 +2,7 @@ #define MSP_GL_CULLFACE_H_ #include +#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 diff --git a/source/core/datatype.h b/source/core/datatype.h index 29789907..08ae7ebb 100644 --- a/source/core/datatype.h +++ b/source/core/datatype.h @@ -3,6 +3,7 @@ #include #include +#include "mspgl_api.h" namespace Msp { namespace GL { @@ -138,7 +139,7 @@ struct TypeTraits> static const DataType type = static_cast((TypeTraits::type&0xF00) | ((TypeTraits::type&0xFF)*N*M) | ((N-1)<<12) | ((M-1)<<14)); }; -void require_type(DataType); +MSPGL_API void require_type(DataType); } // namespace GL } // namespace Msp diff --git a/source/core/depthtest.h b/source/core/depthtest.h index 76602269..977eb8f0 100644 --- a/source/core/depthtest.h +++ b/source/core/depthtest.h @@ -2,6 +2,7 @@ #define MSP_GL_DEPTHTEST_H_ #include +#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 + class MSPGL_API Loader: public DataFile::ObjectLoader { public: Loader(DepthTest &); diff --git a/source/core/device.h b/source/core/device.h index 8c7e92a9..b010baaa 100644 --- a/source/core/device.h +++ b/source/core/device.h @@ -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; diff --git a/source/core/error.h b/source/core/error.h index 8af3ec6b..230a2617 100644 --- a/source/core/error.h +++ b/source/core/error.h @@ -2,46 +2,47 @@ #define MSP_GL_ERROR_H_ #include +#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) { } diff --git a/source/core/framebuffer.h b/source/core/framebuffer.h index 4932f29a..1222b304 100644 --- a/source/core/framebuffer.h +++ b/source/core/framebuffer.h @@ -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; diff --git a/source/core/frameformat.h b/source/core/frameformat.h index 669261ff..53f1e725 100644 --- a/source/core/frameformat.h +++ b/source/core/frameformat.h @@ -2,6 +2,7 @@ #define MSP_GL_FRAMEFORMAT_H_ #include +#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 diff --git a/source/core/matrix.h b/source/core/matrix.h index 4a51ddce..5995f596 100644 --- a/source/core/matrix.h +++ b/source/core/matrix.h @@ -3,12 +3,13 @@ #include #include +#include "mspgl_api.h" #include "vector.h" namespace Msp { namespace GL { -class Matrix: public LinAl::Matrix +class MSPGL_API Matrix: public LinAl::Matrix { private: typedef LinAl::Matrix Base; diff --git a/source/core/mesh.h b/source/core/mesh.h index ba2aebc7..717f7f93 100644 --- a/source/core/mesh.h +++ b/source/core/mesh.h @@ -6,6 +6,7 @@ #include #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 + class MSPGL_API Loader: public DataFile::ObjectLoader { friend class AsyncLoader; diff --git a/source/core/module.h b/source/core/module.h index 4d151112..994aaca4 100644 --- a/source/core/module.h +++ b/source/core/module.h @@ -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; diff --git a/source/core/pipelinestate.h b/source/core/pipelinestate.h index 16fd5bc8..9284f5d4 100644 --- a/source/core/pipelinestate.h +++ b/source/core/pipelinestate.h @@ -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; diff --git a/source/core/pixelformat.h b/source/core/pixelformat.h index 13bc03a8..c325309d 100644 --- a/source/core/pixelformat.h +++ b/source/core/pixelformat.h @@ -4,6 +4,7 @@ #include #include #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(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 diff --git a/source/core/predicate.h b/source/core/predicate.h index 38053d03..5668acc8 100644 --- a/source/core/predicate.h +++ b/source/core/predicate.h @@ -2,6 +2,7 @@ #define MSP_GL_PREDICATE_H_ #include +#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 diff --git a/source/core/primitivetype.h b/source/core/primitivetype.h index ae9be607..e947026b 100644 --- a/source/core/primitivetype.h +++ b/source/core/primitivetype.h @@ -2,6 +2,7 @@ #define MSP_GL_PRIMITIVETYPE_H_ #include +#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 diff --git a/source/core/program.h b/source/core/program.h index 3e206a70..7495ce5c 100644 --- a/source/core/program.h +++ b/source/core/program.h @@ -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 + class MSPGL_API Loader: public DataFile::CollectionObjectLoader { public: Loader(Program &, Collection &); diff --git a/source/core/query.h b/source/core/query.h index 8f9b17e8..0485761b 100644 --- a/source/core/query.h +++ b/source/core/query.h @@ -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; diff --git a/source/core/sampler.h b/source/core/sampler.h index c9f8ec96..4d961f8c 100644 --- a/source/core/sampler.h +++ b/source/core/sampler.h @@ -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 + class MSPGL_API Loader: public DataFile::ObjectLoader { 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 diff --git a/source/core/stenciltest.h b/source/core/stenciltest.h index 2a4338f2..f455f024 100644 --- a/source/core/stenciltest.h +++ b/source/core/stenciltest.h @@ -3,6 +3,7 @@ #include #include +#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 + class MSPGL_API Loader: public DataFile::ObjectLoader { 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 diff --git a/source/core/tag.h b/source/core/tag.h index edc33c63..d0b5dc56 100644 --- a/source/core/tag.h +++ b/source/core/tag.h @@ -3,6 +3,7 @@ #include #include +#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; diff --git a/source/core/texture.h b/source/core/texture.h index 96b17b89..6a9f6255 100644 --- a/source/core/texture.h +++ b/source/core/texture.h @@ -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 + class MSPGL_API Loader: public DataFile::CollectionObjectLoader { protected: unsigned levels; diff --git a/source/core/texture1d.h b/source/core/texture1d.h index abe6c887..2efa95c3 100644 --- a/source/core/texture1d.h +++ b/source/core/texture1d.h @@ -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 + class MSPGL_API Loader: public DataFile::DerivedObjectLoader { public: Loader(Texture1D &); diff --git a/source/core/texture2d.h b/source/core/texture2d.h index b13b8b3c..12803df2 100644 --- a/source/core/texture2d.h +++ b/source/core/texture2d.h @@ -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 + class MSPGL_API Loader: public Msp::DataFile::DerivedObjectLoader { 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; diff --git a/source/core/texture2darray.h b/source/core/texture2darray.h index 98cb1bdc..7c315c1d 100644 --- a/source/core/texture2darray.h +++ b/source/core/texture2darray.h @@ -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 + class MSPGL_API Loader: public Msp::DataFile::DerivedObjectLoader { public: Loader(Texture2DArray &); diff --git a/source/core/texture2dmultisample.h b/source/core/texture2dmultisample.h index 8e234835..5c515111 100644 --- a/source/core/texture2dmultisample.h +++ b/source/core/texture2dmultisample.h @@ -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; diff --git a/source/core/texture3d.h b/source/core/texture3d.h index e7e3a79e..be1a0574 100644 --- a/source/core/texture3d.h +++ b/source/core/texture3d.h @@ -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 + class MSPGL_API Loader: public Msp::DataFile::DerivedObjectLoader { public: Loader(Texture3D &); diff --git a/source/core/texturecube.h b/source/core/texturecube.h index 127251d6..a3bdf138 100644 --- a/source/core/texturecube.h +++ b/source/core/texturecube.h @@ -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 + class MSPGL_API Loader: public Msp::DataFile::DerivedObjectLoader { 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 diff --git a/source/core/uniformblock.h b/source/core/uniformblock.h index 1144158d..b543049e 100644 --- a/source/core/uniformblock.h +++ b/source/core/uniformblock.h @@ -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 data; diff --git a/source/core/vertexarray.h b/source/core/vertexarray.h index 575a716e..c146f9b7 100644 --- a/source/core/vertexarray.h +++ b/source/core/vertexarray.h @@ -4,6 +4,7 @@ #include #include #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 &); diff --git a/source/core/vertexformat.h b/source/core/vertexformat.h index e8ba702d..ac448c94 100644 --- a/source/core/vertexformat.h +++ b/source/core/vertexformat.h @@ -4,6 +4,7 @@ #include #include #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 diff --git a/source/core/vertexsetup.h b/source/core/vertexsetup.h index 1cdedc79..2ea5dfdf 100644 --- a/source/core/vertexsetup.h +++ b/source/core/vertexsetup.h @@ -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; diff --git a/source/effects/ambientocclusion.h b/source/effects/ambientocclusion.h index d055c685..255f2d82 100644 --- a/source/effects/ambientocclusion.h +++ b/source/effects/ambientocclusion.h @@ -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 + class MSPGL_API Loader: public DataFile::DerivedObjectLoader { public: Loader(Template &); diff --git a/source/effects/bloom.h b/source/effects/bloom.h index 30e98f7e..ef5a8600 100644 --- a/source/effects/bloom.h +++ b/source/effects/bloom.h @@ -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 + class MSPGL_API Loader: public DataFile::DerivedObjectLoader { public: Loader(Template &); diff --git a/source/effects/colorcurve.h b/source/effects/colorcurve.h index 99263407..501eae10 100644 --- a/source/effects/colorcurve.h +++ b/source/effects/colorcurve.h @@ -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 + class MSPGL_API Loader: public DataFile::DerivedObjectLoader { public: Loader(Template &); diff --git a/source/effects/effect.h b/source/effects/effect.h index a77cdb5a..2d74d747 100644 --- a/source/effects/effect.h +++ b/source/effects/effect.h @@ -3,6 +3,7 @@ #include #include +#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