aboutsummaryrefslogtreecommitdiff
path: root/src/platform/opengl
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-24 17:07:54 +0200
committerhachem <im@hachem.wtf>2026-08-24 17:07:54 +0200
commit06398a7a176e123506de6e8851866a8bec0b3427 (patch)
tree7167ef4818f2c224840122961882efb5ec26c80b /src/platform/opengl
parent1c85c2ecaa826afd8bf80f93741cf1b2deba5798 (diff)
[chore]: cleanup shaders
Diffstat (limited to 'src/platform/opengl')
-rw-r--r--src/platform/opengl/opengl_device.cpp6
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);