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