summaryrefslogtreecommitdiff
path: root/cogl/cogl-context.c
diff options
context:
space:
mode:
Diffstat (limited to 'cogl/cogl-context.c')
-rw-r--r--cogl/cogl-context.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index b8296ece..62a04837 100644
--- a/cogl/cogl-context.c
+++ b/cogl/cogl-context.c
@@ -221,6 +221,11 @@ cogl_context_new (CoglDisplay *display,
g_assert_not_reached ();
}
+ context->uniform_names =
+ g_ptr_array_new_with_free_func ((GDestroyNotify) g_free);
+ context->uniform_name_hash = g_hash_table_new (g_str_hash, g_str_equal);
+ context->n_uniform_names = 0;
+
/* Initialise the driver specific state */
_cogl_init_feature_overrides (context);
@@ -478,8 +483,12 @@ _cogl_context_free (CoglContext *context)
cogl_pipeline_cache_free (context->pipeline_cache);
+
_cogl_destroy_texture_units ();
+ g_ptr_array_free (context->uniform_names, TRUE);
+ g_hash_table_destroy (context->uniform_name_hash);
+
g_byte_array_free (context->buffer_map_fallback_array, TRUE);
cogl_object_unref (context->display);