diff options
Diffstat (limited to 'render')
-rw-r--r-- | render/gles2/texture.c | 2 | ||||
-rw-r--r-- | render/gles2/util.c | 38 | ||||
-rw-r--r-- | render/meson.build | 1 |
3 files changed, 1 insertions, 40 deletions
diff --git a/render/gles2/texture.c b/render/gles2/texture.c index 3aa1c005..9ff88b35 100644 --- a/render/gles2/texture.c +++ b/render/gles2/texture.c @@ -27,7 +27,7 @@ struct wlr_gles2_texture *gles2_get_texture( return (struct wlr_gles2_texture *)wlr_texture; } -struct wlr_gles2_texture *get_gles2_texture_in_context( +static struct wlr_gles2_texture *get_gles2_texture_in_context( struct wlr_texture *wlr_texture) { struct wlr_gles2_texture *texture = gles2_get_texture(wlr_texture); if (!wlr_egl_is_current(texture->egl)) { diff --git a/render/gles2/util.c b/render/gles2/util.c deleted file mode 100644 index 3ac777ee..00000000 --- a/render/gles2/util.c +++ /dev/null @@ -1,38 +0,0 @@ -#include <GLES2/gl2.h> -#include <stdbool.h> -#include <stdlib.h> -#include <wlr/util/log.h> -#include "render/gles2.h" - -const char *gles2_strerror(GLenum err) { - switch (err) { - case GL_INVALID_ENUM: - return "Invalid enum"; - case GL_INVALID_VALUE: - return "Invalid value"; - case GL_INVALID_OPERATION: - return "Invalid operation"; - case GL_OUT_OF_MEMORY: - return "Out of memory"; - case GL_INVALID_FRAMEBUFFER_OPERATION: - return "Invalid framebuffer operation"; - default: - return "Unknown error"; - } -} - -bool _gles2_flush_errors(const char *file, int line) { - GLenum err; - bool failure = false; - while ((err = glGetError()) != GL_NO_ERROR) { - failure = true; - if (err == GL_OUT_OF_MEMORY) { - // The OpenGL context is now undefined - _wlr_log(WLR_ERROR, "[%s:%d] Fatal GL error: out of memory", file, line); - exit(1); - } else { - _wlr_log(WLR_ERROR, "[%s:%d] GL error %d %s", file, line, err, gles2_strerror(err)); - } - } - return failure; -} diff --git a/render/meson.build b/render/meson.build index 3f6bfdca..87577aba 100644 --- a/render/meson.build +++ b/render/meson.build @@ -17,7 +17,6 @@ lib_wlr_render = static_library( 'gles2/renderer.c', 'gles2/shaders.c', 'gles2/texture.c', - 'gles2/util.c', 'wlr_renderer.c', 'wlr_texture.c', ), |