1
0
Fork 0
spectre/include/Spectre/Graphics.h
Henrik Hautakoski 24da7f45e0 Rename Display to Window.
It makes more sense to be consistent and always call it window.
2023-08-22 07:12:47 +02:00

63 lines
868 B
C++

#ifndef GRAPHICS_H
#define GRAPHICS_H
#include <Spectre/GfxDriver/GfxDriver.h>
#include <Spectre/Window/Window.h>
namespace sp {
class PlatformApplication;
class Graphics
{
public :
enum MatrixMode {
PROJECTION,
MODELVIEW,
};
enum VertexType {
TRIANGLES,
};
public :
Graphics(PlatformApplication *platform);
~Graphics();
bool init();
void shutdown();
std::string getVersion() const;
void setWindowMode(Window::Mode mode);
void setSize(int width, int height);
void setViewport(int x, int y, int width, int height);
void setClearColor(float r, float g, float b);
void clearBuffer();
void swapBuffers();
GfxDriver* getDriver();
Window* getWindow();
protected :
int m_width;
int m_height;
Window *m_window;
// Graphics Driver. OpenGL/Vulcan/DirectX etc.
GfxDriver *m_gfxdrv;
};
} // namespace sp
#endif /* GRAPHICS_H */