Merge branch 'nazara-next' of https://github.com/DigitalPulseSoftware/NazaraEngine into nazara-next
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// Copyright (C) 2021 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Prerequisites.hpp
|
||||
|
||||
#include <Nazara/Graphics/Components/GraphicsComponent.hpp>
|
||||
#include <Nazara/Graphics/Debug.hpp>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Graphics/Graphics.hpp>
|
||||
#include <Nazara/Core/ECS.hpp>
|
||||
#include <Nazara/Graphics/MaterialPipeline.hpp>
|
||||
#include <Nazara/Graphics/PredefinedShaderStructs.hpp>
|
||||
#include <stdexcept>
|
||||
@@ -18,6 +19,8 @@ namespace Nz
|
||||
Graphics::Graphics(Config config) :
|
||||
ModuleBase("Graphics", this)
|
||||
{
|
||||
ECS::RegisterComponents();
|
||||
|
||||
Renderer* renderer = Renderer::Instance();
|
||||
|
||||
const std::vector<RenderDeviceInfo>& renderDeviceInfo = renderer->QueryRenderDevices();
|
||||
@@ -42,6 +45,7 @@ namespace Nz
|
||||
|
||||
RenderDeviceFeatures enabledFeatures;
|
||||
enabledFeatures.anisotropicFiltering = renderDeviceInfo[bestRenderDeviceIndex].features.anisotropicFiltering;
|
||||
enabledFeatures.nonSolidFaceFilling = renderDeviceInfo[bestRenderDeviceIndex].features.nonSolidFaceFilling;
|
||||
|
||||
m_renderDevice = renderer->InstanciateRenderDevice(bestRenderDeviceIndex, enabledFeatures);
|
||||
if (!m_renderDevice)
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Nz
|
||||
}
|
||||
}
|
||||
|
||||
void Model::Draw(CommandBufferBuilder& commandBuffer, WorldInstance& instance) const
|
||||
void Model::Draw(CommandBufferBuilder& commandBuffer, const WorldInstance& instance) const
|
||||
{
|
||||
commandBuffer.BindShaderBinding(Graphics::WorldBindingSet, instance.GetShaderBinding());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user