From c4707cdee66ebb3023ed97e033df7c68d147c17d Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 23 May 2016 21:25:43 +0200 Subject: [PATCH] vo_opengl: fix other minor namespace issues See previous commit. --- video/out/opengl/hwdec_vdpau.c | 6 +++--- video/out/opengl/utils.c | 8 ++++---- video/out/opengl/utils.h | 4 ++-- video/out/opengl/video.c | 4 ++-- video/out/vo_opengl.c | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/video/out/opengl/hwdec_vdpau.c b/video/out/opengl/hwdec_vdpau.c index 7f61134376..f0bc4a6cdd 100644 --- a/video/out/opengl/hwdec_vdpau.c +++ b/video/out/opengl/hwdec_vdpau.c @@ -76,14 +76,14 @@ static void destroy_objects(struct gl_hwdec *hw) } p->vdp_surface = VDP_INVALID_HANDLE; - glCheckError(gl, hw->log, "Before uninitializing OpenGL interop"); + gl_check_error(gl, hw->log, "Before uninitializing OpenGL interop"); if (p->vdpgl_initialized) gl->VDPAUFiniNV(); p->vdpgl_initialized = false; - glCheckError(gl, hw->log, "After uninitializing OpenGL interop"); + gl_check_error(gl, hw->log, "After uninitializing OpenGL interop"); } static void destroy(struct gl_hwdec *hw) @@ -164,7 +164,7 @@ static int reinit(struct gl_hwdec *hw, struct mp_image_params *params) gl->VDPAUSurfaceAccessNV(p->vdpgl_surface, GL_READ_ONLY); - glCheckError(gl, hw->log, "After initializing vdpau OpenGL interop"); + gl_check_error(gl, hw->log, "After initializing vdpau OpenGL interop"); params->imgfmt = IMGFMT_RGB0; diff --git a/video/out/opengl/utils.c b/video/out/opengl/utils.c index afc768b0d2..3d41f0693c 100644 --- a/video/out/opengl/utils.c +++ b/video/out/opengl/utils.c @@ -40,7 +40,7 @@ static const char *gl_error_to_string(GLenum error) } } -void glCheckError(GL *gl, struct mp_log *log, const char *info) +void gl_check_error(GL *gl, struct mp_log *log, const char *info) { for (;;) { GLenum error = gl->GetError(); @@ -100,7 +100,7 @@ void gl_upload_tex(GL *gl, GLenum target, GLenum format, GLenum type, gl->PixelStorei(GL_UNPACK_ALIGNMENT, 4); } -mp_image_t *glGetWindowScreenshot(GL *gl) +mp_image_t *gl_read_window_contents(GL *gl) { if (gl->es) return NULL; // ES can't read from front buffer @@ -307,7 +307,7 @@ bool fbotex_change(struct fbotex *fbo, GL *gl, struct mp_log *log, int w, int h, fbotex_set_filter(fbo, filter ? filter : GL_LINEAR); - glCheckError(gl, log, "after creating framebuffer texture"); + gl_check_error(gl, log, "after creating framebuffer texture"); gl->BindFramebuffer(GL_FRAMEBUFFER, fbo->fbo); gl->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, @@ -322,7 +322,7 @@ bool fbotex_change(struct fbotex *fbo, GL *gl, struct mp_log *log, int w, int h, gl->BindFramebuffer(GL_FRAMEBUFFER, 0); - glCheckError(gl, log, "after creating framebuffer"); + gl_check_error(gl, log, "after creating framebuffer"); return res; } diff --git a/video/out/opengl/utils.h b/video/out/opengl/utils.h index 1e069f4455..85d3413831 100644 --- a/video/out/opengl/utils.h +++ b/video/out/opengl/utils.h @@ -24,13 +24,13 @@ struct mp_log; -void glCheckError(GL *gl, struct mp_log *log, const char *info); +void gl_check_error(GL *gl, struct mp_log *log, const char *info); void gl_upload_tex(GL *gl, GLenum target, GLenum format, GLenum type, const void *dataptr, int stride, int x, int y, int w, int h); -mp_image_t *glGetWindowScreenshot(GL *gl); +mp_image_t *gl_read_window_contents(GL *gl); const char* mp_sampler_type(GLenum texture_target); diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 97c92b0ae8..8859b34ed8 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -523,7 +523,7 @@ static struct bstr load_cached_file(struct gl_video *p, const char *path) static void debug_check_gl(struct gl_video *p, const char *msg) { if (p->gl_debug) - glCheckError(p->gl, p->log, msg); + gl_check_error(p->gl, p->log, msg); } void gl_video_set_debug(struct gl_video *p, bool enable) @@ -2983,7 +2983,7 @@ static bool test_fbo(struct gl_video *p, GLint format) success = true; } fbotex_uninit(&fbo); - glCheckError(gl, p->log, "FBO test"); + gl_check_error(gl, p->log, "FBO test"); return success; } diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 64d537bd5f..6f4e5948df 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -311,7 +311,7 @@ static int control(struct vo *vo, uint32_t request, void *data) return VO_NOTIMPL; } case VOCTRL_SCREENSHOT_WIN: { - struct mp_image *screen = glGetWindowScreenshot(p->gl); + struct mp_image *screen = gl_read_window_contents(p->gl); // set image parameters according to the display, if possible if (screen) { screen->params.primaries = p->renderer_opts->target_prim;