CCGLView Class Reference
Inherits from | UIView |
Declared in | CCGLView.h |
Overview
CCGLView 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
Other Methods
-
+ viewWithFrame:
creates an initializes an CCGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer.
-
+ viewWithFrame:pixelFormat:
creates an initializes an CCGLView with a frame, a color buffer format, and 0-bit depth buffer.
-
+ viewWithFrame:pixelFormat:depthFormat:
creates an initializes an CCGLView with a frame, a color buffer format, and a depth buffer.
-
+ viewWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:
creates an initializes an CCGLView with a frame, a color buffer format, a depth buffer format, a sharegroup, and multisamping
-
– initWithFrame:
Initializes an CCGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer
-
– initWithFrame:pixelFormat:
Initializes an CCGLView with a frame, a color buffer format, and 0-bit depth buffer
-
– initWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:
Initializes an CCGLView with a frame, a color buffer format, a depth buffer format, a sharegroup and multisampling support
-
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 -
multiSampling
property -
touchDelegate
touch delegate
property -
– swapBuffers
CCGLView uses double-buffer. This method swaps the buffers
-
– lockOpenGLContext
uses and locks the OpenGL context
-
– unlockOpenGLContext
unlocks the openGL context
-
– convertPointFromViewToSurface:
-
– convertRectFromViewToSurface:
Other Methods
-
eventDelegate
Event delegate
property -
– initWithFrame:shareContext:
initializes the CCGLView with a frame rect and an OpenGL context
-
+ load_
Properties
depthFormat
depth format of the render buffer: 0, 16 or 24 bits
@property (nonatomic, readonly) GLuint depthFormat
Declared In
CCGLView.h
eventDelegate
Event delegate
@property (nonatomic, readwrite, assign) id<CCEventDelegate> eventDelegate
Declared In
CCGLView.h
pixelFormat
pixel format: it could be RGBA8 (32-bit) or RGB565 (16-bit)
@property (nonatomic, readonly) NSString *pixelFormat
Declared In
CCGLView.h
Class Methods
viewWithFrame:
creates an initializes an CCGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer.
+ (id)viewWithFrame:(CGRect)frame
Declared In
CCGLView.h
viewWithFrame:pixelFormat:
creates an initializes an CCGLView with a frame, a color buffer format, and 0-bit depth buffer.
+ (id)viewWithFrame:(CGRect)frame pixelFormat:(NSString *)format
Declared In
CCGLView.h
viewWithFrame:pixelFormat:depthFormat:
creates an initializes an CCGLView with a frame, a color buffer format, and a depth buffer.
+ (id)viewWithFrame:(CGRect)frame pixelFormat:(NSString *)format depthFormat:(GLuint)depth
Declared In
CCGLView.h
viewWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:
creates an initializes an CCGLView with a frame, a color buffer format, a depth buffer format, a sharegroup, and multisamping
+ (id)viewWithFrame:(CGRect)frame pixelFormat:(NSString *)format depthFormat:(GLuint)depth preserveBackbuffer:(BOOL)retained sharegroup:(EAGLSharegroup *)sharegroup multiSampling:(BOOL)multisampling numberOfSamples:(unsigned int)samples
Declared In
CCGLView.h
Instance Methods
initWithFrame:
Initializes an CCGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer
- (id)initWithFrame:(CGRect)frame
Declared In
CCGLView.h
initWithFrame:pixelFormat:
Initializes an CCGLView with a frame, a color buffer format, and 0-bit depth buffer
- (id)initWithFrame:(CGRect)frame pixelFormat:(NSString *)format
Declared In
CCGLView.h
initWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:
Initializes an CCGLView with a frame, a color buffer format, a depth buffer format, a sharegroup and multisampling support
- (id)initWithFrame:(CGRect)frame pixelFormat:(NSString *)format depthFormat:(GLuint)depth preserveBackbuffer:(BOOL)retained sharegroup:(EAGLSharegroup *)sharegroup multiSampling:(BOOL)sampling numberOfSamples:(unsigned int)nSamples
Declared In
CCGLView.h
initWithFrame:shareContext:
initializes the CCGLView with a frame rect and an OpenGL context
- (id)initWithFrame:(NSRect)frameRect shareContext:(NSOpenGLContext *)context
Declared In
CCGLView.h
lockOpenGLContext
uses and locks the OpenGL context
- (void)lockOpenGLContext
Declared In
CCGLView.h