1 /** -*-ObjC-*-
2    Copyright (C) 2002 Free Software Foundation, Inc.
3 
4    Author: Frederic De Jaeger
5    Date: Nov 2002
6 
7    This file is part of the GNU Objective C User interface library.
8 
9    This library is free software; you can redistribute it and/or
10    modify it under the terms of the GNU Lesser General Public
11    License as published by the Free Software Foundation; either
12    version 2 of the License, or (at your option) any later version.
13 
14    This library is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
17    Lesser General Public License for more details.
18 
19    You should have received a copy of the GNU Lesser General Public
20    License along with this library; see the file COPYING.LIB.
21    If not, see <http://www.gnu.org/licenses/> or write to the
22    Free Software Foundation, 51 Franklin Street, Fifth Floor,
23    Boston, MA 02110-1301, USA.
24 */
25 
26 #ifndef _NSOpenGLView_h
27 #define _NSOpenGLView_h
28 #import <GNUstepBase/GSVersionMacros.h>
29 
30 #import <AppKit/NSView.h>
31 
32 @class NSOpenGLContext;
33 @class NSOpenGLPixelFormat;
34 
35 @interface NSOpenGLView : NSView
36 {
37   NSOpenGLContext 	*glcontext;
38   NSOpenGLPixelFormat	*pixel_format;
39   BOOL			prepared;
40 }
41 
42 + (NSOpenGLPixelFormat*) defaultPixelFormat;
43 - (void) clearGLContext;
44 - (void) setOpenGLContext: (NSOpenGLContext*)context;
45 - (NSOpenGLContext*) openGLContext;
46 - (id) initWithFrame: (NSRect)frameRect
47          pixelFormat: (NSOpenGLPixelFormat*)format;
48 - (NSOpenGLPixelFormat*) pixelFormat;
49 - (void) setPixelFormat: (NSOpenGLPixelFormat*)pixelFormat;
50 - (void) reshape;
51 - (void) update;
52 #if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
53 - (void) prepareOpenGL;
54 #endif
55 @end
56 #endif
57