EAGLView Class Reference
Inherits from | CCGLView : UIView |
Declared in | EAGLView.h ccDeprecated.h |
Overview
EAGLView Class. This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. The view content is basically an EAGL surface you render your OpenGL scene into. Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
Tasks
-
+ viewWithFrame:
creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer
-
+ viewWithFrame:pixelFormat:
creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer
-
+ viewWithFrame:pixelFormat:depthFormat:preserveBackbuffer:
creates an initializes an EAGLView with a frame, a color buffer format, and a depth buffer format
-
– initWithFrame:
Initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer
-
– initWithFrame:pixelFormat:
Initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer
-
– initWithFrame:pixelFormat:depthFormat:preserveBackbuffer:
Initializes an EAGLView with a frame, a color buffer format, and a depth buffer format
-
pixelFormat
pixel format: it could be RGBA8 (32-bit) or RGB565 (16-bit)
property -
depthFormat
depth format of the render buffer: 0, 16 or 24 bits
property -
surfaceSize
returns surface size in pixels
property -
context
OpenGL context
property -
delegate
delegate
property -
touchDelegate
touch delegate
property -
– swapBuffers
EAGLView uses double-buffer. This method swaps the buffers
-
– convertPointFromViewToSurface:
-
– convertRectFromViewToSurface:
Properties
delegate
delegate
@property (nonatomic, readwrite, assign) id<EAGLViewDelegate> delegate
Declared In
EAGLView.h
depthFormat
depth format of the render buffer: 0, 16 or 24 bits
@property (nonatomic, readonly) GLuint depthFormat
Declared In
EAGLView.h
pixelFormat
pixel format: it could be RGBA8 (32-bit) or RGB565 (16-bit)
@property (nonatomic, readonly) NSString *pixelFormat
Declared In
EAGLView.h
Class Methods
viewWithFrame:
creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer
+ (id)viewWithFrame:(CGRect)frame
Declared In
EAGLView.h
viewWithFrame:pixelFormat:
creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer
+ (id)viewWithFrame:(CGRect)frame pixelFormat:(NSString *)format
Declared In
EAGLView.h
viewWithFrame:pixelFormat:depthFormat:preserveBackbuffer:
creates an initializes an EAGLView with a frame, a color buffer format, and a depth buffer format
+ (id)viewWithFrame:(CGRect)frame pixelFormat:(NSString *)format depthFormat:(GLuint)depth preserveBackbuffer:(BOOL)retained
Declared In
EAGLView.h
Instance Methods
initWithFrame:
Initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer
- (id)initWithFrame:(CGRect)frame
Declared In
EAGLView.h
initWithFrame:pixelFormat:
Initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer
- (id)initWithFrame:(CGRect)frame pixelFormat:(NSString *)format
Declared In
EAGLView.h