summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Isorce <julien.isorce@gmail.com>2009-08-31 15:26:34 (GMT)
committerJulien Isorce <julien.isorce@gmail.com>2009-08-31 15:26:34 (GMT)
commit68f4ffde051a6a65b0bb72c23c0a5f1eac769014 (patch)
treea9885261bb5af0f7e0e5b568cf0c217884b95632
parent55ebbd43d67a02977b36255f1cf99348873afad4 (diff)
sdlshare example: review includes order and fix closure
-rw-r--r--tests/examples/sdl/sdlshare.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/tests/examples/sdl/sdlshare.c b/tests/examples/sdl/sdlshare.c
index 4749f2a..c12a91b 100644
--- a/tests/examples/sdl/sdlshare.c
+++ b/tests/examples/sdl/sdlshare.c
@@ -18,22 +18,20 @@
* Boston, MA 02111-1307, USA.
*/
-#include <gst/gst.h>
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include "SDL/SDL.h"
+#include "SDL/SDL_opengl.h"
#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#include "SDL.h"
-#include "SDL_opengl.h"
-#endif
-#ifndef WIN32
+#else
#include <GL/glx.h>
-#include "SDL/SDL.h"
-#include "SDL/SDL_opengl.h"
#include "SDL/SDL_syswm.h"
#endif
-#include <GL/gl.h> // Header File For The OpenGL32 Library
-#include <GL/glu.h> // Header File For The GLu32 Library
+
+#include <gst/gst.h>
+
/* hack */
typedef struct _GstGLBuffer GstGLBuffer;
@@ -347,8 +345,7 @@ main (int argc, char **argv)
#ifdef WIN32
wglMakeCurrent (0, 0);
#else
- g_print ("no yet implemented if not win32\n");
- return -1;
+ glXMakeCurrent (sdl_display, sdl_win, sdl_gl_context);
#endif
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);