This commit is contained in:
Teejoon
2016-02-16 15:56:58 +01:00
parent 969e7cb0d5
commit 17da9a8036
9 changed files with 6612 additions and 7 deletions
+1 -1
View File
@@ -183,7 +183,7 @@ struct ModelJob : RenderJob
void CalculateHash() override
{
Hash = TextureID + ModelID << 10 + ShaderID << 20;
Hash = ShaderID << 20 + ModelID << 10 + TextureID;
}
};
+5 -3
View File
@@ -17,7 +17,7 @@
struct SpriteJob : RenderJob
{
SpriteJob(ComponentWrapper cSprite, Camera* camera, glm::mat4 matrix, World* world, glm::vec4 fillColor, float fillPercentage, bool depthSorted)
SpriteJob(ComponentWrapper cSprite, Camera* camera, glm::mat4 matrix, World* world, glm::vec4 fillColor, float fillPercentage, bool depthSorted, bool isIndicator)
: RenderJob()
{
Model = ResourceManager::Load<::Model>("Models/Core/UnitQuad.mesh");
@@ -30,7 +30,7 @@ struct SpriteJob : RenderJob
StartIndex = matProp.material->StartIndex;
EndIndex = matProp.material->EndIndex;
Matrix = matrix;
Matrix = matrix;
Color = cSprite["Color"];
Entity = cSprite.EntityID;
Position = Transform::AbsolutePosition(world, cSprite.EntityID);
@@ -40,7 +40,7 @@ struct SpriteJob : RenderJob
Depth = viewpos.z;
}
World = world;
IsIndicator = isIndicator;
FillColor = fillColor;
FillPercentage = fillPercentage;
};
@@ -61,6 +61,8 @@ struct SpriteJob : RenderJob
unsigned int EndIndex = 0;
World* World;
bool IsIndicator = false;
glm::vec4 FillColor = glm::vec4(0);
float FillPercentage = 0.0;