1
0
Fork 0
spectre/include/Spectre/GfxDriver/GfxDriver.h

49 lines
889 B
C++

#ifndef SPECTRE_GFXDRIVER_GFXDRIVER_H
#define SPECTRE_GFXDRIVER_GFXDRIVER_H
#include <string>
namespace sp {
class ShaderProgram;
class GfxDriver
{
public:
enum BufferFlags {
CLEAR_BUFFER_BIT,
};
public:
// Get the name of the driver.
virtual std::string getName() const = 0;
// Get the version of the driver
virtual std::string getVersion() const = 0;
virtual std::string getVendor() const = 0;
virtual std::string getCardName() const = 0;
virtual void setViewport(int x, int y, int width, int height) = 0;
virtual void setClearColor(float r, float g, float b, float a) = 0;
virtual void clearBuffer(BufferFlags flags) = 0;
virtual void clearColorBuffer() = 0;
// Resources.
virtual ShaderProgram* createShaderProgram() = 0;
// CreateIndexBuffer()
// CreateVertexBuffer()
// Draw calls
};
} // namespace sp
#endif /* SPECTRE_GFXDRIVER_GFXDRIVER_H */