visageSDK
ShowcaseDemo/ShowcaseDemo/CustomGLView.h
1 //
2 // Abstract: This class wraps the CAEAGLLayer from CoreAnimation into a convenient
3 // UIView subclass. The view content is basically an EAGL surface you render your
4 // OpenGL scene into. Note that setting the view non-opaque will only work if the
5 // EAGL surface has an alpha channel.
6 //
7 
8 #import <UIKit/UIKit.h>
9 #import <OpenGLES/EAGL.h>
10 #import <OpenGLES/ES1/gl.h>
11 #import <OpenGLES/ES1/glext.h>
12 
19 @interface CustomGLView : UIView
20 {
21 @private
26  GLint backingWidth;
31  GLint backingHeight;
32 
37  EAGLContext *context;
38 
43  GLuint viewRenderbuffer, viewFramebuffer;
44 
49  GLuint depthRenderbuffer;
50 }
51 
52 @property (nonatomic) GLint backingWidth;
53 @property (nonatomic) GLint backingHeight;
54 
60 -(void)setOpenGLContext;
66 -(void)swapOpenGLBuffers;
67 
68 @end
Controls OpenGL view used for tracking output.