summaryrefslogtreecommitdiff
path: root/gfx/gl/shader.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-01-26 20:20:58 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2026-01-26 20:20:58 +0000
commit60aa83c683b71badfe4c76c1c18dec1b90c39965 (patch)
treeca53535d46acadc5e8298b6cd5bb9f7a352f02c4 /gfx/gl/shader.cpp
parentInclude GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS in networkCurve output calc (diff)
downloadilt-60aa83c683b71badfe4c76c1c18dec1b90c39965.tar.bz2
ilt-60aa83c683b71badfe4c76c1c18dec1b90c39965.tar.xz
ilt-60aa83c683b71badfe4c76c1c18dec1b90c39965.zip
Fix warnings and minor tidy for GL lookups
Diffstat (limited to 'gfx/gl/shader.cpp')
-rw-r--r--gfx/gl/shader.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/gfx/gl/shader.cpp b/gfx/gl/shader.cpp
index 21edadb..cc6473e 100644
--- a/gfx/gl/shader.cpp
+++ b/gfx/gl/shader.cpp
@@ -8,18 +8,18 @@
namespace {
auto
- getInt(GLenum e)
+ getInt(GLenum pname)
{
- GLint i {};
- glGetIntegerv(e, &i);
- return std::to_string(i);
+ GLint data {};
+ glGetIntegerv(pname, &data);
+ return std::to_string(data);
}
using LookUpFunction = std::string (*)(GLenum);
- constexpr std::array<std::tuple<std::string_view, GLenum, LookUpFunction>, 2> LOOKUPS {{
+ constexpr auto LOOKUPS = std::to_array<std::tuple<std::string_view, GLenum, LookUpFunction>>({
{"GL_MAX_GEOMETRY_OUTPUT_VERTICES", GL_MAX_GEOMETRY_OUTPUT_VERTICES, getInt},
{"GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS", GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS, getInt},
- }};
+ });
struct ShaderCompileError : public MsgException<std::invalid_argument> {
explicit ShaderCompileError(GLuint shader, Shader::Source src) :