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

@@ -103,29 +103,15 @@ void NzDeferredRenderQueue::AddMesh(const NzMaterial* material, const NzMeshData
}
}
void NzDeferredRenderQueue::AddSprite(const NzSprite* sprite)
void NzDeferredRenderQueue::AddSprites(const NzMaterial* material, const NzVertexStruct_XYZ_Color_UV* vertices, unsigned int spriteCount)
{
#if NAZARA_GRAPHICS_SAFE
if (!sprite)
{
NazaraError("Invalid sprite");
return;
}
if (!sprite->IsDrawable())
{
NazaraError("Sprite is not drawable");
return;
}
#endif
/*NzMaterial* material = sprite->GetMaterial();
if (!material->IsLightingEnabled() || material->IsEnabled(nzRendererParameter_Blend))
m_forwardQueue->AddSprite(sprite);
else
sprites[material].push_back(sprite);*/
m_forwardQueue->AddSprite(sprite);
m_forwardQueue->AddSprites(material, vertices, spriteCount);
}
void NzDeferredRenderQueue::Clear(bool fully)