summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-11-24 18:46:49 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-11-24 18:52:14 +0900
commitf6e73c79039f1cb0a8b334dad299eaec607f4b82 (patch)
tree00c1754c86b8af7e1007945a17cf31208bc36047
parent2e83b076dbf3ca4f54b7eef0ab40ce0a90d195c5 (diff)
Evas GL common: Cosmetic change
Don't cast "ext" a hundred times when you can do it once.
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c
index 7d774d9d2e..19c1a2eff9 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -565,49 +565,49 @@ evas_gl_common_context_new(void)
565 565
566 if (!shared) 566 if (!shared)
567 { 567 {
568 const GLubyte *ext; 568 const char *ext;
569 569
570 shared = calloc(1, sizeof(Evas_GL_Shared)); 570 shared = calloc(1, sizeof(Evas_GL_Shared));
571 ext = glGetString(GL_EXTENSIONS); 571 ext = (const char *) glGetString(GL_EXTENSIONS);
572 if (ext) 572 if (ext)
573 { 573 {
574 if (getenv("EVAS_GL_INFO")) 574 if (getenv("EVAS_GL_INFO"))
575 fprintf(stderr, "EXT:\n%s\n", ext); 575 fprintf(stderr, "EXT:\n%s\n", ext);
576 if ((strstr((char *)ext, "GL_ARB_texture_non_power_of_two")) || 576 if ((strstr(ext, "GL_ARB_texture_non_power_of_two")) ||
577 (strstr((char *)ext, "OES_texture_npot")) || 577 (strstr(ext, "OES_texture_npot")) ||
578 (strstr((char *)ext, "GL_IMG_texture_npot"))) 578 (strstr(ext, "GL_IMG_texture_npot")))
579 shared->info.tex_npo2 = 1; 579 shared->info.tex_npo2 = 1;
580 if ((strstr((char *)ext, "GL_NV_texture_rectangle")) || 580 if ((strstr(ext, "GL_NV_texture_rectangle")) ||
581 (strstr((char *)ext, "GL_EXT_texture_rectangle")) || 581 (strstr(ext, "GL_EXT_texture_rectangle")) ||
582 (strstr((char *)ext, "GL_ARB_texture_rectangle"))) 582 (strstr(ext, "GL_ARB_texture_rectangle")))
583 shared->info.tex_rect = 1; 583 shared->info.tex_rect = 1;
584 if ((strstr((char *)ext, "GL_ARB_get_program_binary")) || 584 if ((strstr(ext, "GL_ARB_get_program_binary")) ||
585 (strstr((char *)ext, "GL_OES_get_program_binary"))) 585 (strstr(ext, "GL_OES_get_program_binary")))
586 shared->info.bin_program = 1; 586 shared->info.bin_program = 1;
587 else 587 else
588 glsym_glGetProgramBinary = NULL; 588 glsym_glGetProgramBinary = NULL;
589#ifdef GL_UNPACK_ROW_LENGTH 589#ifdef GL_UNPACK_ROW_LENGTH
590 shared->info.unpack_row_length = 1; 590 shared->info.unpack_row_length = 1;
591# ifdef GL_GLES 591# ifdef GL_GLES
592 if (!strstr((char *)ext, "_unpack_subimage")) 592 if (!strstr(ext, "_unpack_subimage"))
593 shared->info.unpack_row_length = 0; 593 shared->info.unpack_row_length = 0;
594# endif 594# endif
595#endif 595#endif
596 596
597#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT 597#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT
598 if ((strstr((char *)ext, "GL_EXT_texture_filter_anisotropic"))) 598 if ((strstr(ext, "GL_EXT_texture_filter_anisotropic")))
599 glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, 599 glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT,
600 &(shared->info.anisotropic)); 600 &(shared->info.anisotropic));
601#endif 601#endif
602#ifdef GL_BGRA 602#ifdef GL_BGRA
603 if ((strstr((char *)ext, "GL_EXT_bgra")) || 603 if ((strstr(ext, "GL_EXT_bgra")) ||
604 (strstr((char *)ext, "GL_EXT_texture_format_BGRA8888"))) 604 (strstr(ext, "GL_EXT_texture_format_BGRA8888")))
605 shared->info.bgra = 1; 605 shared->info.bgra = 1;
606#endif 606#endif
607 if (strstr((char *)ext, "OES_compressed_ETC1_RGB8_texture")) 607 if (strstr(ext, "OES_compressed_ETC1_RGB8_texture"))
608 shared->info.etc1 = 1; 608 shared->info.etc1 = 1;
609 if (strstr((char *)ext, "GL_EXT_texture_compression_s3tc") || 609 if (strstr(ext, "GL_EXT_texture_compression_s3tc") ||
610 strstr((char *)ext, "GL_S3_s3tc")) 610 strstr(ext, "GL_S3_s3tc"))
611 shared->info.s3tc = 1; 611 shared->info.s3tc = 1;
612#ifdef GL_GLES 612#ifdef GL_GLES
613 // FIXME: there should be an extension name/string to check for 613 // FIXME: there should be an extension name/string to check for
@@ -628,7 +628,7 @@ evas_gl_common_context_new(void)
628 shared->info.sec_image_map = 1; 628 shared->info.sec_image_map = 1;
629 } 629 }
630#endif 630#endif
631 if (!strstr((char *)ext, "GL_QCOM_tiled_rendering")) 631 if (!strstr(ext, "GL_QCOM_tiled_rendering"))
632 { 632 {
633 glsym_glStartTiling = NULL; 633 glsym_glStartTiling = NULL;
634 glsym_glEndTiling = NULL; 634 glsym_glEndTiling = NULL;
@@ -725,7 +725,7 @@ evas_gl_common_context_new(void)
725 // Note: If we support ETC2 we'll try to always use ETC2 even when the 725 // Note: If we support ETC2 we'll try to always use ETC2 even when the
726 // image has colorspace ETC1 (backwards compatibility). 726 // image has colorspace ETC1 (backwards compatibility).
727 727
728 if (ext && strstr((char *)ext, "GL_EXT_compressed_ETC1_RGB8_sub_texture")) 728 if (ext && strstr(ext, "GL_EXT_compressed_ETC1_RGB8_sub_texture"))
729 shared->info.etc1_subimage = 1; 729 shared->info.etc1_subimage = 1;
730 else 730 else
731 shared->info.etc1_subimage = shared->info.etc2; 731 shared->info.etc1_subimage = shared->info.etc2;