summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-04-12 16:10:06 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-02-28 08:31:49 +0100
commite49408ff3385d9e07eaacdaf6b617bb18d6f0c16 (patch)
treef2e68c2cbdb7fc623964d97b49f0900104e6a049
parent1fb573a08923d545a1d32e39b23d1190e96af4e5 (diff)
wayland: Respect some common gl_config attrib sizes
-rw-r--r--src/video/wayland/SDL_waylandopengl.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/video/wayland/SDL_waylandopengl.c b/src/video/wayland/SDL_waylandopengl.c
index 600269f7..104cc697 100644
--- a/src/video/wayland/SDL_waylandopengl.c
+++ b/src/video/wayland/SDL_waylandopengl.c
@@ -53,14 +53,21 @@ Wayland_GL_LoadLibrary(_THIS, const char *path)
EGLint num_config;
EGLint config_attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_RED_SIZE, 1,
- EGL_GREEN_SIZE, 1,
- EGL_BLUE_SIZE, 1,
- EGL_DEPTH_SIZE, 1,
+ EGL_RED_SIZE, 0,
+ EGL_GREEN_SIZE, 0,
+ EGL_BLUE_SIZE, 0,
+ EGL_DEPTH_SIZE, 0,
+ EGL_ALPHA_SIZE, 0,
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
EGL_NONE
};
+ config_attribs[ 3] = _this->gl_config.red_size;
+ config_attribs[ 5] = _this->gl_config.green_size;
+ config_attribs[ 7] = _this->gl_config.blue_size;
+ config_attribs[ 9] = _this->gl_config.depth_size;
+ config_attribs[11] = _this->gl_config.alpha_size;
+
fprintf(stderr, "start laod library\n");
data->edpy = eglGetDisplay(data->egl_display);