Panda3D
eaglView.h
1 // Filename: eaglView.h
2 // Created by: drose (10Apr09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "pandabase.h"
16 #import <UIKit/UIKit.h>
17 #import <OpenGLES/EAGL.h>
18 #import <OpenGLES/ES1/gl.h>
19 #import <OpenGLES/ES1/glext.h>
20 
22 
23 /*
24 This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
25 The view content is basically an EAGL surface you render your OpenGL scene into.
26 Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
27 */
28 @interface EAGLView : UIView {
29 
30 @public
31  IPhoneGraphicsWindow *_window;
32 @private
33 
34  /* The pixel dimensions of the backbuffer */
35  GLint backingWidth;
36  GLint backingHeight;
37 
38  EAGLContext *context;
39 
40  /* OpenGL names for the renderbuffer and framebuffers used to render to this view */
41  GLuint viewRenderbuffer, viewFramebuffer;
42 
43  /* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */
44  GLuint depthRenderbuffer;
45 }
46 
47 - (void)presentView;
48 
49 @end
An interface to the osx/ system for managing GL windows under X.