diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-03-30 15:01:00 +0100 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-03-30 15:23:05 +0100 |
commit | e218dcfdf2c58f8841e7ebd220527d08e870a6d5 (patch) | |
tree | a567db04a8a51e2db87f80e259faf222a7d4becd /src/graphics/core/vertex.h | |
parent | bfc701e286259d9a7aa2ff8240704eab2ba3a237 (diff) | |
parent | e607fed265070be8c518d4302d8b76f738421fb3 (diff) | |
download | colobot-e218dcfdf2c58f8841e7ebd220527d08e870a6d5.tar.gz colobot-e218dcfdf2c58f8841e7ebd220527d08e870a6d5.tar.bz2 colobot-e218dcfdf2c58f8841e7ebd220527d08e870a6d5.zip |
Merge branch 'dev'
Merging content from dev
Diffstat (limited to 'src/graphics/core/vertex.h')
-rw-r--r-- | src/graphics/core/vertex.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/graphics/core/vertex.h b/src/graphics/core/vertex.h index 2ee6be4..66e1503 100644 --- a/src/graphics/core/vertex.h +++ b/src/graphics/core/vertex.h @@ -44,23 +44,18 @@ namespace Gfx { * - vertex coordinates (x,y,z) as Math::Vector, * - normal coordinates (nx,ny,nz) as Math::Vector * - texture coordinates (u,v) as Math::Point. - * - * Additional padding is provided to align to even multiplies of 4 floats for faster access. */ struct Vertex { Math::Vector coord; - float pad1; Math::Vector normal; - float pad2; Math::Point texCoord; - float pad3, pad4; explicit Vertex(Math::Vector aCoord = Math::Vector(), Math::Vector aNormal = Math::Vector(), Math::Point aTexCoord = Math::Point()) - : coord(aCoord), pad1(0.0f), normal(aNormal), - pad2(0.0f),texCoord(aTexCoord), pad3(0.0f), pad4(0.0f) {} + : coord(aCoord), normal(aNormal), + texCoord(aTexCoord) {} //! Returns a string "(c: [...], n: [...], tc: [...])" @@ -81,18 +76,15 @@ struct Vertex * It contains: * - vertex coordinates (x,y,z) as Math::Vector, * - RGBA color as Color - * - * Additional padding is provided to align to even multiplies of 4 floats for faster access. */ struct VertexCol { Math::Vector coord; - float pad; Color color; explicit VertexCol(Math::Vector aCoord = Math::Vector(), Color aColor = Color()) - : coord(aCoord), pad(0.0f), color(aColor) {} + : coord(aCoord), color(aColor) {} //! Returns a string "(c: [...], col: [...])" inline std::string ToString() const @@ -111,15 +103,11 @@ struct VertexCol * * In addition to fields from Vector, it contains * secondary texture coordinates (u2, v2) as Math::Point - * - * Additional padding is provided to align to even multiplies of 4 floats for faster access. */ struct VertexTex2 { Math::Vector coord; - float pad1; Math::Vector normal; - float pad2; Math::Point texCoord; Math::Point texCoord2; @@ -127,7 +115,7 @@ struct VertexTex2 Math::Vector aNormal = Math::Vector(), Math::Point aTexCoord = Math::Point(), Math::Point aTexCoord2 = Math::Point()) - : coord(aCoord), pad1(0.0f), normal(aNormal), pad2(0.0f), + : coord(aCoord), normal(aNormal), texCoord(aTexCoord), texCoord2(aTexCoord2) {} //! Sets the fields from Vertex with texCoord2 = (0,0) |