mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
context: only declare arbfp cache for GL
We were trying to declare and initializing an arbfp program cache for GLES but since the prototypes for the _hash and _equal functions were only available for GL this broke the GLES builds. By #ifdefing the code to conditionally declare/initialize for GL only this should hopefully fix GLES builds.
This commit is contained in:
parent
6112ebd723
commit
19562fc972
@ -208,8 +208,10 @@ cogl_create_context (void)
|
|||||||
|
|
||||||
_context->legacy_depth_test_enabled = FALSE;
|
_context->legacy_depth_test_enabled = FALSE;
|
||||||
|
|
||||||
|
#ifdef HAVE_COGL_GL
|
||||||
_context->arbfp_cache = g_hash_table_new (_cogl_pipeline_arbfp_hash,
|
_context->arbfp_cache = g_hash_table_new (_cogl_pipeline_arbfp_hash,
|
||||||
_cogl_pipeline_arbfp_equal);
|
_cogl_pipeline_arbfp_equal);
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < COGL_BUFFER_BIND_TARGET_COUNT; i++)
|
for (i = 0; i < COGL_BUFFER_BIND_TARGET_COUNT; i++)
|
||||||
_context->current_buffer[i] = NULL;
|
_context->current_buffer[i] = NULL;
|
||||||
@ -360,7 +362,9 @@ _cogl_destroy_context (void)
|
|||||||
g_slist_free (_context->texture_types);
|
g_slist_free (_context->texture_types);
|
||||||
g_slist_free (_context->buffer_types);
|
g_slist_free (_context->buffer_types);
|
||||||
|
|
||||||
|
#ifdef HAVE_COGL_GL
|
||||||
g_hash_table_unref (_context->arbfp_cache);
|
g_hash_table_unref (_context->arbfp_cache);
|
||||||
|
#endif
|
||||||
|
|
||||||
g_free (_context);
|
g_free (_context);
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,9 @@ typedef struct
|
|||||||
|
|
||||||
int legacy_state_set;
|
int legacy_state_set;
|
||||||
|
|
||||||
|
#ifdef HAVE_COGL_GL
|
||||||
GHashTable *arbfp_cache;
|
GHashTable *arbfp_cache;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Textures */
|
/* Textures */
|
||||||
CoglHandle default_gl_texture_2d_tex;
|
CoglHandle default_gl_texture_2d_tex;
|
||||||
|
Loading…
Reference in New Issue
Block a user