#pragma once #include #include #include #include #include #include #include namespace hibis::rsdl { /** \class RSDL * Renderer implementation using SDL2 Renderer for the Hibis game engine */ class RSDL : public Renderer { public: RSDL(std::string title, IntVec2 size, LoggerCallback callback); ~RSDL(); void clearScreen(Color col = Color {0, 0, 0, 255}) override; void renderCurrent() override; void drawText(Resource* resource, std::string text, IntVec2 pos, Color color) override; void drawTexture(Texture* resource, float scale, hibis::IntVec2 pos) override; void preDraw() override; void postDraw() override; void update() override; void setWindowTitle(std::string title) override; private: SDL_Window* mWindow; SDL_Renderer* mRendererContext; LoggerCallback mLoggerCallback; }; }