gl: rename platform cocoa to cgl
[platform/upstream/gstreamer.git] / tests / examples / gl / qt / qglwtextureshare / glcontextid.h
1 /*
2  * GStreamer
3  * Copyright (C) 2009 Julien Isorce <julien.isorce@gmail.com>
4  * Copyright (C) 2009 Andrey Nechypurenko <andreynech@gmail.com>
5  * Copyright (C) 2010 Nuno Santos <nunosantos@imaginando.net>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22
23 #ifndef __GLCONTEXTID_H
24 #define __GLCONTEXTID_H
25
26 #include <gst/gl/gstglconfig.h>
27
28 #if defined(GST_GL_HAVE_PLATFORM_WGL)
29     #define WIN32_LEAN_AND_MEAN
30     #include <windows.h>
31     #include <Wingdi.h>
32     #include <GL/gl.h>
33 #elif defined (GST_GL_HAVE_PLATFORM_CGL)
34     #include <OpenGL/OpenGL.h>
35     class NSOpenGLContext;
36 #else
37     #include <X11/Xlib.h>
38     #include <GL/gl.h>
39     #include <GL/glu.h>
40     #include <GL/glx.h>
41 #endif
42
43
44 #if defined(GST_GL_HAVE_PLATFORM_WGL)
45     typedef struct _tagGLContextID
46     {
47         HGLRC contextId;
48         HDC dc;
49     } GLContextID;
50 #elif  defined(GST_GL_HAVE_PLATFORM_CGL)
51     typedef struct _tagGLContextID
52     {
53         NSOpenGLContext* contextId;
54     } GLContextID;
55 #elif defined(GST_GL_HAVE_PLATFORM_GLX)
56     typedef struct _tagGLContextID
57     {
58         GLXContext contextId;
59         Display *display;
60         Window wnd;
61     } GLContextID;
62 #endif
63
64 #endif // __GLCONTEXTID_H
65