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
@@ -50,7 +50,7 @@ public:
struct TextureProperties { struct TextureProperties {
std::string TexturePath; std::string TexturePath;
glm::vec2 UVRepeat; glm::vec2 UVRepeat;
std::shared_ptr<::Texture> Texture; Texture* Texture;
}; };
struct MaterialBasic struct MaterialBasic
+2 -3
View File
@@ -26,8 +26,7 @@ struct RenderScene
std::list<std::shared_ptr<RenderJob>> OpaqueShieldedObjects; std::list<std::shared_ptr<RenderJob>> OpaqueShieldedObjects;
std::list<std::shared_ptr<RenderJob>> TransparentShieldedObjects; std::list<std::shared_ptr<RenderJob>> TransparentShieldedObjects;
std::list<std::shared_ptr<RenderJob>> ShieldObjects; std::list<std::shared_ptr<RenderJob>> ShieldObjects;
std::list<std::shared_ptr<RenderJob>> SpriteJobs; std::list<std::shared_ptr<RenderJob>> SpriteJob;
std::list<std::shared_ptr<RenderJob>> PointLight; std::list<std::shared_ptr<RenderJob>> PointLight;
std::list<std::shared_ptr<RenderJob>> Text; std::list<std::shared_ptr<RenderJob>> Text;
std::list<std::shared_ptr<RenderJob>> DirectionalLight; std::list<std::shared_ptr<RenderJob>> DirectionalLight;
@@ -44,7 +43,7 @@ struct RenderScene
Jobs.OpaqueShieldedObjects.clear(); Jobs.OpaqueShieldedObjects.clear();
Jobs.TransparentShieldedObjects.clear(); Jobs.TransparentShieldedObjects.clear();
Jobs.ShieldObjects.clear(); Jobs.ShieldObjects.clear();
SpriteJobs.clear(); Jobs.SpriteJob.clear();
Jobs.DirectionalLight.clear(); Jobs.DirectionalLight.clear();
} }
}; };
+4 -4
View File
@@ -21,15 +21,15 @@ struct SpriteJob : RenderJob
: RenderJob() : RenderJob()
{ {
Model = ResourceManager::Load<::Model>("Models/Core/UnitQuad.mesh"); Model = ResourceManager::Load<::Model>("Models/Core/UnitQuad.mesh");
::RawModel::MaterialGroup matGroup = Model->MaterialGroups().front(); ::RawModel::MaterialProperties matProp = Model->MaterialGroups().front();
TextureID = (matGroup.Texture) ? matGroup.Texture->ResourceID : 0; TextureID = 0;
DiffuseTexture = CommonFunctions::LoadTexture(cSprite["DiffuseTexture"], true); DiffuseTexture = CommonFunctions::LoadTexture(cSprite["DiffuseTexture"], true);
IncandescenceTexture = CommonFunctions::LoadTexture(cSprite["GlowMap"], true); IncandescenceTexture = CommonFunctions::LoadTexture(cSprite["GlowMap"], true);
StartIndex = matGroup.StartIndex; StartIndex = matProp.material->StartIndex;
EndIndex = matGroup.EndIndex; EndIndex = matProp.material->EndIndex;
Matrix = matrix; Matrix = matrix;
Color = cSprite["Color"]; Color = cSprite["Color"];
Entity = cSprite.EntityID; Entity = cSprite.EntityID;
+1
View File
@@ -37,4 +37,5 @@
<xs:include schemaLocation="Components/Shield.xsd"/> <xs:include schemaLocation="Components/Shield.xsd"/>
<xs:include schemaLocation="Components/Sprite.xsd"/> <xs:include schemaLocation="Components/Sprite.xsd"/>
<xs:include schemaLocation="Components/Shielded.xsd"/> <xs:include schemaLocation="Components/Shielded.xsd"/>
<xs:include schemaLocation="Components/CampturePointHUD.xsd"/>
</xs:schema> </xs:schema>
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<HealthHUD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CapturePointHUD.xsd"/>
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="CapturePointHUD">
</xs:element>
</xs:schema>
+58 -46
View File
@@ -40,7 +40,7 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="7364.78906" Z="0"/> <Orientation X="0" Y="7364.78955" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -120,11 +120,7 @@
<Children> <Children>
<Entity name="RunAnim"> <Entity name="RunAnim">
<Components> <Components>
<c:Animation> <c:Animation/>
<Name>Run</Name>
<Time>0.79292191744688711</Time>
<Speed>1</Speed>
</c:Animation>
<c:Model> <c:Model>
<Resource>Models/Characters/Assault/AssaultAnimated.mesh</Resource> <Resource>Models/Characters/Assault/AssaultAnimated.mesh</Resource>
</c:Model> </c:Model>
@@ -136,11 +132,7 @@
</Entity> </Entity>
<Entity name="Walkanim"> <Entity name="Walkanim">
<Components> <Components>
<c:Animation> <c:Animation/>
<Name>Walk</Name>
<Time>0.96020137154739604</Time>
<Speed>1</Speed>
</c:Animation>
<c:Model> <c:Model>
<Resource>Models/Characters/Assault/AssaultAnimated.mesh</Resource> <Resource>Models/Characters/Assault/AssaultAnimated.mesh</Resource>
</c:Model> </c:Model>
@@ -188,17 +180,13 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="2019.2854" Z="0"/> <Orientation X="0" Y="2019.28552" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity name="Asset"> <Entity name="Asset">
<Components> <Components>
<c:Animation> <c:Animation/>
<Name>Run</Name>
<Time>0.53173203453812956</Time>
<Speed>1</Speed>
</c:Animation>
<c:Model> <c:Model>
<Resource>Models/Characters/Assault/AssaultAnimated.mesh</Resource> <Resource>Models/Characters/Assault/AssaultAnimated.mesh</Resource>
</c:Model> </c:Model>
@@ -683,7 +671,7 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="316.504944" Z="0"/> <Orientation X="0" Y="316.505096" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -730,7 +718,7 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="316.504944" Z="0"/> <Orientation X="0" Y="316.505096" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -790,7 +778,7 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="316.504944" Z="0"/> <Orientation X="0" Y="316.505096" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -837,7 +825,7 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="316.504944" Z="0"/> <Orientation X="0" Y="316.505096" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -883,7 +871,7 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="316.504944" Z="0"/> <Orientation X="0" Y="316.505096" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -930,7 +918,7 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="316.504944" Z="0"/> <Orientation X="0" Y="316.505096" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -977,7 +965,7 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="316.504944" Z="0"/> <Orientation X="0" Y="316.505096" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -1390,7 +1378,7 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="850.207336" Z="0"/> <Orientation X="0" Y="850.20752" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -1399,7 +1387,7 @@
<c:ExplosionEffect> <c:ExplosionEffect>
<ColorByDistance>true</ColorByDistance> <ColorByDistance>true</ColorByDistance>
<Velocity X="0.800000012" Y="0.0379999988" Z="0"/> <Velocity X="0.800000012" Y="0.0379999988" Z="0"/>
<TimeSinceDeath>0.75102457088592522</TimeSinceDeath> <TimeSinceDeath>0.75134174339666815</TimeSinceDeath>
<ExplosionDuration>3.7999999523162842</ExplosionDuration> <ExplosionDuration>3.7999999523162842</ExplosionDuration>
<EndColor A="0" B="23.5294113" G="11.7647057" R="0"/> <EndColor A="0" B="23.5294113" G="11.7647057" R="0"/>
<Randomness>true</Randomness> <Randomness>true</Randomness>
@@ -1446,7 +1434,7 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="850.207336" Z="0"/> <Orientation X="0" Y="850.20752" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -1455,7 +1443,7 @@
<c:ExplosionEffect> <c:ExplosionEffect>
<Velocity X="0.5" Y="1" Z="0"/> <Velocity X="0.5" Y="1" Z="0"/>
<ExplosionOrigin X="0" Y="0.900000036" Z="0"/> <ExplosionOrigin X="0" Y="0.900000036" Z="0"/>
<TimeSinceDeath>1.2009303215000324</TimeSinceDeath> <TimeSinceDeath>1.2012474940107754</TimeSinceDeath>
</c:ExplosionEffect> </c:ExplosionEffect>
<c:Model> <c:Model>
<Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource> <Resource>Models/Characters/Assault/AssaultTPose.mesh</Resource>
@@ -1498,22 +1486,18 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="850.207336" Z="0"/> <Orientation X="0" Y="850.20752" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity name="Asset"> <Entity name="Asset">
<Components> <Components>
<c:Animation> <c:Animation/>
<Name>Walk</Name>
<Time>0.74121802989810703</Time>
<Speed>1</Speed>
</c:Animation>
<c:ExplosionEffect> <c:ExplosionEffect>
<ColorByDistance>true</ColorByDistance> <ColorByDistance>true</ColorByDistance>
<Velocity X="0.300000012" Y="2" Z="0"/> <Velocity X="0.300000012" Y="2" Z="0"/>
<ExplosionOrigin X="0" Y="1.30000007" Z="-0.200000003"/> <ExplosionOrigin X="0" Y="1.30000007" Z="-0.200000003"/>
<TimeSinceDeath>0.68437610515996361</TimeSinceDeath> <TimeSinceDeath>0.68469327767070653</TimeSinceDeath>
<EndColor A="0" B="0.333333343" G="0.933333337" R="3.92156863"/> <EndColor A="0" B="0.333333343" G="0.933333337" R="3.92156863"/>
<Randomness>true</Randomness> <Randomness>true</Randomness>
</c:ExplosionEffect> </c:ExplosionEffect>
@@ -1558,7 +1542,7 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="857.983765" Z="0"/> <Orientation X="0" Y="857.983948" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -1568,7 +1552,7 @@
<ColorByDistance>true</ColorByDistance> <ColorByDistance>true</ColorByDistance>
<Velocity X="0" Y="0.699999988" Z="0"/> <Velocity X="0" Y="0.699999988" Z="0"/>
<ExplosionOrigin X="0" Y="-1.10000002" Z="0"/> <ExplosionOrigin X="0" Y="-1.10000002" Z="0"/>
<TimeSinceDeath>0.95047462600732735</TimeSinceDeath> <TimeSinceDeath>0.95079179851807027</TimeSinceDeath>
<ExplosionDuration>10</ExplosionDuration> <ExplosionDuration>10</ExplosionDuration>
<EndColor A="1" B="0" G="0" R="1"/> <EndColor A="1" B="0" G="0" R="1"/>
<RandomnessScalar>3</RandomnessScalar> <RandomnessScalar>3</RandomnessScalar>
@@ -1616,7 +1600,7 @@
<Axis X="0" Y="1" Z="0"/> <Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter> </c:RaptorCopter>
<c:Transform> <c:Transform>
<Orientation X="0" Y="456.13559" Z="0"/> <Orientation X="0" Y="456.135742" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
@@ -1626,7 +1610,7 @@
<ColorByDistance>true</ColorByDistance> <ColorByDistance>true</ColorByDistance>
<Velocity X="6" Y="0.100000001" Z="0"/> <Velocity X="6" Y="0.100000001" Z="0"/>
<ExplosionOrigin X="0" Y="-10" Z="0"/> <ExplosionOrigin X="0" Y="-10" Z="0"/>
<TimeSinceDeath>1.350502887383392</TimeSinceDeath> <TimeSinceDeath>1.3508200598941349</TimeSinceDeath>
<ExponentialAccelaration>true</ExponentialAccelaration> <ExponentialAccelaration>true</ExponentialAccelaration>
<ExplosionDuration>5</ExplosionDuration> <ExplosionDuration>5</ExplosionDuration>
<Randomness>true</Randomness> <Randomness>true</Randomness>
@@ -1807,7 +1791,7 @@
<c:ExplosionEffect> <c:ExplosionEffect>
<ColorByDistance>true</ColorByDistance> <ColorByDistance>true</ColorByDistance>
<Velocity X="0.800000012" Y="0.0379999988" Z="0"/> <Velocity X="0.800000012" Y="0.0379999988" Z="0"/>
<TimeSinceDeath>1.3671759474185377</TimeSinceDeath> <TimeSinceDeath>1.3674931199292806</TimeSinceDeath>
<ExplosionDuration>3.7999999523162842</ExplosionDuration> <ExplosionDuration>3.7999999523162842</ExplosionDuration>
<EndColor A="0" B="23.5294113" G="11.7647057" R="0"/> <EndColor A="0" B="23.5294113" G="11.7647057" R="0"/>
<Randomness>true</Randomness> <Randomness>true</Randomness>
@@ -1850,11 +1834,7 @@
</Entity> </Entity>
<Entity name="PlayerModel"> <Entity name="PlayerModel">
<Components> <Components>
<c:Animation> <c:Animation/>
<Name>Hold Pos</Name>
<Time>0.39573681725672838</Time>
<Speed>1</Speed>
</c:Animation>
<c:HiddenForLocalPlayer/> <c:HiddenForLocalPlayer/>
<c:Model> <c:Model>
<Resource>Models/AssaultAnimated.mesh</Resource> <Resource>Models/AssaultAnimated.mesh</Resource>
@@ -1916,7 +1896,8 @@
<Entity name="Bush"> <Entity name="Bush">
<Components> <Components>
<c:Model> <c:Model>
<Resource>Models/BushAlive.mesh</Resource> <Resource>Models/Props/Flora/AliveBush.mesh</Resource>
<Transparent>true</Transparent>
</c:Model> </c:Model>
<c:Transform> <c:Transform>
<Position X="-4.95900011" Y="0" Z="1.29897511"/> <Position X="-4.95900011" Y="0" Z="1.29897511"/>
@@ -1943,6 +1924,37 @@
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="SpriteOrigin">
<Components>
<c:Transform>
<Position X="-24.0121765" Y="1" Z="0"/>
<Orientation X="0" Y="1.45400012" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="Sprite1">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Props/FoliageDiff.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Sprite2">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Props/FoliageDiff.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="-0.177861199" Y="0" Z="-1.04673338"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children> </Children>
</Entity> </Entity>
+1
View File
@@ -41,6 +41,7 @@
<xs:element ref="c:BoneAttachment" minOccurs="0"/> <xs:element ref="c:BoneAttachment" minOccurs="0"/>
<xs:element ref="c:Shield" minOccurs="0"/> <xs:element ref="c:Shield" minOccurs="0"/>
<xs:element ref="c:Shielded" minOccurs="0"/> <xs:element ref="c:Shielded" minOccurs="0"/>
<xs:element ref="c:CapturePointHUD" minOccurs="0"/>
</xs:all> </xs:all>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
+1 -1
View File
@@ -193,7 +193,7 @@ void DrawFinalPass::Draw(RenderScene& scene)
GLERROR("OpaqueObjects"); GLERROR("OpaqueObjects");
DrawModelRenderQueues(scene.Jobs.TransparentObjects, scene); DrawModelRenderQueues(scene.Jobs.TransparentObjects, scene);
GLERROR("TransparentObjects"); GLERROR("TransparentObjects");
DrawSprites(scene.SpriteJobs, scene); DrawSprites(scene.Jobs.SpriteJob, scene);
GLERROR("SpriteJobs"); GLERROR("SpriteJobs");
//DrawStencilState* stencilState = new DrawStencilState(m_FinalPassFrameBuffer.GetHandle()); //DrawStencilState* stencilState = new DrawStencilState(m_FinalPassFrameBuffer.GetHandle());
+9 -38
View File
@@ -10,60 +10,31 @@ Model::Model(std::string fileName)
case RawModel::MaterialType::SingleTextures: case RawModel::MaterialType::SingleTextures:
{ {
RawModel::MaterialSingleTextures* materialSingleTexture = static_cast<RawModel::MaterialSingleTextures*>(materialProperty.material); RawModel::MaterialSingleTextures* materialSingleTexture = static_cast<RawModel::MaterialSingleTextures*>(materialProperty.material);
if (!materialSingleTexture->ColorMap.TexturePath.empty()) { materialSingleTexture->ColorMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->ColorMap.TexturePath, false);
materialSingleTexture->ColorMap.Texture = std::shared_ptr<Texture>(ResourceManager::LoadfixTexture>(materialSingleTexture->ColorMap.TexturePath)); materialSingleTexture->NormalMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->NormalMap.TexturePath, false);
} materialSingleTexture->SpecularMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->SpecularMap.TexturePath, false);
if (!materialSingleTexture->NormalMap.TexturePath.empty()) { materialSingleTexture->IncandescenceMap.Texture = CommonFunctions::LoadTexture(materialSingleTexture->IncandescenceMap.TexturePath, false);
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));
}
} }
break; break;
case RawModel::MaterialType::SplatMapping: case RawModel::MaterialType::SplatMapping:
{ {
RawModel::MaterialSplatMapping* materialSplatMapping = static_cast<RawModel::MaterialSplatMapping*>(materialProperty.material); RawModel::MaterialSplatMapping* materialSplatMapping = static_cast<RawModel::MaterialSplatMapping*>(materialProperty.material);
if (!materialSplatMapping->SplatMap.TexturePath.empty()) { materialSplatMapping->SplatMap.Texture = CommonFunctions::LoadTexture(materialSplatMapping->SplatMap.TexturePath, false);
materialSplatMapping->SplatMap.Texture = std::shared_ptr<Texture>(ResourceManager::Load<Texture>(materialSplatMapping->SplatMap.TexturePath));
}
for (auto& texture : materialSplatMapping->ColorMaps) for (auto& texture : materialSplatMapping->ColorMaps)
{ {
if (!texture.TexturePath.empty()) { texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false);
texture.Texture = std::shared_ptr<Texture>(ResourceManager::Load<Texture>(texture.TexturePath));
}
else {
texture.Texture = nullptr;
}
} }
for (auto& texture : materialSplatMapping->NormalMaps) for (auto& texture : materialSplatMapping->NormalMaps)
{ {
if (!texture.TexturePath.empty()) { texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false);
texture.Texture = std::shared_ptr<Texture>(ResourceManager::Load<Texture>(texture.TexturePath));
} else {
texture.Texture = nullptr;
}
} }
for (auto& texture : materialSplatMapping->SpecularMaps) for (auto& texture : materialSplatMapping->SpecularMaps)
{ {
if (!texture.TexturePath.empty()) { texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false);
texture.Texture = std::shared_ptr<Texture>(ResourceManager::Load<Texture>(texture.TexturePath));
}
else {
texture.Texture = nullptr;
}
} }
for (auto& texture : materialSplatMapping->IncandescenceMaps) for (auto& texture : materialSplatMapping->IncandescenceMaps)
{ {
if (!texture.TexturePath.empty()) { texture.Texture = CommonFunctions::LoadTexture(texture.TexturePath, false);
texture.Texture = std::shared_ptr<Texture>(ResourceManager::Load<Texture>(texture.TexturePath));
}
else {
texture.Texture = nullptr;
}
} }
} }
break; break;
+1 -1
View File
@@ -346,7 +346,7 @@ void RenderSystem::Update(double dt)
fillPointLights(scene.Jobs.PointLight, m_World); fillPointLights(scene.Jobs.PointLight, m_World);
//TODO: Make sure all objects needed are also sorted. //TODO: Make sure all objects needed are also sorted.
scene.Jobs.OpaqueObjects.sort(); scene.Jobs.OpaqueObjects.sort();
fillSprites(scene.SpriteJobs, m_World); fillSprites(scene.Jobs.SpriteJob, m_World);
fillDirectionalLights(scene.Jobs.DirectionalLight, m_World); fillDirectionalLights(scene.Jobs.DirectionalLight, m_World);
fillText(scene.Jobs.Text, m_World); fillText(scene.Jobs.Text, m_World);
m_RenderFrame->Add(scene); 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. //Sort all forward jobs so transparency is good.
scene.Jobs.TransparentObjects.sort(Renderer::DepthSort); 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) void Renderer::GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type)