aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/graphics/je_mesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/graphics/je_mesh.cpp')
-rw-r--r--src/libjin/graphics/je_mesh.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libjin/graphics/je_mesh.cpp b/src/libjin/graphics/je_mesh.cpp
index b96a4ff..d220bcb 100644
--- a/src/libjin/graphics/je_mesh.cpp
+++ b/src/libjin/graphics/je_mesh.cpp
@@ -24,8 +24,8 @@ namespace JinEngine
void Mesh::pushVertex(float x, float y, float u, float v, Color color)
{
Vertex vert;
- vert.xy.x = x; vert.xy.y = y;
- vert.uv.u = u; vert.uv.v = v;
+ vert.xy.x() = x; vert.xy.y() = y;
+ vert.uv.u() = u; vert.uv.v() = v;
vert.color = color;
pushVertex(vert);
}
@@ -37,14 +37,14 @@ namespace JinEngine
if (mVertices.size() == 2)
{
const Vertex& v0 = mVertices[0];
- mBound.l = min(v0.xy.x, vert.xy.x);
- mBound.r = max(v0.xy.x, vert.xy.x);
- mBound.t = min(v0.xy.y, vert.xy.y);
- mBound.b = max(v0.xy.y, vert.xy.y);
+ mBound.l = min(v0.xy.x(), vert.xy.x());
+ mBound.r = max(v0.xy.x(), vert.xy.x());
+ mBound.t = min(v0.xy.y(), vert.xy.y());
+ mBound.b = max(v0.xy.y(), vert.xy.y());
}
else
{
- float x = vert.xy.x, y = vert.xy.y;
+ float x = vert.xy.x(), y = vert.xy.y();
mBound.l = x < mBound.l ? x : mBound.l;
mBound.r = x > mBound.r ? x : mBound.r;
mBound.t = y < mBound.t ? y : mBound.t;