DX sprites and stuff I guess

This commit is contained in:
2015-10-19 17:47:58 +02:00
parent 1abee730ec
commit 4a3575190f
6 changed files with 156 additions and 29 deletions
+2 -2
View File
@@ -225,7 +225,7 @@ public:
transform->Sticky = false;
auto model = m_World->AddComponent<Components::Model>(t_halfPipe);
model->ModelFile = "Models/Test/halfpipe/Halfpipe.obj";
model->Color = glm::vec4(0.8f, 0.8f, 0.8f, 0.3f);
model->Color = glm::vec4(0.8f, 0.8f, 0.8f, 1.f);
m_World->CommitEntity(t_halfPipe);
}
{
@@ -236,7 +236,7 @@ public:
transform->Sticky = false;
auto model = m_World->AddComponent<Components::Model>(t_halfPipe);
model->ModelFile = "Models/Test/halfpipe/Halfpipe.obj";
model->Color = glm::vec4(0.8f, 0.8f, 0.8f, 0.3f);
model->Color = glm::vec4(0.8f, 0.8f, 0.8f, 1.f);
m_World->CommitEntity(t_halfPipe);
}
+10 -1
View File
@@ -56,14 +56,23 @@ private:
Matrix ViewMatrix;
Matrix ProjectionMatrix;
Matrix InverseTransposeViewModel;
Vector3 LightPosition;
Vector4 Color;
Vector4 LightPositions[10];
Vector4 LightColors[10];
float LightRadii[10];
unsigned int NumLights;
float paddingBitch;
} constantBufferStruct;
ShaderProgram* shaderProgram = nullptr;
ID3D11Buffer* constantBuffer = nullptr;
Model* m_UnitQuad = nullptr;
Texture* m_WhiteSphereTexture = nullptr;
static DirectX::SimpleMath::Matrix GLMtoDXModelView(glm::mat4 m);
static DirectX::SimpleMath::Matrix GLMtoDXProjection(glm::mat4 m);
static bool DepthSort(const std::shared_ptr<RenderJob> &i, const std::shared_ptr<RenderJob> &j) { return (i->Depth < j->Depth); }
};
}