Minor stuff
This commit is contained in:
parent
f5dac32020
commit
7aafcfaae9
|
|
@ -20,6 +20,7 @@ namespace Nz
|
|||
struct UniformOffsets;
|
||||
|
||||
BasicMaterial(MaterialPass& material);
|
||||
~BasicMaterial() = default;
|
||||
|
||||
inline void EnableAlphaTest(bool alphaTest);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace Nz
|
|||
namespace
|
||||
{
|
||||
const UInt8 r_shader[] = {
|
||||
#include <Nazara/Graphics/Resources/Shaders/basicmaterial.nzsl.h>
|
||||
#include <Nazara/Graphics/Resources/Shaders/basic_material.nzsl.h>
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ namespace Nz
|
|||
}
|
||||
|
||||
RenderPipelineInfo renderPipelineInfo;
|
||||
static_cast<RenderStates&>(renderPipelineInfo).operator=(m_pipelineInfo); // Not my proudest line
|
||||
static_cast<RenderStates&>(renderPipelineInfo).operator=(m_pipelineInfo); // Not the line I4m the most proud of
|
||||
|
||||
renderPipelineInfo.pipelineLayout = m_pipelineInfo.settings->GetRenderPipelineLayout();
|
||||
|
||||
|
|
@ -58,6 +58,7 @@ namespace Nz
|
|||
|
||||
return m_renderPipelines.emplace_back(Graphics::Instance()->GetRenderDevice()->InstantiateRenderPipeline(std::move(renderPipelineInfo)));
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns a reference to a MaterialPipeline built with MaterialPipelineInfo
|
||||
*
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace Nz
|
|||
ShaderAst::AstReflect reflect;
|
||||
reflect.Reflect(*m_shaderAst, callbacks);
|
||||
|
||||
if (m_shaderStages & shaderStages != m_shaderStages)
|
||||
if (m_shaderStages & supportedStageType != m_shaderStages)
|
||||
throw std::runtime_error("shader doesn't support all required shader stages");
|
||||
|
||||
if (optionCount >= 64)
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ namespace Nz
|
|||
CheckCompilationStatus(shader);
|
||||
|
||||
program.AttachShader(shader.GetObjectId());
|
||||
// Shader can be deleted now (it won't be deleted by the driver until program gets deleted)
|
||||
// Shader object can be safely released now (it won't be deleted by the driver until program gets deleted)
|
||||
|
||||
stageFlags |= shaderEntry.stage;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -679,7 +679,7 @@ namespace Nz::GL
|
|||
|
||||
bool Context::SetCurrentContext(const Context* context)
|
||||
{
|
||||
const Context*& currentContext = s_currentContext; //< Pay TLS cost only once
|
||||
const Context*& currentContext = s_currentContext; //< Pay TLS cost once
|
||||
if (currentContext == context)
|
||||
return true;
|
||||
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ namespace Nz
|
|||
{
|
||||
assert(stagePtr);
|
||||
|
||||
Nz::VulkanShaderModule& vulkanModule = *static_cast<Nz::VulkanShaderModule*>(stagePtr.get());
|
||||
VulkanShaderModule& vulkanModule = static_cast<VulkanShaderModule&>(*stagePtr);
|
||||
for (auto& stage : vulkanModule.GetStages())
|
||||
{
|
||||
VkPipelineShaderStageCreateInfo& createInfo = shaderStageCreateInfos.emplace_back();
|
||||
|
|
|
|||
Loading…
Reference in New Issue