Merge fixes and CapturePointHUD component skeleton added.

This commit is contained in:
Tleety
2016-02-10 20:58:10 +01:00
parent 2cae4e3fb2
commit f5de267f25
12 changed files with 87 additions and 95 deletions
+1 -1
View File
@@ -193,7 +193,7 @@ void DrawFinalPass::Draw(RenderScene& scene)
GLERROR("OpaqueObjects");
DrawModelRenderQueues(scene.Jobs.TransparentObjects, scene);
GLERROR("TransparentObjects");
DrawSprites(scene.SpriteJobs, scene);
DrawSprites(scene.Jobs.SpriteJob, scene);
GLERROR("SpriteJobs");
//DrawStencilState* stencilState = new DrawStencilState(m_FinalPassFrameBuffer.GetHandle());
+9 -38
View File
@@ -10,60 +10,31 @@ Model::Model(std::string fileName)
case RawModel::MaterialType::SingleTextures:
{
RawModel::MaterialSingleTextures* materialSingleTexture = static_cast<RawModel::MaterialSingleTextures*>(materialProperty.material);
if (!materialSingleTexture->ColorMap.TexturePath.empty()) {
materialSingleTexture->ColorMap.Texture = std::shared_ptr<Texture>(ResourceManager::LoadfixTexture>(materialSingleTexture->ColorMap.TexturePath));
}
if (!materialSingleTexture->NormalMap.TexturePath.empty()) {
materialSingleTexture->NormalMap.Texture = std::shared_ptr<Texture>(ResourceManager::LoadfixTexture>(materialSingleTexture->NormalMap.TexturePath));
}
if (!materialSingleTexture->SpecularMap.TexturePath.empty()) {
materialSingleTexture->SpecularMap.Texture = std::shared_ptr<Texture>(ResourceManager::LoadfixTexture>(materialSingleTexture->SpecularMap.TexturePath));
}
if (!materialSingleTexture->IncandescenceMap.TexturePath.empty()) {
materialSingleTexture->IncandescenceMap.Texture = std::shared_ptr<Texture>(ResourceManager::LoadfixTexture>(materialSingleTexture->IncandescenceMap.TexturePath));
}
materialSingleTexture->ColorMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->ColorMap.TexturePath, false);
materialSingleTexture->NormalMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->NormalMap.TexturePath, false);
materialSingleTexture->SpecularMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->SpecularMap.TexturePath, false);
materialSingleTexture->IncandescenceMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->IncandescenceMap.TexturePath, false);
}
break;
case RawModel::MaterialType::SplatMapping:
{
RawModel::MaterialSplatMapping* materialSplatMapping = static_cast<RawModel::MaterialSplatMapping*>(materialProperty.material);
if (!materialSplatMapping->SplatMap.TexturePath.empty()) {
materialSplatMapping->SplatMap.Texture = std::shared_ptr<Texture>(ResourceManager::Load<Texture>(materialSplatMapping->SplatMap.TexturePath));
}
materialSplatMapping->SplatMap.Texture = CommonFunctions::LoadTexture(materialSplatMapping->SplatMap.TexturePath, false);
for (auto& texture : materialSplatMapping->ColorMaps)
{
if (!texture.TexturePath.empty()) {
texture.Texture = std::shared_ptr<Texture>(ResourceManager::Load<Texture>(texture.TexturePath));
}
else {
texture.Texture = nullptr;
}
texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false);
}
for (auto& texture : materialSplatMapping->NormalMaps)
{
if (!texture.TexturePath.empty()) {
texture.Texture = std::shared_ptr<Texture>(ResourceManager::Load<Texture>(texture.TexturePath));
} else {
texture.Texture = nullptr;
}
texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false);
}
for (auto& texture : materialSplatMapping->SpecularMaps)
{
if (!texture.TexturePath.empty()) {
texture.Texture = std::shared_ptr<Texture>(ResourceManager::Load<Texture>(texture.TexturePath));
}
else {
texture.Texture = nullptr;
}
texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false);
}
for (auto& texture : materialSplatMapping->IncandescenceMaps)
{
if (!texture.TexturePath.empty()) {
texture.Texture = std::shared_ptr<Texture>(ResourceManager::Load<Texture>(texture.TexturePath));
}
else {
texture.Texture = nullptr;
}
texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false);
}
}
break;
+1 -1
View File
@@ -346,7 +346,7 @@ void RenderSystem::Update(double dt)
fillPointLights(scene.Jobs.PointLight, m_World);
//TODO: Make sure all objects needed are also sorted.
scene.Jobs.OpaqueObjects.sort();
fillSprites(scene.SpriteJobs, m_World);
fillSprites(scene.Jobs.SpriteJob, m_World);
fillDirectionalLights(scene.Jobs.DirectionalLight, m_World);
fillText(scene.Jobs.Text, m_World);
m_RenderFrame->Add(scene);
+1 -1
View File
@@ -167,7 +167,7 @@ void Renderer::SortRenderJobsByDepth(RenderScene &scene)
{
//Sort all forward jobs so transparency is good.
scene.Jobs.TransparentObjects.sort(Renderer::DepthSort);
scene.SpriteJobs.sort(Renderer::DepthSort);
scene.Jobs.SpriteJob.sort(Renderer::DepthSort);
}
void Renderer::GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type)