1 /* 	-*-ObjC-*- */
2 /* XGOpenGL - openGL management using glX
3 
4    Copyright (C) 2002 Free Software Foundation, Inc.
5 
6    Author: Frederic De Jaeger
7    Date: Nov 2002
8 
9    This file is part of the GNUstep GUI Library.
10 
11    This library is free software; you can redistribute it and/or
12    modify it under the terms of the GNU Lesser General Public
13    License as published by the Free Software Foundation; either
14    version 2 of the License, or (at your option) any later version.
15 
16    This library is distributed in the hope that it will be useful,
17    but WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
19    Lesser General Public License for more details.
20 
21    You should have received a copy of the GNU Lesser General Public
22    License along with this library; see the file COPYING.LIB.
23    If not, see <http://www.gnu.org/licenses/> or write to the
24    Free Software Foundation, 51 Franklin Street, Fifth Floor,
25    Boston, MA 02110-1301, USA.
26 */
27 
28 #ifndef _GNUstep_H_XGOpenGL_
29 #define _GNUstep_H_XGOpenGL_
30 
31 #include <AppKit/NSOpenGL.h>
32 
33 #define id _gs_avoid_id_collision
34 #define BOOL XWINDOWSBOOL
35 #include <GL/glx.h>
36 #undef id
37 #undef BOOL
38 
39 @class NSView;
40 @class XGXSubWindow;
41 @class XGGLPixelFormat;
42 
43 @interface XGGLContext : NSOpenGLContext
44 {
45   int glxminorversion;
46   GLXContext        glx_context;
47   GLXWindow         glx_drawable;
48   XGXSubWindow     *xSubWindow;
49   XGGLPixelFormat  *pixelFormat;
50   BOOL              saved_ignores_backing;
51 }
52 
53 - (GLXContext)glxcontext;
54 
55 @end
56 
57 @interface XGGLPixelFormat : NSOpenGLPixelFormat
58 {
59   Display * display;
60   int glxminorversion;
61 
62   GLXFBConfig  *fbconfig;
63   int pickedFBConfig;
64   int configurationCount;
65   BOOL shouldRequestARGBVisual;
66 
67   XVisualInfo  *visualinfo;
68 
69 }
70 
71 + (int) glxMinorVersion;
72 - (Display *) display;
73 - (XVisualInfo *) visualinfo;
74 - (GLXContext) createGLXContext: (XGGLContext *)share;
75 - (GLXWindow) drawableForWindow: (Window)xwindowid;
76 
77 @end
78 
79 #endif
80