diff options
author | mattkae <mattkae@protonmail.com> | 2022-02-06 16:36:56 -0500 |
---|---|---|
committer | mattkae <mattkae@protonmail.com> | 2022-02-06 16:36:56 -0500 |
commit | e965ed809e91079496f5b2d711ceb3e5e7b99f3d (patch) | |
tree | 18eab7d47e3d0a3582be3ddd6b7e9125ec10b42e /shared_cpp | |
parent | 2d5ade4d7f323e5b4cb5ed27af8dbe04cbcb4ad0 (diff) |
Working softbody simulation
Diffstat (limited to 'shared_cpp')
-rw-r--r-- | shared_cpp/Renderer2d.cpp | 3 | ||||
-rw-r--r-- | shared_cpp/Renderer2d.h | 1 |
2 files changed, 3 insertions, 1 deletions
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; |