summaryrefslogtreecommitdiffstats
path: root/opengl.c
diff options
context:
space:
mode:
authorRichard Grenville <pyxlcy@gmail.com>2013-05-12 18:21:16 +0800
committerRichard Grenville <pyxlcy@gmail.com>2013-05-12 18:21:16 +0800
commit2b0dfa9b968ce34f35919f9df216e668fec761b8 (patch)
tree090fa5fd1839dd4f6b395db1cb014fd895153d46 /opengl.c
parent060b5ab23c3fb18a8695e8f7e5d145f023b7b3b2 (diff)
downloadtdebase-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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/opengl.c b/opengl.c
index a4cb858f3..edd615132 100644
--- a/opengl.c
+++ b/opengl.c
@@ -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);