From e965ed809e91079496f5b2d711ceb3e5e7b99f3d Mon Sep 17 00:00:00 2001 From: mattkae Date: Sun, 6 Feb 2022 16:36:56 -0500 Subject: Working softbody simulation --- shared_cpp/Renderer2d.cpp | 3 ++- shared_cpp/Renderer2d.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'shared_cpp') diff --git a/shared_cpp/Renderer2d.cpp b/shared_cpp/Renderer2d.cpp index e1892e5..70e6714 100644 --- a/shared_cpp/Renderer2d.cpp +++ b/shared_cpp/Renderer2d.cpp @@ -21,7 +21,8 @@ const char* orthographicFragment = " gl_FragColor = VertexColor; \n" "}"; -void Renderer2d::load(WebglContext* context) { +void Renderer2d::load(WebglContext* inContext) { + context = inContext; printf("Compiling orthographic shader...\n"); shader = loadShader(orthographicVertex, orthographicFragment); diff --git a/shared_cpp/Renderer2d.h b/shared_cpp/Renderer2d.h index 3ecb410..bada0ea 100644 --- a/shared_cpp/Renderer2d.h +++ b/shared_cpp/Renderer2d.h @@ -10,6 +10,7 @@ struct WebglContext; struct Renderer2d { Mat4x4 projection; uint32 shader; + WebglContext* context; struct { int32 position; -- cgit v1.2.1