#include <msp/datafile/objectloader.h>
#include "keyframe.h"
#include "matrix.h"
+#include "mspgl_api.h"
#include "objectinstance.h"
namespace Msp {
/**
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 &);
#include <msp/interpolate/spline.h>
#include <msp/time/timedelta.h>
#include "keyframe.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
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;
};
public:
- class Iterator
+ class MSPGL_API Iterator
{
private:
const Animation *animation;
#include "animation.h"
#include "animationeventobserver.h"
#include "matrix.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
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
#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 &);
void link(const std::string &);
};
- class Link
+ class MSPGL_API Link
{
public:
class Loader: public DataFile::ObjectLoader<Link>
#include <msp/core/refptr.h>
#include <msp/datafile/objectloader.h>
#include "matrix.h"
+#include "mspgl_api.h"
#include "transform.h"
namespace Msp {
/**
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;
#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 &);
#include <msp/datafile/objectloader.h>
#include "matrix.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
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 &);
#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;
#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;
#ifndef MSP_GL_COMMANDS_BACKEND_H_
#define MSP_GL_COMMANDS_BACKEND_H_
+#include "mspgl_api.h"
+
namespace Msp {
namespace GL {
class PipelineState;
class QueryPool;
-class OpenGLCommands
+class MSPGL_API OpenGLCommands
{
protected:
const PipelineState *pipeline_state = 0;
#include <vector>
#include <msp/core/noncopyable.h>
#include <msp/graphics/glcontext.h>
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
const OpenGLTexture *scratch_texture = 0;
};
-class OpenGLDevice: public NonCopyable
+class MSPGL_API OpenGLDevice: public NonCopyable
{
protected:
Graphics::GLContext context;
#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;
#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;
#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;
#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;
#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;
#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;
#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;
#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();
#ifndef MSP_GL_TEXTURE2D_BACKEND_H_
#define MSP_GL_TEXTURE2D_BACKEND_H_
+#include "mspgl_api.h"
#include "texture.h"
namespace Msp {
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;
#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();
#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();
#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();
#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;
#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();
#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);
#define MSP_GL_VERTEXSETUP_BACKEND_H_
#include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
class VertexArray;
class VertexFormat;
-class OpenGLVertexSetup: public NonCopyable
+class MSPGL_API OpenGLVertexSetup: public NonCopyable
{
friend class OpenGLPipelineState;
#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;
#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;
#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;
#include <vector>
#include "fence.h"
#include "handles.h"
+#include "mspgl_api.h"
#include "rect.h"
namespace Msp {
class Semaphore;
class SwapChain;
-class VulkanCommands
+class MSPGL_API VulkanCommands
{
protected:
struct CommandBuffers
#include "destroyqueue.h"
#include "handles.h"
#include "memoryallocator.h"
+#include "mspgl_api.h"
#include "pipelinecache.h"
#include "synchronizer.h"
#include "transferqueue.h"
constexpr unsigned MAX_FRAMES_IN_FLIGHT = 3;
-class VulkanDevice: public NonCopyable
+class MSPGL_API VulkanDevice: public NonCopyable
{
protected:
Graphics::VulkanContext context;
#include <string>
#include "frameformat.h"
#include "handles.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
class Device;
class Texture;
-class VulkanFramebuffer: public NonCopyable
+class MSPGL_API VulkanFramebuffer: public NonCopyable
{
friend class RenderPass;
friend class VulkanCommands;
#include <msp/core/noncopyable.h>
#include <msp/graphics/vulkancontext.h>
#include "handles.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
void *map(unsigned);
void unmap(unsigned);
- std::string get_debug() const;
+ MSPGL_API std::string get_debug() const;
};
} // namespace GL
#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;
#include <msp/core/noncopyable.h>
#include "handles.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
class Device;
class VulkanCommandRecorder;
-class VulkanPipelineState: public NonCopyable
+class MSPGL_API VulkanPipelineState: public NonCopyable
{
friend class DescriptorPool;
friend class PipelineCache;
#include <string>
#include <vector>
#include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
#include "reflectdata.h"
namespace Msp {
class Device;
-class VulkanProgram: public NonCopyable
+class MSPGL_API VulkanProgram: public NonCopyable
{
friend class VulkanPipelineState;
#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;
#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;
#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;
#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();
#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;
#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();
#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();
#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();
#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;
#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();
#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) { }
#include <vector>
#include <msp/core/noncopyable.h>
#include "handles.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
class VertexArray;
class VertexFormat;
-class VulkanVertexSetup: public NonCopyable
+class MSPGL_API VulkanVertexSetup: public NonCopyable
{
friend class VulkanPipelineState;
#include "device.h"
#include "framebuffer.h"
+#include "mspgl_api.h"
#include "semaphore.h"
#include "swapchain.h"
#include "view.h"
namespace Msp {
namespace GL {
-class VulkanWindowView: public View
+class MSPGL_API VulkanWindowView: public View
{
protected:
SwapChain *swap_chain = 0;
#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;
#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;
#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;
#include <string>
#include <msp/datafile/objectloader.h>
#include <msp/stringcodec/utf8.h>
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
/**
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 &);
#define MSP_GL_GEOMETRYBUILDER_H_
#include <msp/core/attributes.h>
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
class Mesh;
class PrimitiveBuilder;
-class GeometryBuilder
+class MSPGL_API GeometryBuilder
{
public:
enum TextureFit
#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;
#ifndef MSP_GL_MESHBUILDER_H_
#define MSP_GL_MESHBUILDER_H_
+#include "mspgl_api.h"
#include "primitivebuilder.h"
namespace Msp {
class Batch;
class Mesh;
-class MeshBuilder: public PrimitiveBuilder
+class MSPGL_API MeshBuilder: public PrimitiveBuilder
{
private:
Mesh &mesh;
#ifndef MSP_GL_PRIMITIVEBUILDER_H_
#define MSP_GL_PRIMITIVEBUILDER_H_
+#include "mspgl_api.h"
#include "primitivetype.h"
#include "vertexarray.h"
#include "vertexbuilder.h"
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;
#include <map>
#include <string>
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
class Renderable;
class View;
-class SequenceBuilder
+class MSPGL_API SequenceBuilder
{
private:
const SequenceTemplate &tmpl;
#include "color.h"
#include "depthtest.h"
#include "effect.h"
+#include "mspgl_api.h"
#include "postprocessor.h"
#include "resources.h"
#include "stenciltest.h"
class Lighting;
class Renderable;
-class SequenceTemplate
+class MSPGL_API SequenceTemplate
{
private:
template<typename T>
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;
#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;
};
-class IcoSphereBuilder: public GeometryBuilder
+class MSPGL_API IcoSphereBuilder: public GeometryBuilder
{
private:
float radius;
#define MSP_GL_VERTEXARRAYBUIDER_H_
#include <vector>
+#include "mspgl_api.h"
#include "vertexbuilder.h"
#include "vertexformat.h"
class VertexArray;
-class VertexArrayBuilder: public VertexBuilder
+class MSPGL_API VertexArrayBuilder: public VertexBuilder
{
private:
VertexArray &array;
#define MSP_GL_BACKEND_H_
#include <string>
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
VULKAN
};
-struct Version
+struct MSPGL_API Version
{
unsigned short major = 0;
unsigned short minor = 0;
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>
#include <msp/datafile/objectloader.h>
#include <msp/strings/lexicalcast.h>
#include "color.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
/**
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 &);
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
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) { }
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;
#include <cstddef>
#include <msp/core/noncopyable.h>
#include "buffer.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
Derived classes should call mark_dirty() when the stored data has changed.
*/
-class Bufferable: public NonCopyable
+class MSPGL_API Bufferable: public NonCopyable
{
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;
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;
#define MSP_GL_CULLFACE_H_
#include <msp/strings/lexicalcast.h>
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
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
#include <msp/linal/matrix.h>
#include <msp/linal/vector.h>
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
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
#define MSP_GL_DEPTHTEST_H_
#include <msp/datafile/objectloader.h>
+#include "mspgl_api.h"
#include "predicate.h"
namespace Msp {
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 &);
/**
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;
#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) { }
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 &);
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;
#define MSP_GL_FRAMEFORMAT_H_
#include <cstdint>
+#include "mspgl_api.h"
#include "pixelformat.h"
namespace Msp {
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;
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); }
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
#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;
#include <msp/datafile/objectloader.h>
#include "batch.h"
#include "cullface.h"
+#include "mspgl_api.h"
#include "resource.h"
#include "vertexarray.h"
#include "vertexsetup.h"
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;
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) { }
Applications normally use the Program class to access shaders.
*/
-class Module
+class MSPGL_API Module
{
public:
enum Format
/**
A shader module in GLSL source code format.
*/
-class GlslModule: public Module
+class MSPGL_API GlslModule: public Module
{
private:
std::string prepared_source;
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;
Applications normally use the higher-level Renderer class rather than this.
*/
-class PipelineState: public PipelineStateBackend
+class MSPGL_API PipelineState: public PipelineStateBackend
{
friend PipelineStateBackend;
#include <msp/graphics/image.h>
#include <msp/strings/lexicalcast.h>
#include "datatype.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
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)); }
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
#define MSP_GL_PREDICATE_H_
#include <msp/strings/lexicalcast.h>
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
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
#define MSP_GL_PRIMITIVETYPE_H_
#include <msp/strings/lexicalcast.h>
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
PATCHES
};
-void operator>>(const LexicalConverter &, PrimitiveType &);
+MSPGL_API void operator>>(const LexicalConverter &, PrimitiveType &);
} // namespace GL
} // namespace Msp
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 &);
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;
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 &);
};
-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
#include <msp/datafile/objectloader.h>
#include <msp/strings/lexicalcast.h>
+#include "mspgl_api.h"
#include "predicate.h"
namespace Msp {
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 &);
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
#include <string>
#include <msp/strings/lexicalcast.h>
+#include "mspgl_api.h"
namespace Msp {
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;
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;
/**
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 &);
/**
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 &);
/**
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;
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 &);
Multisample textures can't have mipmaps.
*/
-class Texture2DMultisample: public Texture2DMultisampleBackend
+class MSPGL_API Texture2DMultisample: public Texture2DMultisampleBackend
{
friend Texture2DMultisampleBackend;
/**
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 &);
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 &);
Vector3 get_texel_direction(TextureCubeFace, unsigned, unsigned);
};
-void operator>>(const LexicalConverter &, TextureCubeFace &);
+MSPGL_API void operator>>(const LexicalConverter &, TextureCubeFace &);
} // namespace GL
} // namespace Msp
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;
#include <vector>
#include <msp/datafile/loader.h>
#include "bufferable.h"
+#include "mspgl_api.h"
#include "vertexarraybuilder.h"
#include "vertexformat.h"
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 &);
#include <cstdint>
#include <msp/strings/lexicalcast.h>
#include "datatype.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
/**
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;
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); }
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
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;
#ifndef MSP_GL_AMBIENTOCCLUSION_H_
#define MSP_GL_AMBIENTOCCLUSION_H_
+#include "mspgl_api.h"
#include "postprocessor.h"
#include "programdata.h"
#include "rendertarget.h"
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 &);
#ifndef MSP_GL_BLOOM_H_
#define MSP_GL_BLOOM_H_
+#include "mspgl_api.h"
#include "postprocessor.h"
#include "programdata.h"
#include "rendertarget.h"
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 &);
#ifndef MSP_GL_COLORCURVE_H_
#define MSP_GL_COLORCURVE_H_
+#include "mspgl_api.h"
#include "postprocessor.h"
#include "programdata.h"
#include "texture1d.h"
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 &);
#include <set>
#include <msp/datafile/objectloader.h>
+#include "mspgl_api.h"
#include "renderable.h"
namespace Msp {
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 &);
#include "camera.h"
#include "effect.h"
#include "framebuffer.h"
+#include "mspgl_api.h"
#include "programdata.h"
#include "texturecube.h"
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;
#define MSP_GL_POSTPROCESSOR_H_
#include <msp/datafile/objectloader.h>
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
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 &);
#include "camera.h"
#include "effect.h"
#include "framebuffer.h"
+#include "mspgl_api.h"
#include "programdata.h"
#include "rect.h"
#include "texture2d.h"
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;
struct ShadowedLight
{
- class Loader: public DataFile::ObjectLoader<ShadowedLight>
+ class MSPGL_API Loader: public DataFile::ObjectLoader<ShadowedLight>
{
private:
static ActionMap shared_actions;
#define MSP_GL_SKY_H_
#include "effect.h"
+#include "mspgl_api.h"
#include "programdata.h"
#include "rendertarget.h"
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;
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;
#include <vector>
#include <msp/datafile/collection.h>
+#include <msp/gl/mspgl_api.h>
#include <msp/io/base.h>
#include "parser.h"
#include "syntax.h"
namespace GL {
namespace SL {
-class Compiler
+class MSPGL_API Compiler
{
public:
enum Mode
#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;
#define MSP_GL_BASICMATERIAL_H_
#include "material.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
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> >
#define MSP_GL_DIRECTIONALLIGHT_H_
#include "light.h"
+#include "mspgl_api.h"
#include "vector.h"
namespace Msp {
/**
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;
#include <msp/datafile/dynamicobjectloader.h>
#include <msp/datafile/objectloader.h>
#include "color.h"
+#include "mspgl_api.h"
#include "placeable.h"
namespace Msp {
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>
#include <vector>
#include <msp/geometry/angle.h>
#include "color.h"
+#include "mspgl_api.h"
#include "programdata.h"
namespace Msp {
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;
#include <msp/datafile/dynamicobjectloader.h>
#include <msp/datafile/objectloader.h>
#include "color.h"
+#include "mspgl_api.h"
#include "programdata.h"
#include "texture.h"
/**
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 &);
};
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) { }
};
public:
- class GenericLoader: public DataFile::DynamicObjectLoader<Material>
+ class MSPGL_API GenericLoader: public DataFile::DynamicObjectLoader<Material>
{
friend class Material;
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;
#define MSP_GL_POINTLIGHT_H_
#include "light.h"
+#include "mspgl_api.h"
#include "vector.h"
namespace Msp {
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;
#include <msp/datafile/objectloader.h>
#include "datatype.h"
#include "matrix.h"
+#include "mspgl_api.h"
#include "reflectdata.h"
#include "tag.h"
#include "vector.h"
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) { }
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 &);
#include "blend.h"
#include "cullface.h"
#include "material.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
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;
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;
#define MSP_GL_TECHNIQUE_H_
#include <map>
+#include "mspgl_api.h"
#include "rendermethod.h"
#include "tag.h"
/**
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;
#define MSP_GL_UNLITMATERIAL_H_
#include "material.h"
+#include "mspgl_api.h"
namespace Msp {
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;
#define MSP_GL_CAMERA_H_
#include <msp/datafile/objectloader.h>
+#include "mspgl_api.h"
#include "placeable.h"
#include "programdata.h"
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 &);
#include <vector>
#include <msp/core/noncopyable.h>
+#include "mspgl_api.h"
#include "programdata.h"
#include "renderable.h"
#include "vertexarray.h"
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;
#define MSP_GL_OBJECT_H_
#include <vector>
+#include "mspgl_api.h"
#include "renderable.h"
#include "rendermethod.h"
#include "resourceobserver.h"
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;
};
public:
- class Loader: public LodLoader
+ class MSPGL_API Loader: public LodLoader
{
public:
Loader(Object &, Collection &);
#define MSP_GL_OBJETCINSTANCE_H_
#include <string>
+#include "mspgl_api.h"
#include "object.h"
#include "placeable.h"
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 &);
#include <vector>
#include "blend.h"
#include "depthtest.h"
+#include "mspgl_api.h"
#include "query.h"
#include "scene.h"
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;
#ifndef MSP_GL_OFFSCREENVIEW_H_
#define MSP_GL_OFFSCREENVIEW_H_
+#include "mspgl_api.h"
#include "view.h"
namespace Msp {
/**
A View targeting an offscreen framebuffer.
*/
-class OffscreenView: public View
+class MSPGL_API OffscreenView: public View
{
private:
Framebuffer ⌖
#define MSP_GL_ORDEREDSCENE_H_
#include <vector>
+#include "mspgl_api.h"
#include "scene.h"
namespace Msp {
/**
A scene which renders its contents in a specific order.
*/
-class OrderedScene: public Scene
+class MSPGL_API OrderedScene: public Scene
{
public:
using Scene::Loader;
#define MSP_GL_PLACEABLE_H_
#include "matrix.h"
+#include "mspgl_api.h"
#include "renderable.h"
namespace Msp {
/**
A base class for things that can be positioned and oriented in 3D space.
*/
-class Placeable
+class MSPGL_API Placeable
{
protected:
Matrix matrix;
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;
#define MSP_GL_RENDERABLE_H_
#include <msp/geometry/boundingsphere.h>
+#include "mspgl_api.h"
#include "tag.h"
namespace Msp {
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;
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;
#include <msp/core/noncopyable.h>
#include "framebuffer.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
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;
#include <msp/datafile/dynamicobjectloader.h>
#include <msp/datafile/objectloader.h>
#include "matrix.h"
+#include "mspgl_api.h"
#include "renderable.h"
namespace Msp {
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;
#include "color.h"
#include "depthtest.h"
#include "frameformat.h"
+#include "mspgl_api.h"
#include "renderable.h"
#include "stenciltest.h"
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;
#define MSP_GL_SIMPLESCENE_H_
#include <set>
+#include "mspgl_api.h"
#include "scene.h"
namespace Msp {
/**
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;
#ifndef MSP_GL_SLOT_H_
#define MSP_GL_SLOT_H_
+#include "mspgl_api.h"
#include "renderable.h"
namespace Msp {
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;
#include "font.h"
#include "mesh.h"
+#include "mspgl_api.h"
#include "object.h"
#include "objectinstance.h"
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
#include <msp/core/noncopyable.h>
#include "framebuffer.h"
+#include "mspgl_api.h"
namespace Msp {
namespace GL {
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;
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;
#include <set>
#include <vector>
+#include "mspgl_api.h"
#include "scene.h"
namespace Msp {
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;
#include <cstdint>
#include <msp/core/noncopyable.h>
#include <msp/io/seekable.h>
+#include "mspgl_api.h"
namespace Msp {
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() { }
#include <msp/core/semaphore.h>
#include <msp/core/thread.h>
#include <msp/datafile/collection.h>
+#include "mspgl_api.h"
#include "resource.h"
namespace Msp {
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 &);
};
-class ResourceManager: public NonCopyable
+class MSPGL_API ResourceManager: public NonCopyable
{
public:
enum LoadingPolicy
#define MSP_GL_RESOURCES_H_
#include <msp/datafile/collection.h>
+#include "mspgl_api.h"
#include "texture.h"
namespace Msp {
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 &);