forked from enlightenment/efl
From: "Sung W. Park" <sungwoo@gmail.com>
Subject: [E-devel] [E-Devel][Patch] Evas GL Color Format Enum change (and ElmGLview changes accordingly) I'm submitting a patch that changes the color format for Evas GL. When I first wrote Evas_GL, I just had EVAS_GL_RGB_8 and EVAS_GL_RGBA_8 and etc but it was misleading for some people. It was more of a filler since I couldn't decide on a name. I'm finally changing it to make it more clear. SVN revision: 64491
This commit is contained in:
parent
98d6e21ec3
commit
a3a5a85d92
|
@ -18,29 +18,27 @@ typedef void *EvasGLImage;
|
||||||
|
|
||||||
typedef enum _Evas_GL_Color_Format
|
typedef enum _Evas_GL_Color_Format
|
||||||
{
|
{
|
||||||
EVAS_GL_RGB_8, // 8 bits per channel
|
EVAS_GL_RGB_888 = 0,
|
||||||
EVAS_GL_RGBA_8,
|
EVAS_GL_RGBA_8888 = 1
|
||||||
EVAS_GL_RGB_32, // 32-bits per channel
|
|
||||||
EVAS_GL_RGBA_32,
|
|
||||||
} Evas_GL_Color_Format;
|
} Evas_GL_Color_Format;
|
||||||
|
|
||||||
typedef enum _Evas_GL_Depth_Bits
|
typedef enum _Evas_GL_Depth_Bits
|
||||||
{
|
{
|
||||||
EVAS_GL_DEPTH_BIT_8,
|
EVAS_GL_DEPTH_NONE = 0,
|
||||||
EVAS_GL_DEPTH_BIT_16,
|
EVAS_GL_DEPTH_BIT_8 = 1,
|
||||||
EVAS_GL_DEPTH_BIT_24,
|
EVAS_GL_DEPTH_BIT_16 = 2,
|
||||||
EVAS_GL_DEPTH_BIT_32,
|
EVAS_GL_DEPTH_BIT_24 = 3,
|
||||||
EVAS_GL_DEPTH_NONE
|
EVAS_GL_DEPTH_BIT_32 = 4,
|
||||||
} Evas_GL_Depth_Bits;
|
} Evas_GL_Depth_Bits;
|
||||||
|
|
||||||
typedef enum _Evas_GL_Stencil_Bits
|
typedef enum _Evas_GL_Stencil_Bits
|
||||||
{
|
{
|
||||||
EVAS_GL_STENCIL_BIT_1,
|
EVAS_GL_STENCIL_NONE = 0,
|
||||||
EVAS_GL_STENCIL_BIT_2,
|
EVAS_GL_STENCIL_BIT_1 = 1,
|
||||||
EVAS_GL_STENCIL_BIT_4,
|
EVAS_GL_STENCIL_BIT_2 = 2,
|
||||||
EVAS_GL_STENCIL_BIT_8,
|
EVAS_GL_STENCIL_BIT_4 = 3,
|
||||||
EVAS_GL_STENCIL_BIT_16,
|
EVAS_GL_STENCIL_BIT_8 = 4,
|
||||||
EVAS_GL_STENCIL_NONE
|
EVAS_GL_STENCIL_BIT_16 = 5,
|
||||||
} Evas_GL_Stencil_Bits;
|
} Evas_GL_Stencil_Bits;
|
||||||
|
|
||||||
struct _Evas_GL_Config
|
struct _Evas_GL_Config
|
||||||
|
@ -98,7 +96,7 @@ main(int argc, char **argv)
|
||||||
// config for the surface for evas_gl
|
// config for the surface for evas_gl
|
||||||
Evas_GL_Config config =
|
Evas_GL_Config config =
|
||||||
{
|
{
|
||||||
EVAS_GL_RGBA_8,
|
EVAS_GL_RGBA_8888,
|
||||||
EVAS_GL_DEPTH_NONE,
|
EVAS_GL_DEPTH_NONE,
|
||||||
EVAS_GL_STENCIL_NONE
|
EVAS_GL_STENCIL_NONE
|
||||||
};
|
};
|
||||||
|
|
|
@ -2778,20 +2778,14 @@ _set_internal_config(Render_Engine_GL_Surface *sfc, Evas_GL_Config *cfg)
|
||||||
// Also initialize pixel format here as well...
|
// Also initialize pixel format here as well...
|
||||||
switch(cfg->color_format)
|
switch(cfg->color_format)
|
||||||
{
|
{
|
||||||
case EVAS_GL_RGB_8:
|
case EVAS_GL_RGB_888:
|
||||||
sfc->rt_fmt = GL_RGB;
|
sfc->rt_fmt = GL_RGB;
|
||||||
sfc->rt_internal_fmt = GL_RGB;
|
sfc->rt_internal_fmt = GL_RGB;
|
||||||
break;
|
break;
|
||||||
case EVAS_GL_RGBA_8:
|
case EVAS_GL_RGBA_8888:
|
||||||
sfc->rt_fmt = GL_RGBA;
|
sfc->rt_fmt = GL_RGBA;
|
||||||
sfc->rt_internal_fmt = GL_RGBA;
|
sfc->rt_internal_fmt = GL_RGBA;
|
||||||
break;
|
break;
|
||||||
case EVAS_GL_RGB_32:
|
|
||||||
// Only supported on some hw
|
|
||||||
// Fill it in later...
|
|
||||||
case EVAS_GL_RGBA_32:
|
|
||||||
// Only supported on some hw
|
|
||||||
// Fill it in later...
|
|
||||||
default:
|
default:
|
||||||
ERR("Invalid Color Format!");
|
ERR("Invalid Color Format!");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue