diff options
Diffstat (limited to '_wasm')
-rw-r--r-- | _wasm/intro/intro.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/_wasm/intro/intro.cpp b/_wasm/intro/intro.cpp index 8e1574b..3146eaf 100644 --- a/_wasm/intro/intro.cpp +++ b/_wasm/intro/intro.cpp @@ -44,14 +44,14 @@ struct OrthographicProgramData { } uniformVariables; }; -struct OrthographicVertex { +struct Vertex2d { Vector2 position; Vector4 color; }; // Create a triangle struct TriangleObject { - OrthographicVertex vertices[3]; + Vertex2d vertices[3]; Vector2 velocity; Vector2 position; GLuint mVao; @@ -66,13 +66,13 @@ struct TriangleObject { glGenBuffers(1, &mVbo); glBindBuffer(GL_ARRAY_BUFFER, mVbo); - glBufferData(GL_ARRAY_BUFFER, 3 * sizeof(OrthographicVertex), &vertices[0], GL_STATIC_DRAW); + glBufferData(GL_ARRAY_BUFFER, 3 * sizeof(Vertex2d), &vertices[0], GL_STATIC_DRAW); glEnableVertexAttribArray(programData->attributes.position); - glVertexAttribPointer(programData->attributes.position, 2, GL_FLOAT, GL_FALSE, sizeof(OrthographicVertex), (GLvoid *)0); + glVertexAttribPointer(programData->attributes.position, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex2d), (GLvoid *)0); glEnableVertexAttribArray(programData->attributes.color); - glVertexAttribPointer(programData->attributes.color, 4, GL_FLOAT, GL_FALSE, sizeof(OrthographicVertex), (GLvoid *)offsetof(OrthographicVertex, color)); + glVertexAttribPointer(programData->attributes.color, 4, GL_FLOAT, GL_FALSE, sizeof(Vertex2d), (GLvoid *)offsetof(Vertex2d, color)); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); |