From 792db73013611de08fe166a731ca369bef241612 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 16 Jan 2013 15:23:49 +1100 Subject: [PATCH] [648/906] tests/examples: remove dependency on glew --- tests/examples/clutter/cluttershare.c | 29 +-------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/tests/examples/clutter/cluttershare.c b/tests/examples/clutter/cluttershare.c index 5772f9513d..0257515f68 100644 --- a/tests/examples/clutter/cluttershare.c +++ b/tests/examples/clutter/cluttershare.c @@ -18,19 +18,13 @@ * Boston, MA 02110-1301, USA. */ -#include -#ifdef WIN32 -#include -#else -#include -#endif - #include #define CLUTTER_VERSION_MIN_REQUIRED CLUTTER_VERSION_1_8 #include #ifndef WIN32 #include +#include #endif #include @@ -236,7 +230,6 @@ int main (int argc, char *argv[]) { ClutterInitError clutter_err = CLUTTER_INIT_ERROR_UNKNOWN; - GLenum err = 0; #ifdef WIN32 HGLRC clutter_gl_context = 0; HDC clutter_dc = 0; @@ -266,23 +259,13 @@ main (int argc, char *argv[]) g_print ("clutter version: %s\n", CLUTTER_VERSION_S); clutter_set_default_frame_rate (2); - /* init glew */ - - err = glewInit (); - if (err != GLEW_OK) - g_debug ("failed to init GLEW: %s", glewGetErrorString (err)); - /* avoid to dispatch unecesary events */ - clutter_ungrab_keyboard (); clutter_ungrab_pointer (); /* retrieve and turn off clutter opengl context */ - stage = clutter_stage_get_default (); - /* retrieve and turn off clutter opengl context */ - #ifdef WIN32 clutter_gl_context = wglGetCurrentContext (); clutter_dc = wglGetCurrentDC (); @@ -312,7 +295,6 @@ main (int argc, char *argv[]) gst_object_unref (bus); /* clutter_gl_context is an external OpenGL context with which gst-plugins-gl want to share textures */ - glfilter = gst_bin_get_by_name (GST_BIN (pipeline), "glfiltercube0"); g_object_set (G_OBJECT (glfilter), "external-opengl-context", clutter_gl_context, NULL); @@ -320,7 +302,6 @@ main (int argc, char *argv[]) /* NULL to PAUSED state pipeline to make sure the gst opengl context is created and * shared with the clutter one */ - gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PAUSED); state = GST_STATE_PAUSED; if (gst_element_get_state (GST_ELEMENT (pipeline), &state, NULL, @@ -330,7 +311,6 @@ main (int argc, char *argv[]) } /* turn on back clutter opengl context */ - #ifdef WIN32 wglMakeCurrent (clutter_dc, clutter_gl_context); #else @@ -338,14 +318,12 @@ main (int argc, char *argv[]) #endif /* clutter stage */ - clutter_actor_set_size (stage, 640, 480); clutter_actor_set_position (stage, 0, 0); clutter_stage_set_title (CLUTTER_STAGE (stage), "clutter and gst-plugins-gl"); clutter_texture = setup_stage (CLUTTER_STAGE (stage)); /* append a gst-gl texture to this queue when you do not need it no more */ - queue_input_buf = g_async_queue_new (); queue_output_buf = g_async_queue_new (); g_object_set_data (G_OBJECT (clutter_texture), "queue_input_buf", @@ -354,7 +332,6 @@ main (int argc, char *argv[]) queue_output_buf); /* set a callback to retrieve the gst gl textures */ - fakesink = gst_bin_get_by_name (GST_BIN (pipeline), "fakesink0"); g_object_set (G_OBJECT (fakesink), "signal-handoffs", TRUE, NULL); g_signal_connect (fakesink, "handoff", G_CALLBACK (on_gst_buffer), @@ -362,11 +339,9 @@ main (int argc, char *argv[]) g_object_unref (fakesink); /* play gst */ - gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING); /* main loop */ - clutter_main (); /* before to deinitialize the gst-gl-opengl context, @@ -381,14 +356,12 @@ main (int argc, char *argv[]) clutter_threads_leave (); /* stop and clean up the pipeline */ - gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); g_object_unref (pipeline); /* make sure there is no pending gst gl buffer in the communication queues * between clutter and gst-gl */ - while (g_async_queue_length (queue_input_buf) > 0) { GstBuffer *buf = g_async_queue_pop (queue_input_buf); gst_buffer_unref (buf);