source: trunk/monsterz/ios/classes/EAGLView.h @ 739

Last change on this file since 739 was 739, checked in by sam, 10 years ago

ios: clean up code.

File size: 1.2 KB
Line 
1//
2// Monsterz
3//
4// Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11#import <UIKit/UIKit.h>
12
13#import <OpenGLES/ES1/gl.h>
14#import <OpenGLES/ES1/glext.h>
15#import <OpenGLES/ES2/gl.h>
16#import <OpenGLES/ES2/glext.h>
17
18// This class wraps the CAEAGLLayer from CoreAnimation into a convenient
19// UIView subclass. The view content is basically an EAGL surface you
20// render your OpenGL scene into. Note that setting the view non-opaque
21// will only work if the EAGL surface has an alpha channel.
22@interface EAGLView : UIView
23{
24@private
25    EAGLContext *context;
26
27    // The pixel dimensions of the CAEAGLLayer.
28    GLint framebufferWidth;
29    GLint framebufferHeight;
30
31    // The OpenGL ES names for the framebuffer and renderbuffer used to
32    // render to this view.
33    GLuint defaultFramebuffer, colorRenderbuffer;
34}
35
36@property (nonatomic, retain) EAGLContext *context;
37
38- (void)setFramebuffer;
39- (BOOL)presentFramebuffer;
40
41@end
42
Note: See TracBrowser for help on using the repository browser.