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
-
pixelFormatpixel format: it could be RGBA8 (32-bit) or RGB565 (16-bit)
property -
depthFormatdepth format of the render buffer: 0, 16 or 24 bits
property -
surfaceSizereturns surface size in pixels
property -
contextOpenGL context
property -
multiSamplingproperty -
touchDelegatetouch delegate
property -
– swapBuffersCCGLView uses double-buffer. This method swaps the buffers
-
– lockOpenGLContextuses and locks the OpenGL context
-
– unlockOpenGLContextunlocks the openGL context
-
– convertPointFromViewToSurface: -
– convertRectFromViewToSurface:
Other Methods
-
eventDelegateEvent 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 depthFormatDeclared In
CCGLView.heventDelegate
Event delegate
@property (nonatomic, readwrite, assign) id<CCEventDelegate> eventDelegateDeclared In
CCGLView.hpixelFormat
pixel format: it could be RGBA8 (32-bit) or RGB565 (16-bit)
@property (nonatomic, readonly) NSString *pixelFormatDeclared In
CCGLView.hClass Methods
viewWithFrame:
creates an initializes an CCGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer.
+ (id)viewWithFrame:(CGRect)frameDeclared In
CCGLView.hviewWithFrame:pixelFormat:
creates an initializes an CCGLView with a frame, a color buffer format, and 0-bit depth buffer.
+ (id)viewWithFrame:(CGRect)frame pixelFormat:(NSString *)formatDeclared In
CCGLView.hviewWithFrame: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)depthDeclared In
CCGLView.hviewWithFrame: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)samplesDeclared In
CCGLView.hInstance Methods
initWithFrame:
Initializes an CCGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer
- (id)initWithFrame:(CGRect)frameDeclared In
CCGLView.hinitWithFrame:pixelFormat:
Initializes an CCGLView with a frame, a color buffer format, and 0-bit depth buffer
- (id)initWithFrame:(CGRect)frame pixelFormat:(NSString *)formatDeclared In
CCGLView.hinitWithFrame: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)nSamplesDeclared In
CCGLView.hinitWithFrame:shareContext:
initializes the CCGLView with a frame rect and an OpenGL context
- (id)initWithFrame:(NSRect)frameRect shareContext:(NSOpenGLContext *)contextDeclared In
CCGLView.hlockOpenGLContext
uses and locks the OpenGL context
- (void)lockOpenGLContextDeclared In
CCGLView.h