diff options
| author | hachem <im@hachem.wtf> | 2026-08-24 17:07:54 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-24 17:07:54 +0200 |
| commit | 06398a7a176e123506de6e8851866a8bec0b3427 (patch) | |
| tree | 7167ef4818f2c224840122961882efb5ec26c80b /src/platform | |
| parent | 1c85c2ecaa826afd8bf80f93741cf1b2deba5798 (diff) | |
[chore]: cleanup shaders
Diffstat (limited to 'src/platform')
| -rw-r--r-- | src/platform/opengl/opengl_device.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/platform/opengl/opengl_device.cpp b/src/platform/opengl/opengl_device.cpp index 7ef0ba1..614e515 100644 --- a/src/platform/opengl/opengl_device.cpp +++ b/src/platform/opengl/opengl_device.cpp @@ -120,11 +120,17 @@ namespace Donut::RHI { GLuint bi = glGetUniformBlockIndex(m_prog, r.name.c_str()); if (bi != GL_INVALID_INDEX) glUniformBlockBinding(m_prog, bi, r.binding); + // Not found: the ConstantBuffer<> type name in the shader no longer + // matches this resource string, so the UBO silently won't bind. + else DONUT_WARN("GL RHI: shader '{}' has no uniform block '{}' (binding {})", + d.shader, r.name, r.binding); } else // Texture: point the sampler at texture unit == binding { GLint loc = glGetUniformLocation(m_prog, r.name.c_str()); if (loc >= 0) glUniform1i(loc, (GLint)r.binding); + else DONUT_WARN("GL RHI: shader '{}' has no sampler '{}' (unit {})", + d.shader, r.name, r.binding); } } glUseProgram(0); |
