diff options
Diffstat (limited to '2d/_collisions/pill_pill')
-rw-r--r-- | 2d/_collisions/pill_pill/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/2d/_collisions/pill_pill/main.cpp b/2d/_collisions/pill_pill/main.cpp index 1aef594..7802a5d 100644 --- a/2d/_collisions/pill_pill/main.cpp +++ b/2d/_collisions/pill_pill/main.cpp @@ -1,4 +1,4 @@ -#include "../../../shared_cpp/OrthographicRenderer.h" +#include "../../../shared_cpp/Renderer2d.h" #include "../../../shared_cpp/types.h" #include "../../../shared_cpp/WebglContext.h" #include "../../../shared_cpp/mathlib.h" @@ -59,7 +59,7 @@ struct PillInData { }; struct Pill { - OrthographicShape shape; + Mesh2d shape; Rigidbody body; float32 a = 0; float32 b = 0; @@ -73,10 +73,10 @@ struct Pill { return retval; } - void load(OrthographicRenderer* renderer, PillInData data) { + void load(Renderer2d* renderer, PillInData data) { float32 angleIncrements = (2.f * PI) / data.numSegments; uint32 numVertices = static_cast<uint32>(data.numSegments * 3.f); - OrthographicVertex* vertices = new OrthographicVertex[numVertices]; + Vertex2d* vertices = new Vertex2d[numVertices]; a = data.width / 2.f; b = data.height / 2.f; @@ -112,7 +112,7 @@ struct Pill { shape.model = Mat4x4().translateByVec2(body.position).rotate2D(body.rotation); } - void render(OrthographicRenderer* renderer) { + void render(Renderer2d* renderer) { shape.render(renderer); } @@ -141,7 +141,7 @@ void update(float32 time, void* userData); void unload(); WebglContext context; -OrthographicRenderer renderer; +Renderer2d renderer; MainLoop mainLoop; Pill pillList[2]; |