From 7b6f4820bc4f024903f5b094471d1e78aad57ac1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Mon, 9 Mar 2015 21:15:33 +0900 Subject: [PATCH] Evas GL example: Fix usage of the config struct Also use depth24 as it's more commonly supported than 32 bits. --- src/examples/evas/evas-gl.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/examples/evas/evas-gl.c b/src/examples/evas/evas-gl.c index 8a3099b8c7..82965fc939 100644 --- a/src/examples/evas/evas-gl.c +++ b/src/examples/evas/evas-gl.c @@ -401,12 +401,9 @@ evas_gl_exam(Evas_Object *win) Evas_Native_Surface ns; //Config for the surface for evas gl - Evas_GL_Config config = - { - EVAS_GL_RGBA_8888, - EVAS_GL_DEPTH_BIT_32, - EVAS_GL_STENCIL_NONE - }; + Evas_GL_Config *config = evas_gl_config_new(); + config->color_format = EVAS_GL_RGBA_8888; + config->depth_bits = EVAS_GL_DEPTH_BIT_24; //Get the window size Evas_Coord w,h; @@ -417,8 +414,9 @@ evas_gl_exam(Evas_Object *win) gldata.glapi = evas_gl_api_get(gldata.evasgl); //Create a surface and context - gldata.sfc = evas_gl_surface_create(gldata.evasgl, &config, w, h); + gldata.sfc = evas_gl_surface_create(gldata.evasgl, config, w, h); gldata.ctx = evas_gl_context_create(gldata.evasgl, NULL); + evas_gl_config_free(config); //Set rotation variables gldata.xangle = 45.0f;