summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-03-09 21:15:33 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-03-09 21:15:46 +0900
commit7b6f4820bc4f024903f5b094471d1e78aad57ac1 (patch)
tree19e675a67ba4a8c6b932020b3c67d67a169b0ac3 /src/examples
parentb7d1615be7cad3bd8abad77918427d9708e0772d (diff)
Evas GL example: Fix usage of the config struct
Also use depth24 as it's more commonly supported than 32 bits.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/evas/evas-gl.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/examples/evas/evas-gl.c b/src/examples/evas/evas-gl.c
index 8a3099b..82965fc 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)
401 Evas_Native_Surface ns; 401 Evas_Native_Surface ns;
402 402
403 //Config for the surface for evas gl 403 //Config for the surface for evas gl
404 Evas_GL_Config config = 404 Evas_GL_Config *config = evas_gl_config_new();
405 { 405 config->color_format = EVAS_GL_RGBA_8888;
406 EVAS_GL_RGBA_8888, 406 config->depth_bits = EVAS_GL_DEPTH_BIT_24;
407 EVAS_GL_DEPTH_BIT_32,
408 EVAS_GL_STENCIL_NONE
409 };
410 407
411 //Get the window size 408 //Get the window size
412 Evas_Coord w,h; 409 Evas_Coord w,h;
@@ -417,8 +414,9 @@ evas_gl_exam(Evas_Object *win)
417 gldata.glapi = evas_gl_api_get(gldata.evasgl); 414 gldata.glapi = evas_gl_api_get(gldata.evasgl);
418 415
419 //Create a surface and context 416 //Create a surface and context
420 gldata.sfc = evas_gl_surface_create(gldata.evasgl, &config, w, h); 417 gldata.sfc = evas_gl_surface_create(gldata.evasgl, config, w, h);
421 gldata.ctx = evas_gl_context_create(gldata.evasgl, NULL); 418 gldata.ctx = evas_gl_context_create(gldata.evasgl, NULL);
419 evas_gl_config_free(config);
422 420
423 //Set rotation variables 421 //Set rotation variables
424 gldata.xangle = 45.0f; 422 gldata.xangle = 45.0f;