-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEAGLView.h
executable file
·49 lines (35 loc) · 1.02 KB
/
EAGLView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import <OpenGLES/EAGL.h>
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
@protocol EAGLViewDelegate
@required
- (void)drawView:(id)sender forTime:(NSTimeInterval)time;
@optional
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
@end
@interface EAGLView : UIView
{
@private
GLint backingWidth;
GLint backingHeight;
EAGLContext *context;
GLuint viewRenderbuffer, viewFramebuffer;
GLuint depthRenderbuffer;
GLuint bgTexture;
id <EAGLViewDelegate> delegate;
NSTimer *animationTimer;
NSTimeInterval animationInterval;
NSTimeInterval animationStarted;
BOOL applicationResignedActive;
}
- (void)startAnimation;
- (void)stopAnimation;
- (void)drawView;
@property NSTimeInterval animationInterval;
@property(assign) id <EAGLViewDelegate> delegate;
@property(assign) BOOL applicationResignedActive;
@end