Minor fixes

This commit is contained in:
Jérôme Leclercq 2022-02-04 13:54:26 +01:00
parent 6b2ac18feb
commit 6457854e03
7 changed files with 13 additions and 14 deletions

View File

@ -67,7 +67,7 @@ namespace Nz
inline void SetReadInput(std::size_t inputIndex, bool doesRead);
FramePass& operator=(const FramePass&) = delete;
FramePass& operator=(FramePass&&) noexcept = default;
FramePass& operator=(FramePass&&) = delete;
static constexpr std::size_t InvalidAttachmentId = std::numeric_limits<std::size_t>::max();
@ -97,7 +97,6 @@ namespace Nz
std::string m_name;
std::vector<Input> m_inputs;
std::vector<Output> m_outputs;
FrameGraph& m_owner;
CommandCallback m_commandCallback;
ExecutionCallback m_executionCallback;
};

View File

@ -8,12 +8,11 @@
namespace Nz
{
inline FramePass::FramePass(FrameGraph& owner, std::size_t passId, std::string name) :
inline FramePass::FramePass(FrameGraph& /*owner*/, std::size_t passId, std::string name) :
m_depthStencilInput(InvalidAttachmentId),
m_depthStencilOutput(InvalidAttachmentId),
m_passId(passId),
m_name(std::move(name)),
m_owner(owner)
m_name(std::move(name))
{
}

View File

@ -9,6 +9,7 @@ namespace Nz
{
inline InstancedRenderable::InstancedRenderable() :
m_aabb(Boxf::Zero()),
m_scissorBox(-1, -1, -1, -1),
m_renderLayer(0)
{
}

View File

@ -445,7 +445,7 @@ namespace Nz
plane[2] *= invLength;
plane[3] *= -invLength;
planes[UnderlyingCast(FrustumPlane::Right)] = Plane(plane);
planes[UnderlyingCast(FrustumPlane::Right)] = Plane<T>(plane);
// Extract the numbers for the LEFT plane
plane[0] = viewProjMatrix[3] + viewProjMatrix[0];
@ -460,7 +460,7 @@ namespace Nz
plane[2] *= invLength;
plane[3] *= -invLength;
planes[UnderlyingCast(FrustumPlane::Left)] = Plane(plane);
planes[UnderlyingCast(FrustumPlane::Left)] = Plane<T>(plane);
// Extract the BOTTOM plane
plane[0] = viewProjMatrix[3] + viewProjMatrix[1];
@ -475,7 +475,7 @@ namespace Nz
plane[2] *= invLength;
plane[3] *= -invLength;
planes[UnderlyingCast(FrustumPlane::Bottom)] = Plane(plane);
planes[UnderlyingCast(FrustumPlane::Bottom)] = Plane<T>(plane);
// Extract the TOP plane
plane[0] = viewProjMatrix[3] - viewProjMatrix[1];
@ -490,7 +490,7 @@ namespace Nz
plane[2] *= invLength;
plane[3] *= -invLength;
planes[UnderlyingCast(FrustumPlane::Top)] = Plane(plane);
planes[UnderlyingCast(FrustumPlane::Top)] = Plane<T>(plane);
// Extract the FAR plane
plane[0] = viewProjMatrix[3] - viewProjMatrix[2];
@ -505,7 +505,7 @@ namespace Nz
plane[2] *= invLength;
plane[3] *= -invLength;
planes[UnderlyingCast(FrustumPlane::Far)] = Plane(plane);
planes[UnderlyingCast(FrustumPlane::Far)] = Plane<T>(plane);
// Extract the NEAR plane
plane[0] = viewProjMatrix[3] + viewProjMatrix[2];
@ -520,7 +520,7 @@ namespace Nz
plane[2] *= invLength;
plane[3] *= -invLength;
planes[UnderlyingCast(FrustumPlane::Near)] = Plane(plane);
planes[UnderlyingCast(FrustumPlane::Near)] = Plane<T>(plane);
return Frustum(planes);
}

View File

@ -29,7 +29,7 @@ namespace Nz
const std::shared_ptr<RenderPass>& Get(const std::vector<RenderPass::Attachment>& attachments, const std::vector<RenderPass::SubpassDescription>& subpassDescriptions, const std::vector<RenderPass::SubpassDependency>& subpassDependencies) const;
RenderPassCache& operator=(const RenderPassCache&) = delete;
RenderPassCache& operator=(RenderPassCache&&) noexcept = default;
RenderPassCache& operator=(RenderPassCache&&) = delete;
private:
struct RenderPassData

View File

@ -52,8 +52,8 @@ namespace Nz
private:
std::shared_ptr<Buffer> m_buffer;
UInt32 m_indexCount;
UInt64 m_endOffset;
UInt64 m_indexCount;
UInt64 m_startOffset;
bool m_largeIndices;
};

View File

@ -777,7 +777,7 @@ namespace Nz
forwardPass.AddOutput(renderTargetData.finalAttachment);
forwardPass.SetClearColor(0, Color::Black);
forwardPass.SetCommandCallback([this, &targetViewers](CommandBufferBuilder& builder, const Recti& renderRect)
forwardPass.SetCommandCallback([&targetViewers](CommandBufferBuilder& builder, const Recti& renderRect)
{
builder.SetScissor(renderRect);
builder.SetViewport(renderRect);