1
0
Fork 0
spectre/include/Spectre/Graphics/Renderable.h
Henrik Hautakoski e10daeaaa6
Move everything from global namespace to "sp" namespace
When writing the X11 (linux) implementation there was a problem with X11 defining a "Display" type and we also have a Display class in the engine.

So to fix that problem and minimize the risk for running into other name conflicts. We move everything from global namespace.
2019-09-30 19:10:17 +02:00

50 lines
969 B
C++

#ifndef SPECTRE_GRAPHICS_RENDERABLE_H
#define SPECTRE_GRAPHICS_RENDERABLE_H
#include "Vertex2D.h"
#include "Transformable.h"
#include <Spectre/Math/Matrix4.h>
#include <Spectre/Math/Vector2.h>
#include <vector>
namespace sp {
class Renderer2D;
class ShaderProgram;
class Texture;
enum RenderType
{
RenderType_Scene = 0,
RenderType_UI = 1
};
class Renderable2D : public Transformable
{
public :
Renderable2D();
Renderable2D(const Vector2f& position);
virtual ~Renderable2D();
unsigned char getZOrder() const;
void setZOrder(unsigned char value);
virtual const std::vector<Vertex2D>& getVertices() const = 0;
virtual const std::vector<unsigned short>& getIndices() const = 0;
virtual const Texture* getTexture() const { return NULL; };
virtual const RenderType getRenderType() const = 0;
virtual void render(Renderer2D& renderer) const = 0;
protected :
unsigned char m_zorder;
};
} // namespace sp
#endif /* SPECTRE_GRAPHCIS_RENDERABLE_H */