diff options
author | Richard Grenville <[email protected]> | 2013-04-25 09:27:14 +0800 |
---|---|---|
committer | Richard Grenville <[email protected]> | 2013-04-25 09:27:14 +0800 |
commit | 1dd41253b22c78bf3cd4497895c906fe07cb209b (patch) | |
tree | d5ac5c4ac9a546ac3cee98bef07a3be1499d14ca /opengl.c | |
parent | 39da27613fcfc70764769f5c458183f63a5f3ec5 (diff) | |
download | tdebase-1dd41253b22c78bf3cd4497895c906fe07cb209b.tar.gz tdebase-1dd41253b22c78bf3cd4497895c906fe07cb209b.zip |
Misc: Fix wrong description & DEBUG_GLX_ERR
- Fix description of "opengl" VSync.
- Add DEBUG_GLX_ERR to check for OpenGL errors.
- Update man page.
Diffstat (limited to 'opengl.c')
-rw-r--r-- | opengl.c | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -238,6 +238,10 @@ glx_init_blur(session_t *ps) { #undef P_GET_UNIFM_LOC +#ifdef DEBUG_GLX_ERR + glx_check_err(ps); +#endif + return true; #else printf_errf("(): GLSL support not compiled in. Cannot do blur with GLX backend."); @@ -515,6 +519,10 @@ glx_bind_pixmap(session_t *ps, glx_texture_t **pptex, Pixmap pixmap, glBindTexture(ptex->target, 0); glDisable(ptex->target); +#ifdef DEBUG_GLX_ERR + glx_check_err(ps); +#endif + return true; } @@ -535,6 +543,10 @@ glx_release_pixmap(session_t *ps, glx_texture_t *ptex) { glXDestroyPixmap(ps->dpy, ptex->glpixmap); ptex->glpixmap = 0; } + +#ifdef DEBUG_GLX_ERR + glx_check_err(ps); +#endif } /** @@ -585,6 +597,10 @@ glx_paint_pre(session_t *ps, XserverRegion *preg) { free_region(ps, &all_damage_last); glx_set_clip(ps, *preg, NULL); + +#ifdef DEBUG_GLX_ERR + glx_check_err(ps); +#endif } /** @@ -664,6 +680,10 @@ glx_set_clip(session_t *ps, XserverRegion reg, const reg_data_t *pcache_reg) { } cxfree(rects_free); + +#ifdef DEBUG_GLX_ERR + glx_check_err(ps); +#endif } #define P_PAINTREG_START() \ @@ -783,6 +803,10 @@ glx_blur_dst(session_t *ps, int dx, int dy, int width, int height, float z, glDeleteTextures(1, &tex_scr); glDisable(tex_tgt); +#ifdef DEBUG_GLX_ERR + glx_check_err(ps); +#endif + return true; } @@ -816,6 +840,10 @@ glx_dim_dst(session_t *ps, int dx, int dy, int width, int height, float z, glColor4f(0.0f, 0.0f, 0.0f, 0.0f); glDisable(GL_BLEND); +#ifdef DEBUG_GLX_ERR + glx_check_err(ps); +#endif + return true; } @@ -999,6 +1027,10 @@ glx_render(session_t *ps, const glx_texture_t *ptex, glActiveTexture(GL_TEXTURE0); } +#ifdef DEBUG_GLX_ERR + glx_check_err(ps); +#endif + return true; } @@ -1029,6 +1061,10 @@ glx_swap_copysubbuffermesa(session_t *ps, XserverRegion reg) { } } +#ifdef DEBUG_GLX_ERR + glx_check_err(ps); +#endif + cxfree(rects); } |