diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-01-26 20:20:58 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-01-26 20:20:58 +0000 |
| commit | 60aa83c683b71badfe4c76c1c18dec1b90c39965 (patch) | |
| tree | ca53535d46acadc5e8298b6cd5bb9f7a352f02c4 | |
| parent | Include GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS in networkCurve output calc (diff) | |
| download | ilt-60aa83c683b71badfe4c76c1c18dec1b90c39965.tar.bz2 ilt-60aa83c683b71badfe4c76c1c18dec1b90c39965.tar.xz ilt-60aa83c683b71badfe4c76c1c18dec1b90c39965.zip | |
Fix warnings and minor tidy for GL lookups
| -rw-r--r-- | gfx/gl/shader.cpp | 12 |
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) : |
