From 3935e97e69c60e6a0f0889ae731603ad75a13c14 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 1 Apr 2019 19:59:54 +0100 Subject: [PATCH] gl_common: bump GL to 3.30 Signed-off-by: Yuxuan Shui --- src/backend/gl/gl_common.c | 10 +++++----- src/backend/gl/glx.c | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/backend/gl/gl_common.c b/src/backend/gl/gl_common.c index 75ef99c..2d0acf4 100644 --- a/src/backend/gl/gl_common.c +++ b/src/backend/gl/gl_common.c @@ -489,7 +489,7 @@ static GLint glGetUniformLocationChecked(GLuint p, const char *name) { } // clang-format off -const char *vertex_shader = GLSL(130, +const char *vertex_shader = GLSL(330, uniform mat4 projection; uniform vec2 orig; in vec2 coord; @@ -577,14 +577,14 @@ void gl_resize(struct gl_data *gd, int width, int height) { } // clang-format off -static const char fill_frag[] = GLSL(120, +static const char fill_frag[] = GLSL(330, uniform vec4 color; void main() { gl_FragColor = color; } ); -static const char fill_vert[] = GLSL(130, +static const char fill_vert[] = GLSL(330, in vec2 in_coord; uniform mat4 projection; void main() { @@ -656,7 +656,7 @@ static bool gl_init_blur(struct gl_data *gd, conv *const *const kernels) { setlocale(LC_NUMERIC, "C"); // clang-format off - static const char *FRAG_SHADER_BLUR = GLSL(130, + static const char *FRAG_SHADER_BLUR = GLSL(330, %s\n // other extension pragmas uniform float offset_x; uniform float offset_y; @@ -774,7 +774,7 @@ err: } // clang-format off -const char *win_shader_glsl = GLSL(130, +const char *win_shader_glsl = GLSL(330, uniform float opacity; uniform float dim; uniform bool invert_color; diff --git a/src/backend/gl/glx.c b/src/backend/gl/glx.c index ebcc73c..0c1d2dd 100644 --- a/src/backend/gl/glx.c +++ b/src/backend/gl/glx.c @@ -290,7 +290,9 @@ static backend_t *glx_init(session_t *ps) { GLX_CONTEXT_MAJOR_VERSION_ARB, 3, GLX_CONTEXT_MINOR_VERSION_ARB, - 0, + 3, + GLX_CONTEXT_PROFILE_MASK_ARB, + GLX_CONTEXT_CORE_PROFILE_BIT_ARB, 0, }); free(cfg);