Fix building with opengl, again
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
9ce1387f52
commit
a48e1f65a9
|
@ -2,3 +2,4 @@ root = true
|
|||
[*.{c,h}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
max_line_length = 90
|
||||
|
|
|
@ -375,7 +375,7 @@ typedef struct glx_prog_main {
|
|||
|
||||
#endif
|
||||
#else
|
||||
typedef uint32_t glx_prog_main_t;
|
||||
struct glx_prog_main { };
|
||||
#endif
|
||||
|
||||
#define PAINT_INIT { .pixmap = None, .pict = None }
|
||||
|
|
14
src/render.c
14
src/render.c
|
@ -4,7 +4,11 @@
|
|||
#include <xcb/xcb_image.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#ifdef CONFIG_OPENGL
|
||||
#include "opengl.h"
|
||||
#endif
|
||||
|
||||
#include "vsync.h"
|
||||
#include "win.h"
|
||||
|
||||
|
@ -76,7 +80,9 @@ void free_picture(xcb_connection_t *c, xcb_render_picture_t *p) {
|
|||
* Free paint_t.
|
||||
*/
|
||||
void free_paint(session_t *ps, paint_t *ppaint) {
|
||||
#ifdef CONFIG_OPENGL
|
||||
free_paint_glx(ps, ppaint);
|
||||
#endif
|
||||
free_picture(ps->c, &ppaint->pict);
|
||||
if (ppaint->pixmap)
|
||||
xcb_free_pixmap(ps->c, ppaint->pixmap);
|
||||
|
@ -1214,9 +1220,13 @@ bool init_render(session_t *ps) {
|
|||
// Blur filter
|
||||
if (ps->o.blur_background || ps->o.blur_background_frame) {
|
||||
bool ret;
|
||||
if (ps->o.backend == BKEND_GLX)
|
||||
if (ps->o.backend == BKEND_GLX) {
|
||||
#ifdef CONFIG_OPENGL
|
||||
ret = glx_init_blur(ps);
|
||||
else
|
||||
#else
|
||||
assert(false);
|
||||
#endif
|
||||
} else
|
||||
ret = xr_init_blur(ps);
|
||||
if (!ret)
|
||||
return false;
|
||||
|
|
|
@ -5,7 +5,10 @@
|
|||
|
||||
#include "common.h"
|
||||
#include "log.h"
|
||||
|
||||
#ifdef CONFIG_OPENGL
|
||||
#include "opengl.h"
|
||||
#endif
|
||||
|
||||
#include "vsync.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue