diff options
author | Richard Grenville <[email protected]> | 2013-05-12 18:21:16 +0800 |
---|---|---|
committer | Richard Grenville <[email protected]> | 2013-05-12 18:21:16 +0800 |
commit | 2b0dfa9b968ce34f35919f9df216e668fec761b8 (patch) | |
tree | 090fa5fd1839dd4f6b395db1cb014fd895153d46 /opengl.c | |
parent | 060b5ab23c3fb18a8695e8f7e5d145f023b7b3b2 (diff) | |
download | tdebase-2b0dfa9b968ce34f35919f9df216e668fec761b8.tar.gz tdebase-2b0dfa9b968ce34f35919f9df216e668fec761b8.zip |
Misc: Add DEBUG_GLX_MARK & Misc
- GLX backend: Add DEBUG_GLX_MARK, to add GL marks around functions with
glStringMarkerGREMEDY(), and mark frame termination with
glFrameTerminatorGREMEDY().
- Print output of `compton -h` to stdout. (#110)
- GLX backend: Strip out elements with factor 0 in GLSL blur code.
Thanks to jrfonseca for guides. (#107)
Diffstat (limited to 'opengl.c')
-rw-r--r-- | opengl.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -90,6 +90,13 @@ glx_init(session_t *ps, bool need_render) { // Acquire function addresses if (need_render) { +#ifdef DEBUG_GLX_MARK + ps->glStringMarkerGREMEDY = (f_StringMarkerGREMEDY) + glXGetProcAddress((const GLubyte *) "glStringMarkerGREMEDY"); + ps->glFrameTerminatorGREMEDY = (f_FrameTerminatorGREMEDY) + glXGetProcAddress((const GLubyte *) "glFrameTerminatorGREMEDY"); +#endif + ps->glXBindTexImageProc = (f_BindTexImageEXT) glXGetProcAddress((const GLubyte *) "glXBindTexImageEXT"); ps->glXReleaseTexImageProc = (f_ReleaseTexImageEXT) @@ -249,6 +256,8 @@ glx_init_blur(session_t *ps) { if (hei / 2 == i && wid / 2 == j) continue; double val = XFixedToDouble(ps->o.blur_kern[2 + i * wid + j]); + if (0.0 == val) + continue; sum += val; sprintf(pc, shader_add, val, texture_func, j - wid / 2, i - hei / 2); pc += strlen(pc); |