hibiscus/renderer/rglcore/rglcore.hpp

38 lines
786 B
C++

#pragma once
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#include <callback.hpp>
#include <renderer/renderer.hpp>
namespace hibis::rglcore {
class RGLCore : public Renderer {
public:
RGLCore(std::string title, IntVec2 size, LoggerCallback callback);
~RGLCore();
// Draw
void clearScreen(Color col) override;
void renderCurrent() override;
void drawText(Resource* resource, std::string text, IntVec2 pos, Color color) override;
void drawTexture(Texture* resource, float scale, IntVec2 pos) override;
// Pre and Post draw
void preDraw() override;
void postDraw() override;
// Update
void update() override;
// Util
void setWindowTitle(std::string title) override;
private:
GLFWwindow* mWindow;
};
}