Minor fixes

This commit is contained in:
Jérôme Leclercq 2021-11-24 22:29:09 +01:00
parent caf1a0f1e8
commit a33a118ed3
3 changed files with 3 additions and 3 deletions

View File

@ -116,7 +116,7 @@ namespace Nz::GL
virtual ~Context();
void BindBuffer(BufferTarget target, GLuint buffer, bool force = false) const;
GLenum BindFramebuffer(GLuint fbo) const;
[[nodiscard]] GLenum BindFramebuffer(GLuint fbo) const;
void BindFramebuffer(FramebufferTarget target, GLuint fbo) const;
void BindProgram(GLuint program) const;
void BindSampler(UInt32 textureUnit, GLuint sampler) const;

View File

@ -238,8 +238,8 @@ namespace Nz
void Graphics::RegisterMaterialPasses()
{
m_materialPassRegistry.RegisterPass("DepthPass");
m_materialPassRegistry.RegisterPass("ForwardPass");
m_materialPassRegistry.RegisterPass("DepthPass");
}
void Graphics::SelectDepthStencilFormats()

View File

@ -38,7 +38,7 @@ namespace Nz
m_transparentMaterialPass->EnableDepthWrite(false);
m_transparentMaterialPass->EnableBlending(true);
m_transparentMaterialPass->SetBlendEquation(BlendEquation::Add, BlendEquation::Add);
m_transparentMaterialPass->SetBlendFunc(BlendFunc::SrcAlpha, BlendFunc::InvSrcAlpha, BlendFunc::One, BlendFunc::Zero);
m_transparentMaterialPass->SetBlendFunc(BlendFunc::SrcAlpha, BlendFunc::InvSrcAlpha, BlendFunc::One, BlendFunc::One);
m_transparentMaterial = std::make_shared<Material>();
m_transparentMaterial->AddPass("ForwardPass", m_transparentMaterialPass);