12#include <glm/mat4x4.hpp>
65 const Color &clearColor = {.
r = 1.F, .g = 1.F, .b = 1.F, .a = 1.F}) = 0;
88 virtual void createMesh(
const std::vector<float> &vertices) = 0;
This file contains the ShaderFrontend interface.
This file contains the Window interface.
virtual void setClearColor(const Color &color)=0
Set the clear color.
~IRenderer() override=default
virtual void createPipeline(const ShaderID &id, const ShaderIRModule &vertex, const ShaderIRModule &fragment)=0
Create a rendering pipeline with vertex and fragment shaders.
virtual bool isVSyncEnabled() const =0
Check if VSync is enabled.
virtual void initialize(const NativeWindowHandle &nativeWindowHandle, const Color &clearColor={.r=1.F,.g=1.F,.b=1.F,.a=1.F})=0
Initialize the renderer with a native window handle and clear color.
virtual void createMesh(const std::vector< float > &vertices)=0
Create a mesh with the given vertex data.
virtual void setVSyncEnabled(bool enabled)=0
Enable or disable VSync.
virtual void draw(const WindowSize &windowSize, const ShaderID &shaderId, glm::mat4 mvp)=0
Draw the scene using the specified shader and window size.
Struct for native window handle.
Struct for shader intermediate representation module.