From: Mikko Rasa Date: Wed, 10 Nov 2021 14:12:42 +0000 (+0200) Subject: Minor tweaks X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=d279ad43486e287d4fe7e759e31b026949021260 Minor tweaks --- diff --git a/source/backends/opengl/batch_backend.cpp b/source/backends/opengl/batch_backend.cpp index f44d6b82..d80c11cc 100644 --- a/source/backends/opengl/batch_backend.cpp +++ b/source/backends/opengl/batch_backend.cpp @@ -5,7 +5,7 @@ namespace Msp { namespace GL { OpenGLBatch::OpenGLBatch(PrimitiveType t): - gl_prim_type(GL::get_gl_primitive_type(t)), + gl_prim_type(get_gl_primitive_type(t)), gl_index_type(GL_UNSIGNED_SHORT) { } diff --git a/source/backends/opengl/pixelformat_backend.cpp b/source/backends/opengl/pixelformat_backend.cpp index ee1a2070..7e2a61ea 100644 --- a/source/backends/opengl/pixelformat_backend.cpp +++ b/source/backends/opengl/pixelformat_backend.cpp @@ -65,7 +65,7 @@ void require_pixelformat(PixelFormat pf) } } -GLenum get_gl_components(PixelComponents comp) +unsigned get_gl_components(PixelComponents comp) { switch(comp) { @@ -79,7 +79,7 @@ GLenum get_gl_components(PixelComponents comp) } } -GLenum get_gl_pixelformat(PixelFormat pf) +unsigned get_gl_pixelformat(PixelFormat pf) { switch(pf) { diff --git a/source/backends/opengl/sampler_backend.cpp b/source/backends/opengl/sampler_backend.cpp index 915dda68..85d278d3 100644 --- a/source/backends/opengl/sampler_backend.cpp +++ b/source/backends/opengl/sampler_backend.cpp @@ -60,7 +60,7 @@ void OpenGLSampler::update(unsigned mask) const void OpenGLSampler::set_debug_name(const string &name) { #ifdef DEBUG - if(id && KHR_debug) + if(KHR_debug) glObjectLabel(GL_SAMPLER, id, name.size(), name.c_str()); #else (void)name;