Skip to content

Commit 6fd3a69

Browse files
committed
cleaned up code
1 parent f6857ca commit 6fd3a69

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

examples/example_glfw3.cpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -197,32 +197,32 @@ int main()
197197
using Idx = Vector3<std::uint32_t>;
198198

199199
// front (z+)
200-
ebo.emplace_back(Idx{1, 5, 7});
201-
ebo.emplace_back(Idx{1, 7, 3});
200+
ebo.emplace_back(1, 5, 7);
201+
ebo.emplace_back(1, 7, 3);
202202

203203
// back (z-)
204-
ebo.emplace_back(Idx{0, 2, 6});
205-
ebo.emplace_back(Idx{0, 6, 4});
204+
ebo.emplace_back(0, 2, 6);
205+
ebo.emplace_back(0, 6, 4);
206206

207207
// left (x-)
208-
ebo.emplace_back(Idx{0, 1, 3});
209-
ebo.emplace_back(Idx{0, 3, 2});
208+
ebo.emplace_back(0, 1, 3);
209+
ebo.emplace_back(0, 3, 2);
210210

211211
// right (x+)
212-
ebo.emplace_back(Idx{4, 6, 7});
213-
ebo.emplace_back(Idx{4, 7, 5});
212+
ebo.emplace_back(4, 6, 7);
213+
ebo.emplace_back(4, 7, 5);
214214

215215
// bottom (y-)
216-
ebo.emplace_back(Idx{0, 4, 5});
217-
ebo.emplace_back(Idx{0, 5, 1});
216+
ebo.emplace_back(0, 4, 5);
217+
ebo.emplace_back(0, 5, 1);
218218

219219
// top (y+)
220-
ebo.emplace_back(Idx{2, 3, 7});
221-
ebo.emplace_back(Idx{2, 7, 6});
220+
ebo.emplace_back(2, 3, 7);
221+
ebo.emplace_back(2, 7, 6);
222222

223223
CubeMesh cube{std::move(vbo), std::move(ebo)};
224-
cube.set_origin(Vector3<float>{0.f, 0.f, 0.f});
225-
cube.set_scale(Vector3<float>{1.f, 2.f, 1.f});
224+
cube.set_origin({0.f, 0.f, 0.f});
225+
cube.set_scale({1.f, 2.f, 1.f});
226226
cube.set_rotation(RotationAngles{});
227227

228228
// ---------- OpenGL buffers ----------
@@ -313,7 +313,6 @@ int main()
313313
glUseProgram(shaderProgram);
314314

315315
// Send matrix to GPU
316-
// TODO: replace mvp.data() with whatever your Mat4x4 uses to expose float*
317316
const float* mvpPtr = viewProj.raw_array().data(); // assumes column-major float[16]
318317

319318
glUniformMatrix4fv(uMvpLoc, 1, GL_FALSE, mvpPtr);

0 commit comments

Comments
 (0)