Remade sprite rendering

Added VertexColor shader flag
Added color sprite attribute
Added VertexStruct_XY_Color(_UV) struct & declaration


Former-commit-id: b664f4520aa55f4502f85f9dedab9b92040a8c16
This commit is contained in:
Lynix
2015-01-04 13:19:07 +01:00
parent 97ff9bc4ac
commit 4de17fdffb
22 changed files with 264 additions and 145 deletions

View File

@@ -254,6 +254,8 @@ enum nzVertexLayout
nzVertexLayout_XY,
nzVertexLayout_XY_UV,
nzVertexLayout_XYZ,
nzVertexLayout_XYZ_Color,
nzVertexLayout_XYZ_Color_UV,
nzVertexLayout_XYZ_Normal,
nzVertexLayout_XYZ_Normal_UV,
nzVertexLayout_XYZ_Normal_UV_Tangent,

View File

@@ -7,6 +7,7 @@
#ifndef NAZARA_VERTEXSTRUCT_HPP
#define NAZARA_VERTEXSTRUCT_HPP
#include <Nazara/Core/Color.hpp>
#include <Nazara/Math/Vector2.hpp>
#include <Nazara/Math/Vector3.hpp>
@@ -17,7 +18,7 @@ struct NzVertexStruct_XY
NzVector2f position;
};
struct NzVertexStruct_XY_UV : public NzVertexStruct_XY
struct NzVertexStruct_XY_UV : NzVertexStruct_XY
{
NzVector2f uv;
};
@@ -29,29 +30,39 @@ struct NzVertexStruct_XYZ
NzVector3f position;
};
struct NzVertexStruct_XYZ_Normal : public NzVertexStruct_XYZ
struct NzVertexStruct_XYZ_Color : NzVertexStruct_XYZ
{
NzVector3f normal;
NzColor color;
};
struct NzVertexStruct_XYZ_Normal_UV : public NzVertexStruct_XYZ_Normal
struct NzVertexStruct_XYZ_Color_UV : NzVertexStruct_XYZ_Color
{
NzVector2f uv;
};
struct NzVertexStruct_XYZ_Normal_UV_Tangent : public NzVertexStruct_XYZ_Normal_UV
struct NzVertexStruct_XYZ_Normal : NzVertexStruct_XYZ
{
NzVector3f normal;
};
struct NzVertexStruct_XYZ_Normal_UV : NzVertexStruct_XYZ_Normal
{
NzVector2f uv;
};
struct NzVertexStruct_XYZ_Normal_UV_Tangent : NzVertexStruct_XYZ_Normal_UV
{
NzVector3f tangent;
};
struct NzVertexStruct_XYZ_UV : public NzVertexStruct_XYZ
struct NzVertexStruct_XYZ_UV : NzVertexStruct_XYZ
{
NzVector2f uv;
};
/************************* Structures 3D (+ Skinning) ************************/
struct NzVertexStruct_XYZ_Normal_UV_Tangent_Skinning : public NzVertexStruct_XYZ_Normal_UV_Tangent
struct NzVertexStruct_XYZ_Normal_UV_Tangent_Skinning : NzVertexStruct_XYZ_Normal_UV_Tangent
{
nzInt32 weightCount;