From b6a666e96ffd04bd6d52be8fd9899faf27b751db Mon Sep 17 00:00:00 2001 From: mattkae Date: Mon, 31 Jul 2023 07:31:52 -0400 Subject: Some initial shader loading work --- themes/src/Renderer2d.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'themes/src/Renderer2d.h') diff --git a/themes/src/Renderer2d.h b/themes/src/Renderer2d.h index 909f088..8a96503 100644 --- a/themes/src/Renderer2d.h +++ b/themes/src/Renderer2d.h @@ -7,6 +7,7 @@ struct WebglContext; +/// Responsible for rendering Mesh2Ds struct Renderer2d { WebglContext* context = NULL; Mat4x4 projection; @@ -24,7 +25,9 @@ struct Renderer2d { i32 model; } uniforms; - void load(WebglContext* context); + /// Load with the provided context and shader programs. If the shaders are NULL, the default + /// shader is used + void load(WebglContext* context, const char* vertexShader = NULL, const char* fragmentShader = NULL); void render(); void unload(); }; -- cgit v1.2.1