Graphics: Change ParticleStruct_Sprite position and velocity type from Vector2f to Vector3f

Former-commit-id: 8697752459c0f8a99c545ae41eedf6e0382c366e [formerly a855bebde268850fba035f3981e3e907acf33232] [formerly 2894f133ef2b92b49a0642df95393939269ee50b [formerly 348a5a1f8745537e3fb20a0aeac5e89a6f831c19]]
Former-commit-id: 50a4cef7ee7ac3be85cc9ccc6a6b194c4beb79f2 [formerly 49fdda2e6a597ed6251d822ff4b189442c5a9296]
Former-commit-id: ee48615b811e902841ff29529c15a6910fc8e1c1
This commit is contained in:
Lynix 2016-08-03 13:47:17 +02:00
parent ee1bd866ab
commit 66bc8a5dde
2 changed files with 4 additions and 4 deletions

View File

@ -35,8 +35,8 @@ namespace Nz
struct ParticleStruct_Sprite
{
Color color;
Vector2f position;
Vector2f velocity;
Vector3f position;
Vector3f velocity;
UInt32 life;
float rotation;
};

View File

@ -308,9 +308,9 @@ namespace Nz
declaration = &s_declarations[ParticleLayout_Sprite];
declaration->EnableComponent(ParticleComponent_Color, ComponentType_Color, NazaraOffsetOf(ParticleStruct_Sprite, color));
declaration->EnableComponent(ParticleComponent_Life, ComponentType_Int1, NazaraOffsetOf(ParticleStruct_Sprite, life));
declaration->EnableComponent(ParticleComponent_Position, ComponentType_Float2, NazaraOffsetOf(ParticleStruct_Sprite, position));
declaration->EnableComponent(ParticleComponent_Position, ComponentType_Float3, NazaraOffsetOf(ParticleStruct_Sprite, position));
declaration->EnableComponent(ParticleComponent_Rotation, ComponentType_Float1, NazaraOffsetOf(ParticleStruct_Sprite, rotation));
declaration->EnableComponent(ParticleComponent_Velocity, ComponentType_Float2, NazaraOffsetOf(ParticleStruct_Sprite, velocity));
declaration->EnableComponent(ParticleComponent_Velocity, ComponentType_Float3, NazaraOffsetOf(ParticleStruct_Sprite, velocity));
NazaraAssert(declaration->GetStride() == sizeof(ParticleStruct_Sprite), "Invalid stride for declaration ParticleLayout_Sprite");
}