From 48ab356910572cf11fc63cae9503afd097215258 Mon Sep 17 00:00:00 2001 From: amy Date: Wed, 22 Nov 2023 21:29:09 +0100 Subject: [PATCH] fix build error --- src/engine/gl/GlShaderModule.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/engine/gl/GlShaderModule.cpp b/src/engine/gl/GlShaderModule.cpp index fe130e4..c688fde 100644 --- a/src/engine/gl/GlShaderModule.cpp +++ b/src/engine/gl/GlShaderModule.cpp @@ -1,18 +1,19 @@ #include "GlShaderModule.h" namespace Vixen::Gl { - GlShaderModule::GlShaderModule(Stage stage, const std::string &source, const std::string &entry) - : ShaderModule(stage, entry, {}, {}), module(0) { + GlShaderModule::GlShaderModule(const Stage stage, const std::string& source, const std::string& entry) + : ShaderModule(stage, entry, {}, {}, {}), + module(0) { switch (stage) { - case Stage::VERTEX: - module = glCreateShader(GL_VERTEX_SHADER); - break; - case Stage::FRAGMENT: - module = glCreateShader(GL_FRAGMENT_SHADER); - break; - default: - spdlog::error("Unsupported shader stage"); - throw std::runtime_error("Unsupported shader stage"); + case Stage::VERTEX: + module = glCreateShader(GL_VERTEX_SHADER); + break; + case Stage::FRAGMENT: + module = glCreateShader(GL_FRAGMENT_SHADER); + break; + default: + spdlog::error("Unsupported shader stage"); + throw std::runtime_error("Unsupported shader stage"); } auto src = source.c_str(); glShaderSource(module, 1, &src, nullptr);