mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
cogl: Remove support for GLESv1
We have no need for it in mutters cogl variant.
This commit is contained in:
parent
00a5523667
commit
7b2eaa76a4
@ -1,8 +1,5 @@
|
|||||||
/* Have GL for rendering */
|
/* Have GL for rendering */
|
||||||
#undef HAVE_COGL_GL
|
#undef HAVE_COGL_GL
|
||||||
|
|
||||||
/* Have GLES 1.1 for rendering */
|
|
||||||
#undef HAVE_COGL_GLES
|
|
||||||
|
|
||||||
/* Have GLES 2.0 for rendering */
|
/* Have GLES 2.0 for rendering */
|
||||||
#undef HAVE_COGL_GLES2
|
#undef HAVE_COGL_GLES2
|
||||||
|
@ -358,11 +358,9 @@ cogl_sources_c = \
|
|||||||
cogl-poll-private.h \
|
cogl-poll-private.h \
|
||||||
cogl-poll.c \
|
cogl-poll.c \
|
||||||
gl-prototypes/cogl-all-functions.h \
|
gl-prototypes/cogl-all-functions.h \
|
||||||
gl-prototypes/cogl-gles1-functions.h \
|
|
||||||
gl-prototypes/cogl-gles2-functions.h \
|
gl-prototypes/cogl-gles2-functions.h \
|
||||||
gl-prototypes/cogl-core-functions.h \
|
gl-prototypes/cogl-core-functions.h \
|
||||||
gl-prototypes/cogl-in-gles-core-functions.h \
|
gl-prototypes/cogl-in-gles-core-functions.h \
|
||||||
gl-prototypes/cogl-in-gles1-core-functions.h \
|
|
||||||
gl-prototypes/cogl-in-gles2-core-functions.h \
|
gl-prototypes/cogl-in-gles2-core-functions.h \
|
||||||
gl-prototypes/cogl-fixed-functions.h \
|
gl-prototypes/cogl-fixed-functions.h \
|
||||||
gl-prototypes/cogl-glsl-functions.h \
|
gl-prototypes/cogl-glsl-functions.h \
|
||||||
|
@ -425,7 +425,7 @@ cogl_context_new (CoglDisplay *display,
|
|||||||
context->texture_download_pipeline = NULL;
|
context->texture_download_pipeline = NULL;
|
||||||
context->blit_texture_pipeline = NULL;
|
context->blit_texture_pipeline = NULL;
|
||||||
|
|
||||||
#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
|
#ifdef HAVE_COGL_GL
|
||||||
if (_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_ALPHA_TEST))
|
if (_cogl_has_private_feature (context, COGL_PRIVATE_FEATURE_ALPHA_TEST))
|
||||||
/* The default for GL_ALPHA_TEST is to always pass which is equivalent to
|
/* The default for GL_ALPHA_TEST is to always pass which is equivalent to
|
||||||
* the test being disabled therefore we assume that for all drivers there
|
* the test being disabled therefore we assume that for all drivers there
|
||||||
@ -434,9 +434,7 @@ cogl_context_new (CoglDisplay *display,
|
|||||||
* implemented in the fragment shader so there is no enable for it
|
* implemented in the fragment shader so there is no enable for it
|
||||||
*/
|
*/
|
||||||
GE (context, glEnable (GL_ALPHA_TEST));
|
GE (context, glEnable (GL_ALPHA_TEST));
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined (HAVE_COGL_GL)
|
|
||||||
if ((context->driver == COGL_DRIVER_GL3))
|
if ((context->driver == COGL_DRIVER_GL3))
|
||||||
{
|
{
|
||||||
GLuint vertex_array;
|
GLuint vertex_array;
|
||||||
|
@ -58,9 +58,6 @@ _cogl_feature_check (CoglRenderer *renderer,
|
|||||||
|
|
||||||
switch (driver)
|
switch (driver)
|
||||||
{
|
{
|
||||||
case COGL_DRIVER_GLES1:
|
|
||||||
gles_availability = COGL_EXT_IN_GLES;
|
|
||||||
break;
|
|
||||||
case COGL_DRIVER_GLES2:
|
case COGL_DRIVER_GLES2:
|
||||||
gles_availability = COGL_EXT_IN_GLES2;
|
gles_availability = COGL_EXT_IN_GLES2;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
COGL_EXT_IN_GLES = (1 << 0),
|
COGL_EXT_IN_GL = (1 << 0),
|
||||||
COGL_EXT_IN_GLES2 = (1 << 1),
|
COGL_EXT_IN_GLES2 = (1 << 1),
|
||||||
COGL_EXT_IN_GLES3 = (1 << 2)
|
COGL_EXT_IN_GLES3 = (1 << 2)
|
||||||
} CoglExtGlesAvailability;
|
} CoglExtGlesAvailability;
|
||||||
|
@ -829,7 +829,7 @@ _cogl_matrix_flush_to_gl_builtin (CoglContext *ctx,
|
|||||||
{
|
{
|
||||||
g_assert (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED));
|
g_assert (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED));
|
||||||
|
|
||||||
#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
|
#ifdef HAVE_COGL_GL
|
||||||
if (ctx->flushed_matrix_mode != mode)
|
if (ctx->flushed_matrix_mode != mode)
|
||||||
{
|
{
|
||||||
GLenum gl_mode = 0;
|
GLenum gl_mode = 0;
|
||||||
@ -869,7 +869,7 @@ _cogl_matrix_entry_flush_to_gl_builtins (CoglContext *ctx,
|
|||||||
{
|
{
|
||||||
g_assert (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED));
|
g_assert (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED));
|
||||||
|
|
||||||
#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
|
#ifdef HAVE_COGL_GL
|
||||||
{
|
{
|
||||||
CoglBool needs_flip;
|
CoglBool needs_flip;
|
||||||
CoglMatrixEntryCache *cache;
|
CoglMatrixEntryCache *cache;
|
||||||
|
@ -73,32 +73,13 @@
|
|||||||
#define COGL_PIPELINE_VERTEND_GLSL 0
|
#define COGL_PIPELINE_VERTEND_GLSL 0
|
||||||
#define COGL_PIPELINE_FRAGEND_GLSL 0
|
#define COGL_PIPELINE_FRAGEND_GLSL 0
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GLES
|
|
||||||
#define COGL_PIPELINE_PROGEND_FIXED 1
|
|
||||||
#define COGL_PIPELINE_VERTEND_FIXED 1
|
|
||||||
#define COGL_PIPELINE_FRAGEND_FIXED 1
|
|
||||||
|
|
||||||
#define COGL_PIPELINE_N_PROGENDS 2
|
|
||||||
#define COGL_PIPELINE_N_VERTENDS 2
|
|
||||||
#define COGL_PIPELINE_N_FRAGENDS 2
|
|
||||||
#else
|
|
||||||
#define COGL_PIPELINE_N_PROGENDS 1
|
#define COGL_PIPELINE_N_PROGENDS 1
|
||||||
#define COGL_PIPELINE_N_VERTENDS 1
|
#define COGL_PIPELINE_N_VERTENDS 1
|
||||||
#define COGL_PIPELINE_N_FRAGENDS 1
|
#define COGL_PIPELINE_N_FRAGENDS 1
|
||||||
#endif
|
|
||||||
|
|
||||||
#else /* HAVE_COGL_GLES2 */
|
#else /* HAVE_COGL_GLES2 */
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GLES
|
|
||||||
#define COGL_PIPELINE_PROGEND_FIXED 0
|
|
||||||
#define COGL_PIPELINE_VERTEND_FIXED 0
|
|
||||||
#define COGL_PIPELINE_FRAGEND_FIXED 0
|
|
||||||
#define COGL_PIPELINE_N_PROGENDS 1
|
|
||||||
#define COGL_PIPELINE_N_VERTENDS 1
|
|
||||||
#define COGL_PIPELINE_N_FRAGENDS 1
|
|
||||||
#else
|
|
||||||
#error No drivers defined
|
#error No drivers defined
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* HAVE_COGL_GLES2 */
|
#endif /* HAVE_COGL_GLES2 */
|
||||||
|
|
||||||
|
@ -1177,17 +1177,6 @@ cogl_pipeline_set_depth_state (CoglPipeline *pipeline,
|
|||||||
orig_state->range_far == depth_state->range_far)
|
orig_state->range_far == depth_state->range_far)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (ctx->driver == COGL_DRIVER_GLES1 &&
|
|
||||||
(depth_state->range_near != 0 ||
|
|
||||||
depth_state->range_far != 1))
|
|
||||||
{
|
|
||||||
_cogl_set_error (error,
|
|
||||||
COGL_SYSTEM_ERROR,
|
|
||||||
COGL_SYSTEM_ERROR_UNSUPPORTED,
|
|
||||||
"glDepthRange not available on GLES 1");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* - Flush journal primitives referencing the current state.
|
/* - Flush journal primitives referencing the current state.
|
||||||
* - Make sure the pipeline has no dependants so it may be modified.
|
* - Make sure the pipeline has no dependants so it may be modified.
|
||||||
* - If the pipeline isn't currently an authority for the state being
|
* - If the pipeline isn't currently an authority for the state being
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
extern const CoglTextureDriver _cogl_texture_driver_gl;
|
extern const CoglTextureDriver _cogl_texture_driver_gl;
|
||||||
extern const CoglDriverVtable _cogl_driver_gl;
|
extern const CoglDriverVtable _cogl_driver_gl;
|
||||||
#endif
|
#endif
|
||||||
#if defined (HAVE_COGL_GLES) || defined (HAVE_COGL_GLES2)
|
#if defined (HAVE_COGL_GLES2)
|
||||||
extern const CoglTextureDriver _cogl_texture_driver_gles;
|
extern const CoglTextureDriver _cogl_texture_driver_gles;
|
||||||
extern const CoglDriverVtable _cogl_driver_gles;
|
extern const CoglDriverVtable _cogl_driver_gles;
|
||||||
#endif
|
#endif
|
||||||
@ -130,20 +130,6 @@ static CoglDriverDescription _cogl_drivers[] =
|
|||||||
&_cogl_texture_driver_gles,
|
&_cogl_texture_driver_gles,
|
||||||
COGL_GLES2_LIBNAME,
|
COGL_GLES2_LIBNAME,
|
||||||
},
|
},
|
||||||
#endif
|
|
||||||
#ifdef HAVE_COGL_GLES
|
|
||||||
{
|
|
||||||
COGL_DRIVER_GLES1,
|
|
||||||
"gles1",
|
|
||||||
0,
|
|
||||||
{ COGL_PRIVATE_FEATURE_ANY_GL,
|
|
||||||
COGL_PRIVATE_FEATURE_GL_EMBEDDED,
|
|
||||||
COGL_PRIVATE_FEATURE_GL_FIXED,
|
|
||||||
-1 },
|
|
||||||
&_cogl_driver_gles,
|
|
||||||
&_cogl_texture_driver_gles,
|
|
||||||
COGL_GLES1_LIBNAME,
|
|
||||||
},
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
COGL_DRIVER_NOP,
|
COGL_DRIVER_NOP,
|
||||||
@ -401,8 +387,6 @@ driver_id_to_name (CoglDriver id)
|
|||||||
return "gl";
|
return "gl";
|
||||||
case COGL_DRIVER_GL3:
|
case COGL_DRIVER_GL3:
|
||||||
return "gl3";
|
return "gl3";
|
||||||
case COGL_DRIVER_GLES1:
|
|
||||||
return "gles1";
|
|
||||||
case COGL_DRIVER_GLES2:
|
case COGL_DRIVER_GLES2:
|
||||||
return "gles2";
|
return "gles2";
|
||||||
case COGL_DRIVER_WEBGL:
|
case COGL_DRIVER_WEBGL:
|
||||||
|
@ -347,7 +347,6 @@ typedef enum
|
|||||||
COGL_DRIVER_NOP,
|
COGL_DRIVER_NOP,
|
||||||
COGL_DRIVER_GL,
|
COGL_DRIVER_GL,
|
||||||
COGL_DRIVER_GL3,
|
COGL_DRIVER_GL3,
|
||||||
COGL_DRIVER_GLES1,
|
|
||||||
COGL_DRIVER_GLES2,
|
COGL_DRIVER_GLES2,
|
||||||
COGL_DRIVER_WEBGL
|
COGL_DRIVER_WEBGL
|
||||||
} CoglDriver;
|
} CoglDriver;
|
||||||
|
@ -641,7 +641,7 @@ _cogl_texture_3d_pre_paint (CoglTexture *tex, CoglTexturePrePaintFlags flags)
|
|||||||
GL_GENERATE_MIPMAP and reuploading the first pixel */
|
GL_GENERATE_MIPMAP and reuploading the first pixel */
|
||||||
if (cogl_has_feature (ctx, COGL_FEATURE_ID_OFFSCREEN))
|
if (cogl_has_feature (ctx, COGL_FEATURE_ID_OFFSCREEN))
|
||||||
_cogl_texture_gl_generate_mipmaps (tex);
|
_cogl_texture_gl_generate_mipmaps (tex);
|
||||||
#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
|
#ifdef HAVE_COGL_GL
|
||||||
else if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED))
|
else if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED))
|
||||||
{
|
{
|
||||||
_cogl_bind_gl_texture_transient (GL_TEXTURE_3D,
|
_cogl_bind_gl_texture_transient (GL_TEXTURE_3D,
|
||||||
|
@ -409,8 +409,6 @@ _cogl_program_flush_uniforms (CoglProgram *program,
|
|||||||
|
|
||||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||||
|
|
||||||
_COGL_RETURN_IF_FAIL (ctx->driver != COGL_DRIVER_GLES1);
|
|
||||||
|
|
||||||
for (i = 0; i < program->custom_uniforms->len; i++)
|
for (i = 0; i < program->custom_uniforms->len; i++)
|
||||||
{
|
{
|
||||||
uniform = &g_array_index (program->custom_uniforms,
|
uniform = &g_array_index (program->custom_uniforms,
|
||||||
|
@ -66,7 +66,7 @@ toggle_builtin_attribute_enabled_cb (int bit_num, void *user_data)
|
|||||||
(context, COGL_PRIVATE_FEATURE_GL_FIXED),
|
(context, COGL_PRIVATE_FEATURE_GL_FIXED),
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
|
#ifdef HAVE_COGL_GL
|
||||||
{
|
{
|
||||||
CoglBool enabled = _cogl_bitmask_get (state->new_bits, bit_num);
|
CoglBool enabled = _cogl_bitmask_get (state->new_bits, bit_num);
|
||||||
GLenum cap;
|
GLenum cap;
|
||||||
@ -105,7 +105,7 @@ toggle_texcood_attribute_enabled_cb (int bit_num, void *user_data)
|
|||||||
(context, COGL_PRIVATE_FEATURE_GL_FIXED),
|
(context, COGL_PRIVATE_FEATURE_GL_FIXED),
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
|
#ifdef HAVE_COGL_GL
|
||||||
{
|
{
|
||||||
CoglBool enabled = _cogl_bitmask_get (state->new_bits, bit_num);
|
CoglBool enabled = _cogl_bitmask_get (state->new_bits, bit_num);
|
||||||
|
|
||||||
|
@ -107,8 +107,7 @@ update_hints_to_gl_enum (CoglBuffer *buffer)
|
|||||||
case COGL_BUFFER_UPDATE_HINT_STREAM:
|
case COGL_BUFFER_UPDATE_HINT_STREAM:
|
||||||
/* OpenGL ES 1.1 only knows about STATIC_DRAW and DYNAMIC_DRAW */
|
/* OpenGL ES 1.1 only knows about STATIC_DRAW and DYNAMIC_DRAW */
|
||||||
#if defined(HAVE_COGL_GL) || defined(HAVE_COGL_GLES2)
|
#if defined(HAVE_COGL_GL) || defined(HAVE_COGL_GLES2)
|
||||||
if (buffer->context->driver != COGL_DRIVER_GLES1)
|
return GL_STREAM_DRAW;
|
||||||
return GL_STREAM_DRAW;
|
|
||||||
#else
|
#else
|
||||||
return GL_DYNAMIC_DRAW;
|
return GL_DYNAMIC_DRAW;
|
||||||
#endif
|
#endif
|
||||||
|
@ -125,10 +125,6 @@ set_clip_plane (CoglFramebuffer *framebuffer,
|
|||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COGL_DRIVER_GLES1:
|
|
||||||
GE( ctx, glClipPlanef (plane_num, planef) );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case COGL_DRIVER_GL:
|
case COGL_DRIVER_GL:
|
||||||
case COGL_DRIVER_GL3:
|
case COGL_DRIVER_GL3:
|
||||||
planed[0] = planef[0];
|
planed[0] = planef[0];
|
||||||
|
@ -390,19 +390,6 @@ _cogl_pipeline_fragend_fixed_end (CoglPipeline *pipeline,
|
|||||||
|
|
||||||
GE (ctx, glFogfv (GL_FOG_COLOR, fogColor));
|
GE (ctx, glFogfv (GL_FOG_COLOR, fogColor));
|
||||||
|
|
||||||
if (ctx->driver == COGL_DRIVER_GLES1)
|
|
||||||
switch (fog_state->mode)
|
|
||||||
{
|
|
||||||
case COGL_FOG_MODE_LINEAR:
|
|
||||||
gl_mode = GL_LINEAR;
|
|
||||||
break;
|
|
||||||
case COGL_FOG_MODE_EXPONENTIAL:
|
|
||||||
gl_mode = GL_EXP;
|
|
||||||
break;
|
|
||||||
case COGL_FOG_MODE_EXPONENTIAL_SQUARED:
|
|
||||||
gl_mode = GL_EXP2;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
/* TODO: support other modes for GLES2 */
|
/* TODO: support other modes for GLES2 */
|
||||||
|
|
||||||
/* NB: GLES doesn't have glFogi */
|
/* NB: GLES doesn't have glFogi */
|
||||||
|
@ -438,8 +438,7 @@ flush_depth_state (CoglContext *ctx,
|
|||||||
ctx->depth_writing_enabled_cache = depth_writing_enabled;
|
ctx->depth_writing_enabled_cache = depth_writing_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->driver != COGL_DRIVER_GLES1 &&
|
if ((ctx->depth_range_near_cache != depth_state->range_near ||
|
||||||
(ctx->depth_range_near_cache != depth_state->range_near ||
|
|
||||||
ctx->depth_range_far_cache != depth_state->range_far))
|
ctx->depth_range_far_cache != depth_state->range_far))
|
||||||
{
|
{
|
||||||
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED))
|
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED))
|
||||||
@ -520,59 +519,51 @@ _cogl_pipeline_flush_color_blend_alpha_depth_state (
|
|||||||
&authority->big_state->blend_state;
|
&authority->big_state->blend_state;
|
||||||
|
|
||||||
/* GLES 1 only has glBlendFunc */
|
/* GLES 1 only has glBlendFunc */
|
||||||
if (ctx->driver == COGL_DRIVER_GLES1)
|
|
||||||
{
|
|
||||||
GE (ctx, glBlendFunc (blend_state->blend_src_factor_rgb,
|
|
||||||
blend_state->blend_dst_factor_rgb));
|
|
||||||
}
|
|
||||||
#if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
|
#if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
|
||||||
else
|
if (blend_factor_uses_constant (blend_state->blend_src_factor_rgb) ||
|
||||||
|
blend_factor_uses_constant (blend_state
|
||||||
|
->blend_src_factor_alpha) ||
|
||||||
|
blend_factor_uses_constant (blend_state->blend_dst_factor_rgb) ||
|
||||||
|
blend_factor_uses_constant (blend_state->blend_dst_factor_alpha))
|
||||||
{
|
{
|
||||||
if (blend_factor_uses_constant (blend_state->blend_src_factor_rgb) ||
|
float red =
|
||||||
blend_factor_uses_constant (blend_state
|
cogl_color_get_red_float (&blend_state->blend_constant);
|
||||||
->blend_src_factor_alpha) ||
|
float green =
|
||||||
blend_factor_uses_constant (blend_state->blend_dst_factor_rgb) ||
|
cogl_color_get_green_float (&blend_state->blend_constant);
|
||||||
blend_factor_uses_constant (blend_state->blend_dst_factor_alpha))
|
float blue =
|
||||||
{
|
cogl_color_get_blue_float (&blend_state->blend_constant);
|
||||||
float red =
|
float alpha =
|
||||||
cogl_color_get_red_float (&blend_state->blend_constant);
|
cogl_color_get_alpha_float (&blend_state->blend_constant);
|
||||||
float green =
|
|
||||||
cogl_color_get_green_float (&blend_state->blend_constant);
|
|
||||||
float blue =
|
|
||||||
cogl_color_get_blue_float (&blend_state->blend_constant);
|
|
||||||
float alpha =
|
|
||||||
cogl_color_get_alpha_float (&blend_state->blend_constant);
|
|
||||||
|
|
||||||
|
|
||||||
GE (ctx, glBlendColor (red, green, blue, alpha));
|
GE (ctx, glBlendColor (red, green, blue, alpha));
|
||||||
}
|
|
||||||
|
|
||||||
if (ctx->glBlendEquationSeparate &&
|
|
||||||
blend_state->blend_equation_rgb !=
|
|
||||||
blend_state->blend_equation_alpha)
|
|
||||||
GE (ctx,
|
|
||||||
glBlendEquationSeparate (blend_state->blend_equation_rgb,
|
|
||||||
blend_state->blend_equation_alpha));
|
|
||||||
else
|
|
||||||
GE (ctx, glBlendEquation (blend_state->blend_equation_rgb));
|
|
||||||
|
|
||||||
if (ctx->glBlendFuncSeparate &&
|
|
||||||
(blend_state->blend_src_factor_rgb !=
|
|
||||||
blend_state->blend_src_factor_alpha ||
|
|
||||||
(blend_state->blend_dst_factor_rgb !=
|
|
||||||
blend_state->blend_dst_factor_alpha)))
|
|
||||||
GE (ctx, glBlendFuncSeparate (blend_state->blend_src_factor_rgb,
|
|
||||||
blend_state->blend_dst_factor_rgb,
|
|
||||||
blend_state->blend_src_factor_alpha,
|
|
||||||
blend_state->blend_dst_factor_alpha));
|
|
||||||
else
|
|
||||||
GE (ctx, glBlendFunc (blend_state->blend_src_factor_rgb,
|
|
||||||
blend_state->blend_dst_factor_rgb));
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
|
if (ctx->glBlendEquationSeparate &&
|
||||||
|
blend_state->blend_equation_rgb !=
|
||||||
|
blend_state->blend_equation_alpha)
|
||||||
|
GE (ctx,
|
||||||
|
glBlendEquationSeparate (blend_state->blend_equation_rgb,
|
||||||
|
blend_state->blend_equation_alpha));
|
||||||
|
else
|
||||||
|
GE (ctx, glBlendEquation (blend_state->blend_equation_rgb));
|
||||||
|
|
||||||
|
if (ctx->glBlendFuncSeparate &&
|
||||||
|
(blend_state->blend_src_factor_rgb !=
|
||||||
|
blend_state->blend_src_factor_alpha ||
|
||||||
|
(blend_state->blend_dst_factor_rgb !=
|
||||||
|
blend_state->blend_dst_factor_alpha)))
|
||||||
|
GE (ctx, glBlendFuncSeparate (blend_state->blend_src_factor_rgb,
|
||||||
|
blend_state->blend_dst_factor_rgb,
|
||||||
|
blend_state->blend_src_factor_alpha,
|
||||||
|
blend_state->blend_dst_factor_alpha));
|
||||||
|
else
|
||||||
|
GE (ctx, glBlendFunc (blend_state->blend_src_factor_rgb,
|
||||||
|
blend_state->blend_dst_factor_rgb));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_COGL_GL
|
||||||
|
|
||||||
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_ALPHA_TEST))
|
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_ALPHA_TEST))
|
||||||
{
|
{
|
||||||
@ -769,7 +760,7 @@ get_max_activateable_texture_units (void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (HAVE_COGL_GL) || defined (HAVE_COGL_GLES)
|
#ifdef HAVE_COGL_GL
|
||||||
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED))
|
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED))
|
||||||
{
|
{
|
||||||
/* GL_MAX_TEXTURE_UNITS defines the number of units that are
|
/* GL_MAX_TEXTURE_UNITS defines the number of units that are
|
||||||
@ -914,7 +905,7 @@ flush_layers_common_gl_state_cb (CoglPipelineLayer *layer, void *user_data)
|
|||||||
* this point we can't currently tell if we are using the fixed or
|
* this point we can't currently tell if we are using the fixed or
|
||||||
* glsl progend.
|
* glsl progend.
|
||||||
*/
|
*/
|
||||||
#if defined (HAVE_COGL_GLES) || defined (HAVE_COGL_GL)
|
#ifdef HAVE_COGL_GL
|
||||||
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED) &&
|
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_FIXED) &&
|
||||||
(layers_difference & COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS))
|
(layers_difference & COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS))
|
||||||
{
|
{
|
||||||
|
@ -721,7 +721,7 @@ _cogl_texture_2d_gl_generate_mipmap (CoglTexture2D *tex_2d)
|
|||||||
GL_GENERATE_MIPMAP and reuploading the first pixel */
|
GL_GENERATE_MIPMAP and reuploading the first pixel */
|
||||||
if (cogl_has_feature (ctx, COGL_FEATURE_ID_OFFSCREEN))
|
if (cogl_has_feature (ctx, COGL_FEATURE_ID_OFFSCREEN))
|
||||||
_cogl_texture_gl_generate_mipmaps (COGL_TEXTURE (tex_2d));
|
_cogl_texture_gl_generate_mipmaps (COGL_TEXTURE (tex_2d));
|
||||||
#if defined(HAVE_COGL_GLES) || defined(HAVE_COGL_GL)
|
#ifdef HAVE_COGL_GL
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_cogl_bind_gl_texture_transient (GL_TEXTURE_2D,
|
_cogl_bind_gl_texture_transient (GL_TEXTURE_2D,
|
||||||
|
@ -309,44 +309,23 @@ _cogl_driver_update_features (CoglContext *context,
|
|||||||
gl_minor,
|
gl_minor,
|
||||||
gl_extensions);
|
gl_extensions);
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GLES
|
flags |= COGL_FEATURE_SHADERS_GLSL | COGL_FEATURE_OFFSCREEN;
|
||||||
if (context->driver == COGL_DRIVER_GLES1)
|
/* Note GLES 2 core doesn't support mipmaps for npot textures or
|
||||||
{
|
* repeat modes other than CLAMP_TO_EDGE. */
|
||||||
int max_clip_planes;
|
flags |= COGL_FEATURE_TEXTURE_NPOT_BASIC;
|
||||||
GE( context, glGetIntegerv (GL_MAX_CLIP_PLANES, &max_clip_planes) );
|
flags |= COGL_FEATURE_DEPTH_RANGE;
|
||||||
if (max_clip_planes >= 4)
|
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_GLSL, TRUE);
|
||||||
COGL_FLAGS_SET (private_features,
|
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_OFFSCREEN, TRUE);
|
||||||
COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES, TRUE);
|
COGL_FLAGS_SET (context->features,
|
||||||
}
|
COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, TRUE);
|
||||||
#endif
|
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_DEPTH_RANGE, TRUE);
|
||||||
|
COGL_FLAGS_SET (context->features,
|
||||||
|
COGL_FEATURE_ID_MIRRORED_REPEAT, TRUE);
|
||||||
|
COGL_FLAGS_SET (context->features,
|
||||||
|
COGL_FEATURE_ID_PER_VERTEX_POINT_SIZE, TRUE);
|
||||||
|
|
||||||
if (context->driver == COGL_DRIVER_GLES2)
|
COGL_FLAGS_SET (private_features,
|
||||||
{
|
COGL_PRIVATE_FEATURE_BLEND_CONSTANT, TRUE);
|
||||||
flags |= COGL_FEATURE_SHADERS_GLSL | COGL_FEATURE_OFFSCREEN;
|
|
||||||
/* Note GLES 2 core doesn't support mipmaps for npot textures or
|
|
||||||
* repeat modes other than CLAMP_TO_EDGE. */
|
|
||||||
flags |= COGL_FEATURE_TEXTURE_NPOT_BASIC;
|
|
||||||
flags |= COGL_FEATURE_DEPTH_RANGE;
|
|
||||||
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_GLSL, TRUE);
|
|
||||||
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_OFFSCREEN, TRUE);
|
|
||||||
COGL_FLAGS_SET (context->features,
|
|
||||||
COGL_FEATURE_ID_TEXTURE_NPOT_BASIC, TRUE);
|
|
||||||
COGL_FLAGS_SET (context->features, COGL_FEATURE_ID_DEPTH_RANGE, TRUE);
|
|
||||||
COGL_FLAGS_SET (context->features,
|
|
||||||
COGL_FEATURE_ID_MIRRORED_REPEAT, TRUE);
|
|
||||||
COGL_FLAGS_SET (context->features,
|
|
||||||
COGL_FEATURE_ID_PER_VERTEX_POINT_SIZE, TRUE);
|
|
||||||
|
|
||||||
COGL_FLAGS_SET (private_features,
|
|
||||||
COGL_PRIVATE_FEATURE_BLEND_CONSTANT, TRUE);
|
|
||||||
}
|
|
||||||
else if (context->driver == COGL_DRIVER_GLES1)
|
|
||||||
{
|
|
||||||
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_GL_FIXED, TRUE);
|
|
||||||
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ALPHA_TEST, TRUE);
|
|
||||||
COGL_FLAGS_SET (private_features,
|
|
||||||
COGL_PRIVATE_FEATURE_BUILTIN_POINT_SIZE_UNIFORM, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_VBOS, TRUE);
|
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_VBOS, TRUE);
|
||||||
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ANY_GL, TRUE);
|
COGL_FLAGS_SET (private_features, COGL_PRIVATE_FEATURE_ANY_GL, TRUE);
|
||||||
|
@ -59,10 +59,6 @@
|
|||||||
/* The functions in this file are part of the core GL,GLES1 and GLES2 apis */
|
/* The functions in this file are part of the core GL,GLES1 and GLES2 apis */
|
||||||
#include "cogl-core-functions.h"
|
#include "cogl-core-functions.h"
|
||||||
|
|
||||||
/* The functions in this file are core to GLES1 only but may also be
|
|
||||||
* extensions available for GLES2 and GL */
|
|
||||||
#include "cogl-in-gles1-core-functions.h"
|
|
||||||
|
|
||||||
/* The functions in this file are core to GLES2 only but
|
/* The functions in this file are core to GLES2 only but
|
||||||
* may be extensions for GLES1 and GL */
|
* may be extensions for GLES1 and GL */
|
||||||
#include "cogl-in-gles2-core-functions.h"
|
#include "cogl-in-gles2-core-functions.h"
|
||||||
@ -334,3 +330,11 @@ COGL_EXT_BEGIN (robustness, 255, 255,
|
|||||||
COGL_EXT_FUNCTION (GLenum, glGetGraphicsResetStatus,
|
COGL_EXT_FUNCTION (GLenum, glGetGraphicsResetStatus,
|
||||||
(void))
|
(void))
|
||||||
COGL_EXT_END ()
|
COGL_EXT_END ()
|
||||||
|
|
||||||
|
COGL_EXT_BEGIN (multitexture_part1, 1, 3,
|
||||||
|
0,
|
||||||
|
"ARB\0",
|
||||||
|
"multitexture\0")
|
||||||
|
COGL_EXT_FUNCTION (void, glClientActiveTexture,
|
||||||
|
(GLenum texture))
|
||||||
|
COGL_EXT_END ()
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
available */
|
available */
|
||||||
COGL_EXT_BEGIN (core,
|
COGL_EXT_BEGIN (core,
|
||||||
0, 0,
|
0, 0,
|
||||||
COGL_EXT_IN_GLES | COGL_EXT_IN_GLES2,
|
COGL_EXT_IN_GLES2,
|
||||||
"\0",
|
"\0",
|
||||||
"\0")
|
"\0")
|
||||||
COGL_EXT_FUNCTION (void, glBindTexture,
|
COGL_EXT_FUNCTION (void, glBindTexture,
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
supports fixed-function (ie, GL and GLES1.1) */
|
supports fixed-function (ie, GL and GLES1.1) */
|
||||||
COGL_EXT_BEGIN (fixed_function_core,
|
COGL_EXT_BEGIN (fixed_function_core,
|
||||||
0, 0,
|
0, 0,
|
||||||
COGL_EXT_IN_GLES,
|
0,
|
||||||
"\0",
|
"\0",
|
||||||
"\0")
|
"\0")
|
||||||
COGL_EXT_FUNCTION (void, glAlphaFunc,
|
COGL_EXT_FUNCTION (void, glAlphaFunc,
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* Cogl
|
|
||||||
*
|
|
||||||
* A Low Level GPU Graphics and Utilities API
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009, 2011 Intel Corporation.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person
|
|
||||||
* obtaining a copy of this software and associated documentation
|
|
||||||
* files (the "Software"), to deal in the Software without
|
|
||||||
* restriction, including without limitation the rights to use, copy,
|
|
||||||
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
* of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be
|
|
||||||
* included in all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
||||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
||||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* The functions in this file are part of the core GL,GLES1 and GLES2 apis */
|
|
||||||
#include "cogl-core-functions.h"
|
|
||||||
|
|
||||||
/* The functions in this file are core to GLES1 and GLES2 but not core
|
|
||||||
* to GL but they may be extensions available for GL */
|
|
||||||
#include "cogl-in-gles-core-functions.h"
|
|
||||||
|
|
||||||
/* The functions in this file are core to GLES1 only but
|
|
||||||
* may be extensions for GLES2 and GL */
|
|
||||||
#include "cogl-in-gles1-core-functions.h"
|
|
||||||
|
|
||||||
/* These are fixed-function APIs core to GL and GLES1 */
|
|
||||||
#include "cogl-fixed-functions.h"
|
|
@ -58,7 +58,6 @@
|
|||||||
|
|
||||||
COGL_EXT_BEGIN (only_in_both_gles,
|
COGL_EXT_BEGIN (only_in_both_gles,
|
||||||
4, 1,
|
4, 1,
|
||||||
COGL_EXT_IN_GLES |
|
|
||||||
COGL_EXT_IN_GLES2,
|
COGL_EXT_IN_GLES2,
|
||||||
"ARB\0",
|
"ARB\0",
|
||||||
"ES2_compatibility\0")
|
"ES2_compatibility\0")
|
||||||
@ -70,7 +69,6 @@ COGL_EXT_END ()
|
|||||||
|
|
||||||
COGL_EXT_BEGIN (only_in_both_gles_and_gl_1_3,
|
COGL_EXT_BEGIN (only_in_both_gles_and_gl_1_3,
|
||||||
1, 3,
|
1, 3,
|
||||||
COGL_EXT_IN_GLES |
|
|
||||||
COGL_EXT_IN_GLES2,
|
COGL_EXT_IN_GLES2,
|
||||||
"\0",
|
"\0",
|
||||||
"\0")
|
"\0")
|
||||||
@ -99,7 +97,6 @@ COGL_EXT_END ()
|
|||||||
|
|
||||||
COGL_EXT_BEGIN (only_in_both_gles_and_gl_1_5,
|
COGL_EXT_BEGIN (only_in_both_gles_and_gl_1_5,
|
||||||
1, 5,
|
1, 5,
|
||||||
COGL_EXT_IN_GLES |
|
|
||||||
COGL_EXT_IN_GLES2,
|
COGL_EXT_IN_GLES2,
|
||||||
"\0",
|
"\0",
|
||||||
"\0")
|
"\0")
|
||||||
@ -108,7 +105,6 @@ COGL_EXT_FUNCTION (void, glGetBufferParameteriv,
|
|||||||
COGL_EXT_END ()
|
COGL_EXT_END ()
|
||||||
|
|
||||||
COGL_EXT_BEGIN (vbos, 1, 5,
|
COGL_EXT_BEGIN (vbos, 1, 5,
|
||||||
COGL_EXT_IN_GLES |
|
|
||||||
COGL_EXT_IN_GLES2,
|
COGL_EXT_IN_GLES2,
|
||||||
"ARB\0",
|
"ARB\0",
|
||||||
"vertex_buffer_object\0")
|
"vertex_buffer_object\0")
|
||||||
@ -138,7 +134,6 @@ COGL_EXT_END ()
|
|||||||
/* Available in GL 1.3, the multitexture extension or GLES. These are
|
/* Available in GL 1.3, the multitexture extension or GLES. These are
|
||||||
required */
|
required */
|
||||||
COGL_EXT_BEGIN (multitexture_part0, 1, 3,
|
COGL_EXT_BEGIN (multitexture_part0, 1, 3,
|
||||||
COGL_EXT_IN_GLES |
|
|
||||||
COGL_EXT_IN_GLES2,
|
COGL_EXT_IN_GLES2,
|
||||||
"ARB\0",
|
"ARB\0",
|
||||||
"multitexture\0")
|
"multitexture\0")
|
||||||
|
@ -1,78 +0,0 @@
|
|||||||
/*
|
|
||||||
* Cogl
|
|
||||||
*
|
|
||||||
* A Low Level GPU Graphics and Utilities API
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009, 2011 Intel Corporation.
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person
|
|
||||||
* obtaining a copy of this software and associated documentation
|
|
||||||
* files (the "Software"), to deal in the Software without
|
|
||||||
* restriction, including without limitation the rights to use, copy,
|
|
||||||
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
* of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be
|
|
||||||
* included in all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
||||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
||||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* This is included multiple times with different definitions for
|
|
||||||
* these macros. The macros are given the following arguments:
|
|
||||||
*
|
|
||||||
* COGL_EXT_BEGIN:
|
|
||||||
*
|
|
||||||
* @name: a unique symbol name for this feature
|
|
||||||
*
|
|
||||||
* @min_gl_major: the major part of the minimum GL version where these
|
|
||||||
* functions are available in core, or 255 if it isn't available in
|
|
||||||
* any version.
|
|
||||||
* @min_gl_minor: the minor part of the minimum GL version where these
|
|
||||||
* functions are available in core, or 255 if it isn't available in
|
|
||||||
* any version.
|
|
||||||
*
|
|
||||||
* @gles_availability: flags to specify which versions of GLES the
|
|
||||||
* functions are available in. Should be a combination of
|
|
||||||
* COGL_EXT_IN_GLES and COGL_EXT_IN_GLES2.
|
|
||||||
*
|
|
||||||
* @extension_suffixes: A zero-separated list of suffixes in a
|
|
||||||
* string. These are appended to the extension name to get a complete
|
|
||||||
* extension name to try. The suffix is also appended to all of the
|
|
||||||
* function names. The suffix can optionally include a ':' to specify
|
|
||||||
* an alternate suffix for the function names.
|
|
||||||
*
|
|
||||||
* @extension_names: A list of extension names to try. If any of these
|
|
||||||
* extensions match then it will be used.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* These functions are only available in GLES and are used as
|
|
||||||
replacements for some GL equivalents that only accept double
|
|
||||||
arguments */
|
|
||||||
COGL_EXT_BEGIN (only_in_gles1,
|
|
||||||
255, 255,
|
|
||||||
COGL_EXT_IN_GLES,
|
|
||||||
"\0",
|
|
||||||
"\0")
|
|
||||||
COGL_EXT_FUNCTION (void, glClipPlanef,
|
|
||||||
(GLenum plane, const GLfloat *equation))
|
|
||||||
COGL_EXT_END ()
|
|
||||||
|
|
||||||
COGL_EXT_BEGIN (multitexture_part1, 1, 3,
|
|
||||||
COGL_EXT_IN_GLES,
|
|
||||||
"ARB\0",
|
|
||||||
"multitexture\0")
|
|
||||||
COGL_EXT_FUNCTION (void, glClientActiveTexture,
|
|
||||||
(GLenum texture))
|
|
||||||
COGL_EXT_END ()
|
|
||||||
|
|
@ -265,8 +265,6 @@ egl_attributes_from_framebuffer_config (CoglDisplay *display,
|
|||||||
attributes[i++] = ((renderer->driver == COGL_DRIVER_GL ||
|
attributes[i++] = ((renderer->driver == COGL_DRIVER_GL ||
|
||||||
renderer->driver == COGL_DRIVER_GL3) ?
|
renderer->driver == COGL_DRIVER_GL3) ?
|
||||||
EGL_OPENGL_BIT :
|
EGL_OPENGL_BIT :
|
||||||
renderer->driver == COGL_DRIVER_GLES1 ?
|
|
||||||
EGL_OPENGL_ES_BIT :
|
|
||||||
EGL_OPENGL_ES2_BIT);
|
EGL_OPENGL_ES2_BIT);
|
||||||
|
|
||||||
if (config->samples_per_pixel)
|
if (config->samples_per_pixel)
|
||||||
|
@ -405,83 +405,6 @@ EGL_CHECKED=no
|
|||||||
|
|
||||||
enabled_drivers=""
|
enabled_drivers=""
|
||||||
|
|
||||||
HAVE_GLES1=0
|
|
||||||
AC_ARG_ENABLE(
|
|
||||||
[gles1],
|
|
||||||
[AC_HELP_STRING([--enable-gles1=@<:@no/yes@:>@], [Enable support for OpenGL-ES 1.1 @<:@default=no@:>@])],
|
|
||||||
[],
|
|
||||||
enable_gles1=no
|
|
||||||
)
|
|
||||||
AS_IF([test "x$enable_gles1" = "xyes"],
|
|
||||||
[
|
|
||||||
enabled_drivers="$enabled_drivers gles1"
|
|
||||||
|
|
||||||
cogl_gl_headers="GLES/gl.h GLES/glext.h"
|
|
||||||
|
|
||||||
AC_DEFINE([HAVE_COGL_GLES], 1, [Have GLES 1.1 for rendering])
|
|
||||||
COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GLES CLUTTER_COGL_HAS_GLES"
|
|
||||||
COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_GLES1"
|
|
||||||
HAVE_GLES1=1
|
|
||||||
|
|
||||||
PKG_CHECK_EXISTS([glesv1_cm],
|
|
||||||
[COGL_PKG_REQUIRES_GL="$COGL_PKG_REQUIRES_GL glesv1_cm"
|
|
||||||
COGL_GLES1_LIBNAME="libGLESv1_CM.so"
|
|
||||||
],
|
|
||||||
[
|
|
||||||
# We have to check the two headers independently as GLES/glext.h
|
|
||||||
# needs to include GLES/gl.h to have the GL types defined (eg.
|
|
||||||
# GLenum).
|
|
||||||
AC_CHECK_HEADER([GLES/gl.h],
|
|
||||||
[],
|
|
||||||
[AC_MSG_ERROR([Unable to locate GLES/gl.h])])
|
|
||||||
AC_CHECK_HEADER([GLES/glext.h],
|
|
||||||
[],
|
|
||||||
[AC_MSG_ERROR([Unable to locate GLES/glext.h])],
|
|
||||||
[#include <GLES/gl.h>])
|
|
||||||
|
|
||||||
# Early implementations provided only a GLES/egl.h while Khronos's
|
|
||||||
# implementer guide now states EGL/egl.h is the One. Some
|
|
||||||
# implementations keep a GLES/egl.h wrapper around EGL/egl.h for
|
|
||||||
# backward compatibility while others provide EGL/egl.h only.
|
|
||||||
AC_CHECK_HEADERS([GLES/egl.h EGL/egl.h])
|
|
||||||
|
|
||||||
AS_IF([test "x$ac_cv_header_GLES_egl_h" = "xyes"],
|
|
||||||
[COGL_EGL_INCLUDES="#include <GLES/egl.h>"],
|
|
||||||
[test "x$ac_cv_header_EGL_egl_h" = "xyes"],
|
|
||||||
[
|
|
||||||
COGL_EGL_INCLUDES="#include <EGL/egl.h>"
|
|
||||||
],
|
|
||||||
[AC_MSG_ERROR([Unable to locate EGL header])])
|
|
||||||
AC_SUBST([COGL_EGL_INCLUDES])
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS([EGL/eglext.h],
|
|
||||||
[COGL_EGL_INCLUDES="$COGL_EGL_INCLUDE
|
|
||||||
#include <EGL/eglext.h>"],
|
|
||||||
[],
|
|
||||||
[$COGL_EGL_INCLUDES])
|
|
||||||
|
|
||||||
# Check for a GLES 1.x Common Profile library with/without EGL.
|
|
||||||
#
|
|
||||||
# Note: historically GLES 1 libraries shipped with the
|
|
||||||
# EGL and GLES symbols all bundled in one library. Now
|
|
||||||
# the Khronos Implementers Guide defines two naming
|
|
||||||
# schemes: -lGLES_CM should be used for a library that
|
|
||||||
# bundles the GLES and EGL API together and -lGLESv1_CM
|
|
||||||
# would be used for a standalone GLES API.
|
|
||||||
AC_CHECK_LIB(GLES_CM, [eglInitialize],
|
|
||||||
[COGL_GLES1_LIBNAME="libGLES_CM.so"],
|
|
||||||
[
|
|
||||||
AC_CHECK_LIB(GLESv1_CM, [glFlush],
|
|
||||||
[COGL_GLES1_LIBNAME="libGLESv1_CM.so"
|
|
||||||
NEED_SEPARATE_EGL=yes
|
|
||||||
],
|
|
||||||
[AC_MSG_ERROR([Unable to locate required GLES 1.x Common Profile library])])
|
|
||||||
])
|
|
||||||
|
|
||||||
EGL_CHECKED=yes
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
HAVE_GLES2=0
|
HAVE_GLES2=0
|
||||||
AC_ARG_ENABLE(
|
AC_ARG_ENABLE(
|
||||||
[gles2],
|
[gles2],
|
||||||
@ -560,10 +483,6 @@ AC_ARG_WITH([gl-libname],
|
|||||||
[AS_HELP_STRING([--with-gl-libname],
|
[AS_HELP_STRING([--with-gl-libname],
|
||||||
override the name of the GL library to dlopen)],
|
override the name of the GL library to dlopen)],
|
||||||
[COGL_GL_LIBNAME="$withval"])
|
[COGL_GL_LIBNAME="$withval"])
|
||||||
AC_ARG_WITH([gles1-libname],
|
|
||||||
[AS_HELP_STRING([--with-gles1-libname],
|
|
||||||
override the name of the GLESv1 library to dlopen)],
|
|
||||||
[COGL_GLES1_LIBNAME="$withval"])
|
|
||||||
AC_ARG_WITH([gles2-libname],
|
AC_ARG_WITH([gles2-libname],
|
||||||
[AS_HELP_STRING([--with-gles2-libname],
|
[AS_HELP_STRING([--with-gles2-libname],
|
||||||
override the name of the GLESv2 library to dlopen)],
|
override the name of the GLESv2 library to dlopen)],
|
||||||
@ -580,8 +499,6 @@ AM_CONDITIONAL(HAVE_COGL_DEFAULT_DRIVER,
|
|||||||
|
|
||||||
AC_SUBST([COGL_GL_LIBNAME])
|
AC_SUBST([COGL_GL_LIBNAME])
|
||||||
AC_SUBST([HAVE_GL])
|
AC_SUBST([HAVE_GL])
|
||||||
AC_SUBST([COGL_GLES1_LIBNAME])
|
|
||||||
AC_SUBST([HAVE_GLES1])
|
|
||||||
AC_SUBST([COGL_GLES2_LIBNAME])
|
AC_SUBST([COGL_GLES2_LIBNAME])
|
||||||
AC_SUBST([HAVE_GLES2])
|
AC_SUBST([HAVE_GLES2])
|
||||||
AC_SUBST([COGL_DEFAULT_DRIVER])
|
AC_SUBST([COGL_DEFAULT_DRIVER])
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
HAVE_GL=@HAVE_GL@
|
HAVE_GL=@HAVE_GL@
|
||||||
HAVE_GLES1=@HAVE_GLES1@
|
|
||||||
HAVE_GLES2=@HAVE_GLES2@
|
HAVE_GLES2=@HAVE_GLES2@
|
||||||
|
@ -50,7 +50,6 @@ get_x11_cogl_winsys_vtable (CoglRenderer *renderer)
|
|||||||
|
|
||||||
switch (renderer->driver)
|
switch (renderer->driver)
|
||||||
{
|
{
|
||||||
case COGL_DRIVER_GLES1:
|
|
||||||
case COGL_DRIVER_GLES2:
|
case COGL_DRIVER_GLES2:
|
||||||
return _cogl_winsys_egl_xlib_get_vtable ();
|
return _cogl_winsys_egl_xlib_get_vtable ();
|
||||||
case COGL_DRIVER_GL:
|
case COGL_DRIVER_GL:
|
||||||
|
Loading…
Reference in New Issue
Block a user