*
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
#include "math/LifeMath.h"
|
||||
|
||||
namespace LifeGraphics
|
||||
{
|
||||
enum VERTEX_FORMAT
|
||||
{
|
||||
VF_POSITION = 0,
|
||||
VF_TEXCOORD = 1 << 0
|
||||
};
|
||||
namespace Vertex
|
||||
{
|
||||
struct SVertex
|
||||
{
|
||||
LifeMath::float3 Position;
|
||||
LifeMath::float2 Texcoord;
|
||||
LifeMath::float3 Normal;
|
||||
static int Stride(){ return sizeof(LifeMath::float3) * 2 + sizeof(LifeMath::float2); }
|
||||
};
|
||||
|
||||
struct SVertexTbn
|
||||
{
|
||||
LifeMath::float3 Position;
|
||||
LifeMath::float2 Texcoord;
|
||||
LifeMath::float3 Normal;
|
||||
LifeMath::float3 Tangent;
|
||||
LifeMath::float3 Binormal;
|
||||
static int Stride(){ return sizeof(LifeMath::float3) * 4 + sizeof(LifeMath::float2); }
|
||||
};
|
||||
|
||||
struct SVertexTbnSkin
|
||||
{
|
||||
LifeMath::float3 Position;
|
||||
LifeMath::float2 Texcoord;
|
||||
LifeMath::float3 Normal;
|
||||
LifeMath::float3 Tangent;
|
||||
LifeMath::float3 Binormal;
|
||||
LifeMath::float4 BlendIndices;
|
||||
LifeMath::float4 BlendWeights;
|
||||
static int Stride(){ return sizeof(LifeMath::float3) * 4 + sizeof(LifeMath::float2) + sizeof(LifeMath::float4) * 2; }
|
||||
};
|
||||
|
||||
/*if(header.expSkin)
|
||||
{
|
||||
numElements = 7;
|
||||
elements = new IInputElement[numElements];
|
||||
elements[0] = IInputElement("POSITION", 0, 0, FORMAT_R32G32B32_FLOAT, 0, 0, 0);
|
||||
elements[1] = IInputElement("TEXCOORD", 0, 12, FORMAT_R32G32_FLOAT, 0, 0, 0);
|
||||
elements[2] = IInputElement("NORMAL", 0, 20, FORMAT_R32G32B32_FLOAT, 0, 0, 0);
|
||||
elements[3] = IInputElement("TANGENT", 0, 32, FORMAT_R32G32B32_FLOAT, 0, 0, 0);
|
||||
elements[4] = IInputElement("BINORMAL", 0, 44, FORMAT_R32G32B32_FLOAT, 0, 0, 0);
|
||||
elements[5] = IInputElement("BLENDINDICES", 0, 56, FORMAT_R32G32B32A32_FLOAT, 0, 0, 0);
|
||||
elements[6] = IInputElement("BLENDWEIGHT", 0, 72, FORMAT_R32G32B32A32_FLOAT, 0, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
elements = new IInputElement[numElements];
|
||||
elements[0] = IInputElement("POSITION", 0, 0, FORMAT_R32G32B32_FLOAT, 0, 0, 0);
|
||||
elements[1] = IInputElement("TEXCOORD", 0, 12, FORMAT_R32G32_FLOAT, 0, 0, 0);
|
||||
elements[2] = IInputElement("NORMAL", 0, 20, FORMAT_R32G32B32_FLOAT, 0, 0, 0);
|
||||
elements[3] = IInputElement("TANGENT", 0, 32, FORMAT_R32G32B32_FLOAT, 0, 0, 0);
|
||||
elements[4] = IInputElement("BINORMAL", 0, 44, FORMAT_R32G32B32_FLOAT, 0, 0, 0);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user