Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Outputs/Log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ enum class Source {
MSX,
NCR5380,
OpenGL,
OpenGLUniforms,
PCCompatible,
PCPOST,
PIC,
Expand Down Expand Up @@ -120,6 +121,7 @@ constexpr EnabledLevel enabled_level(const Source source) {
case Source::SCSI:
case Source::I2C:
// case Source::PCPOST:
case Source::OpenGLUniforms:
return EnabledLevel::None;

case Source::Floppy:
Expand Down Expand Up @@ -167,6 +169,7 @@ constexpr const char *prefix(const Source source) {
case Source::MSX: return "MSX";
case Source::NCR5380: return "5380";
case Source::OpenGL: return "OpenGL";
case Source::OpenGLUniforms: return "OpenGL Uniforms";
case Source::Plus4: return "Plus4";
case Source::PCCompatible: return "PC";
case Source::PCPOST: return "POST";
Expand Down
3 changes: 2 additions & 1 deletion Outputs/OpenGL/Primitives/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ using namespace Outputs::Display::OpenGL;
namespace {
thread_local const Shader *bound_shader = nullptr;
using Logger = Log::Logger<Log::Source::OpenGL>;
using UniformsLogger = Log::Logger<Log::Source::OpenGLUniforms>;
}

GLuint Shader::compile_shader(const std::string &source, const GLenum type) {
Expand Down Expand Up @@ -228,7 +229,7 @@ requires std::invocable<FuncT, GLint>
void Shader::with_location(const std::string &name, FuncT &&function) {
const GLint location = glGetUniformLocation(shader_program_, name.c_str());
if(location == -1) {
Logger::error().append("Couldn't get location for uniform %s", name.c_str());
UniformsLogger::info().append("Couldn't get location for uniform %s", name.c_str());
} else {
bind();
function(location);
Expand Down
Loading