summaryrefslogtreecommitdiff
path: root/shared_cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shared_cpp')
-rw-r--r--shared_cpp/Renderer2d.cpp3
-rw-r--r--shared_cpp/Renderer2d.h1
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;