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:
@@ -205,6 +205,21 @@ bool NzVertexDeclaration::Initialize()
|
||||
|
||||
NazaraAssert(declaration->GetStride() == sizeof(NzVertexStruct_XYZ), "Invalid stride for declaration nzVertexLayout_XYZ");
|
||||
|
||||
// nzVertexLayout_XYZ_Color : NzVertexStruct_XYZ_Color
|
||||
declaration = &s_declarations[nzVertexLayout_XYZ_Color_UV];
|
||||
declaration->EnableComponent(nzVertexComponent_Position, nzComponentType_Float3, NzOffsetOf(NzVertexStruct_XYZ_Color, position));
|
||||
declaration->EnableComponent(nzVertexComponent_Color, nzComponentType_Color, NzOffsetOf(NzVertexStruct_XYZ_Color, color));
|
||||
|
||||
NazaraAssert(declaration->GetStride() == sizeof(NzVertexStruct_XYZ_Color), "Invalid stride for declaration nzVertexLayout_XYZ_Color");
|
||||
|
||||
// nzVertexLayout_XYZ_Color_UV : NzVertexStruct_XYZ_Color_UV
|
||||
declaration = &s_declarations[nzVertexLayout_XYZ_Color_UV];
|
||||
declaration->EnableComponent(nzVertexComponent_Position, nzComponentType_Float3, NzOffsetOf(NzVertexStruct_XYZ_Color_UV, position));
|
||||
declaration->EnableComponent(nzVertexComponent_Color, nzComponentType_Color, NzOffsetOf(NzVertexStruct_XYZ_Color_UV, color));
|
||||
declaration->EnableComponent(nzVertexComponent_TexCoord, nzComponentType_Float2, NzOffsetOf(NzVertexStruct_XYZ_Color_UV, uv));
|
||||
|
||||
NazaraAssert(declaration->GetStride() == sizeof(NzVertexStruct_XYZ_Color_UV), "Invalid stride for declaration nzVertexLayout_XYZ_Color_UV");
|
||||
|
||||
// nzVertexLayout_XYZ_Normal : NzVertexStruct_XYZ_Normal
|
||||
declaration = &s_declarations[nzVertexLayout_XYZ_Normal];
|
||||
declaration->EnableComponent(nzVertexComponent_Position, nzComponentType_Float3, NzOffsetOf(NzVertexStruct_XYZ_Normal, position));
|
||||
|
||||
Reference in New Issue
Block a user