Merge remote-tracking branch 'origin/Importer' into Animations
# Conflicts: # resources/Schema/Components.xsd # resources/Schema/Entities/RenderingWorld.xml # src/Engine/Rendering/DrawFinalPass.cpp # src/Engine/Rendering/PickingPass.cpp # src/Engine/Rendering/Skeleton.cpp
This commit is contained in:
@@ -113,6 +113,7 @@ void RenderSystem::fillModels(std::list<std::shared_ptr<RenderJob>>& opaqueJobs,
|
||||
if (cModel["Transparent"]) {
|
||||
transparentJobs.push_back(explosionEffectJob);
|
||||
} else {
|
||||
explosionEffectJob->CalculateHash();
|
||||
opaqueJobs.push_back(explosionEffectJob);
|
||||
}
|
||||
} else {
|
||||
@@ -132,6 +133,7 @@ void RenderSystem::fillModels(std::list<std::shared_ptr<RenderJob>>& opaqueJobs,
|
||||
if (cModel["Transparent"]) {
|
||||
transparentJobs.push_back(modelJob);
|
||||
} else {
|
||||
modelJob->CalculateHash();
|
||||
opaqueJobs.push_back(modelJob);
|
||||
}
|
||||
}
|
||||
@@ -196,7 +198,7 @@ void RenderSystem::fillText(std::list<std::shared_ptr<RenderJob>>& jobs, World*
|
||||
if (texts == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (auto& textComponent : *texts) {
|
||||
bool visible = textComponent["Visible"];
|
||||
if (!visible) {
|
||||
@@ -240,11 +242,19 @@ void RenderSystem::Update(double dt)
|
||||
m_Camera->SetOrientation(Transform::AbsoluteOrientation(m_CurrentCamera));
|
||||
}
|
||||
|
||||
|
||||
RenderScene scene;
|
||||
scene.Camera = m_Camera;
|
||||
scene.Viewport = Rectangle(1280, 720);
|
||||
|
||||
auto cSceneLight = m_World->GetComponents("SceneLight");
|
||||
if (cSceneLight != nullptr && cSceneLight->begin() != cSceneLight->end()) {
|
||||
m_RenderFrame->Gamma = (double)(*cSceneLight->begin())["Gamma"];
|
||||
m_RenderFrame->Exposure = (double)(*cSceneLight->begin())["Exposure"];
|
||||
scene.AmbientColor = (glm::vec4)(*cSceneLight->begin())["AmbientColor"];
|
||||
}
|
||||
|
||||
fillModels(scene.OpaqueObjects, scene.TransparentObjects);
|
||||
scene.OpaqueObjects.sort();
|
||||
fillPointLights(scene.PointLightJobs, m_World);
|
||||
fillDirectionalLights(scene.DirectionalLightJobs, m_World);
|
||||
fillText(scene.TextJobs, m_World);
|
||||
|
||||
Reference in New Issue
Block a user