cocos2d-x  2.2.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EAGLView Class Reference

EAGLView Class. More...

#import <EAGLView.h>

Inheritance diagram for EAGLView:

Instance Methods

(id) - initWithFrame:
 Initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer. More...
 
(id) - initWithFrame:pixelFormat:
 Initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer. More...
 
(id) - initWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:
 Initializes an EAGLView with a frame, a color buffer format, a depth buffer format, a sharegroup and multisampling support. More...
 
(void) - swapBuffers
 EAGLView uses double-buffer. More...
 
(CGRect) - convertRectFromViewToSurface:
local - convertRectFromViewToSurface:
(CGPoint) - convertPointFromViewToSurface:
(int) - getWidth
(int) - getHeight
(void) - doAnimationWhenKeyboardMoveWithDuration:distance:
var - doAnimationWhenKeyboardMoveWithDuration:distance:
local - doAnimationWhenKeyboardMoveWithDuration:distance:
(void) - doAnimationWhenAnotherEditBeClicked
var - doAnimationWhenAnotherEditBeClicked
local - doAnimationWhenAnotherEditBeClicked
(id) - initWithFrame:shareContext:
(id) - initWithFrame:pixelFormat:
(void) - lockOpenGLContext
 uses and locks the OpenGL context More...
 
(void) - unlockOpenGLContext
 unlocks the openGL context More...
 
(NSUInteger) - depthFormat
 returns the depth format of the view in BPP More...
 
(void) - setFrameZoomFactor:
(int) - getWidth
(int) - getHeight
(void) - swapBuffers
(void) - setFullScreen:

Class Methods

(id) + viewWithFrame:
 creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer More...
 
(id) + viewWithFrame:pixelFormat:
 creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer More...
 
(id) + viewWithFrame:pixelFormat:depthFormat:
 creates an initializes an EAGLView with a frame, a color buffer format, and a depth buffer format More...
 
var + viewWithFrame:pixelFormat:depthFormat:
 creates an initializes an EAGLView with a frame, a color buffer format, and a depth buffer format More...
 
local + viewWithFrame:pixelFormat:depthFormat:
 creates an initializes an EAGLView with a frame, a color buffer format, and a depth buffer format More...
 
(id) + viewWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:
 creates an initializes an EAGLView with a frame, a color buffer format, a depth buffer format, a sharegroup, and multisamping More...
 
(id) + sharedEGLView
(id) + sharedEGLView

Protected Attributes

id< CCESRendererrenderer_
EAGLContext * context_
var context_
local context_
NSString * pixelformat_
var pixelformat_
local pixelformat_
GLuint depthFormat_
var depthFormat_
local depthFormat_
BOOL preserveBackbuffer_
var preserveBackbuffer_
local preserveBackbuffer_
CGSize size_
BOOL discardFramebufferSupported_
var discardFramebufferSupported_
local discardFramebufferSupported_
BOOL multisampling_
var multisampling_
local multisampling_
unsigned int requestedSamples_
var requestedSamples_
local requestedSamples_
BOOL isUseUITextField
id< MacEventDelegateeventDelegate_
var eventDelegate_
local eventDelegate_
BOOL isFullScreen_
NSWindow * fullScreenWindow_
var fullScreenWindow_
local fullScreenWindow_
NSWindow * windowGLView_
NSView * superViewGLView_
var superViewGLView_
local superViewGLView_
NSRect originalWinRect_
local originalWinRect_
float frameZoomFactor_
var frameZoomFactor_
local frameZoomFactor_

Properties

UITextPosition * beginningOfDocument
UITextPosition * endOfDocument
id< UITextInputDelegate > inputDelegate
UITextRange * markedTextRange
NSDictionary * markedTextStyle
UITextRange * selectedTextRange
id< UITextInputTokenizer > tokenizer
BOOL isKeyboardShown
NSNotification * keyboardShowNotification
NSString * pixelFormat
 pixel format: it could be RGBA8 (32-bit) or RGB565 (16-bit) More...
 
GLuint depthFormat
 depth format of the render buffer: 0, 16 or 24 bits More...
 
CGSize surfaceSize
 returns surface size in pixels More...
 
EAGLContext * context
 OpenGL context. More...
 
BOOL multiSampling
id< MacEventDelegateeventDelegate
BOOL isFullScreen
float frameZoomFactor

Detailed Description

EAGLView Class.

MacGLView.

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.

Only available for Mac OS X

Method Documentation

- (CGPoint)
convertPointFromViewToSurface:
(CGPoint)  point
- (CGPoint)
convertPointFromViewToSurface:
var  point
- (CGPoint)
convertPointFromViewToSurface:
local  point
- (CGRect)
convertRectFromViewToSurface:
(CGRect)  rect
- (CGRect)
convertRectFromViewToSurface:
var  rect
- (CGRect)
convertRectFromViewToSurface:
local  rect
- (NSUInteger) depthFormat

returns the depth format of the view in BPP

var depthFormat

returns the depth format of the view in BPP

local depthFormat

returns the depth format of the view in BPP

- (void)
doAnimationWhenAnotherEditBeClicked
var
doAnimationWhenAnotherEditBeClicked
local
doAnimationWhenAnotherEditBeClicked
- (void)
doAnimationWhenKeyboardMoveWithDuration:
(float)  duration
distance: (float)  dis 
- (void)
doAnimationWhenKeyboardMoveWithDuration:
var  duration
distance: var  dis 
- (void)
doAnimationWhenKeyboardMoveWithDuration:
local  duration
distance: local  dis 
- (int) getHeight
var getHeight
local getHeight
- (int) getHeight
var getHeight
local getHeight
- (int) getWidth
var getWidth
local getWidth
- (int) getWidth
var getWidth
local getWidth
- (id) initWithFrame: (CGRect)  frame

Initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer.

- (id) initWithFrame: var  frame

Initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer.

- (id) initWithFrame: local  frame

Initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer.

- (id) initWithFrame: (NSRect)  frameRect
pixelFormat: (NSOpenGLPixelFormat *)  format 
- (id) initWithFrame: var  frameRect
pixelFormat: var  format 
- (id) initWithFrame: local  frameRect
pixelFormat: local  format 
- (id) initWithFrame: (CGRect)  frame
pixelFormat: (NSString *)  format 

Initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer.

- (id) initWithFrame: var  frame
pixelFormat: var  format 

Initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer.

- (id) initWithFrame: local  frame
pixelFormat: local  format 

Initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer.

- (id) initWithFrame: (CGRect)  frame
pixelFormat: (NSString *)  format
depthFormat: (GLuint)  depth
preserveBackbuffer: (BOOL)  retained
sharegroup: (EAGLSharegroup *)  sharegroup
multiSampling: (BOOL)  sampling
numberOfSamples: (unsigned int)  nSamples 

Initializes an EAGLView with a frame, a color buffer format, a depth buffer format, a sharegroup and multisampling support.

- (id) initWithFrame: var  frame
pixelFormat: var  format
depthFormat: var  depth
preserveBackbuffer: var  retained
sharegroup: var  sharegroup
multiSampling: var  sampling
numberOfSamples: var  nSamples 

Initializes an EAGLView with a frame, a color buffer format, a depth buffer format, a sharegroup and multisampling support.

- (id) initWithFrame: local  frame
pixelFormat: local  format
depthFormat: local  depth
preserveBackbuffer: local  retained
sharegroup: local  sharegroup
multiSampling: local  sampling
numberOfSamples: local  nSamples 

Initializes an EAGLView with a frame, a color buffer format, a depth buffer format, a sharegroup and multisampling support.

- (id) initWithFrame: (NSRect)  frameRect
shareContext: (NSOpenGLContext *)  context 
- (id) initWithFrame: var  frameRect
shareContext: var  context 
- (id) initWithFrame: local  frameRect
shareContext: local  context 
- (void) lockOpenGLContext

uses and locks the OpenGL context

var lockOpenGLContext

uses and locks the OpenGL context

local lockOpenGLContext

uses and locks the OpenGL context

- (void) setFrameZoomFactor: (float)  frameZoomFactor
- (void) setFrameZoomFactor: var  frameZoomFactor
- (void) setFrameZoomFactor: local  frameZoomFactor
- (void) setFullScreen: (BOOL)  fullscreen
- (void) setFullScreen: var  fullscreen
- (void) setFullScreen: local  fullscreen
+ (id) sharedEGLView
var sharedEGLView
local sharedEGLView
+ (id) sharedEGLView
var sharedEGLView
local sharedEGLView
- (void) swapBuffers
var swapBuffers
local swapBuffers
- (void) swapBuffers

EAGLView uses double-buffer.

This method swaps the buffers

var swapBuffers

EAGLView uses double-buffer.

This method swaps the buffers

local swapBuffers

EAGLView uses double-buffer.

This method swaps the buffers

- (void) unlockOpenGLContext

unlocks the openGL context

var unlockOpenGLContext

unlocks the openGL context

local unlockOpenGLContext

unlocks the openGL context

+ (id) viewWithFrame: (CGRect)  frame

creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer

+ (id) viewWithFrame: var  frame

creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer

+ (id) viewWithFrame: local  frame

creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer

+ (id) viewWithFrame: (CGRect)  frame
pixelFormat: (NSString *)  format 

creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer

+ (id) viewWithFrame: var  frame
pixelFormat: var  format 

creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer

+ (id) viewWithFrame: local  frame
pixelFormat: local  format 

creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer

+ (id) viewWithFrame: (CGRect)  frame
pixelFormat: (NSString *)  format
depthFormat: (GLuint)  depth 

creates an initializes an EAGLView with a frame, a color buffer format, and a depth buffer format

+ (id) viewWithFrame: var  frame
pixelFormat: var  format
depthFormat: var  depth 

creates an initializes an EAGLView with a frame, a color buffer format, and a depth buffer format

+ (id) viewWithFrame: local  frame
pixelFormat: local  format
depthFormat: local  depth 

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
sharegroup: (EAGLSharegroup *)  sharegroup
multiSampling: (BOOL)  multisampling
numberOfSamples: (unsigned int)  samples 

creates an initializes an EAGLView with a frame, a color buffer format, a depth buffer format, a sharegroup, and multisamping

+ (id) viewWithFrame: var  frame
pixelFormat: var  format
depthFormat: var  depth
preserveBackbuffer: var  retained
sharegroup: var  sharegroup
multiSampling: var  multisampling
numberOfSamples: var  samples 

creates an initializes an EAGLView with a frame, a color buffer format, a depth buffer format, a sharegroup, and multisamping

+ (id) viewWithFrame: local  frame
pixelFormat: local  format
depthFormat: local  depth
preserveBackbuffer: local  retained
sharegroup: local  sharegroup
multiSampling: local  multisampling
numberOfSamples: local  samples 

creates an initializes an EAGLView with a frame, a color buffer format, a depth buffer format, a sharegroup, and multisamping

Member Data Documentation

- (EAGLContext*) context_
protected
var context_
protected
local context_
protected
- (GLuint) depthFormat_
protected
var depthFormat_
protected
local depthFormat_
protected
- (BOOL)
discardFramebufferSupported_
protected
var discardFramebufferSupported_
protected
local discardFramebufferSupported_
protected
- (id<MacEventDelegate>
) eventDelegate_
protected
var eventDelegate_
protected
local eventDelegate_
protected
- (float) frameZoomFactor_
protected
var frameZoomFactor_
protected
local frameZoomFactor_
protected
- (NSWindow*) fullScreenWindow_
protected
var fullScreenWindow_
protected
local fullScreenWindow_
protected
- (BOOL) isFullScreen_
protected
var isFullScreen_
protected
local isFullScreen_
protected
- (BOOL) isUseUITextField
protected
var isUseUITextField
protected
local isUseUITextField
protected
- (BOOL) multisampling_
protected
var multisampling_
protected
local multisampling_
protected
- (NSRect) originalWinRect_
protected
var originalWinRect_
protected
local originalWinRect_
protected
- (NSString*) pixelformat_
protected
var pixelformat_
protected
local pixelformat_
protected
- (BOOL) preserveBackbuffer_
protected
var preserveBackbuffer_
protected
local preserveBackbuffer_
protected
- (id<CCESRenderer>) renderer_
protected
var renderer_
protected
local renderer_
protected
- (unsigned int) requestedSamples_
protected
var requestedSamples_
protected
local requestedSamples_
protected
- (CGSize) size_
protected
var size_
protected
local size_
protected
- (NSView*) superViewGLView_
protected
var superViewGLView_
protected
local superViewGLView_
protected
- (NSWindow*) windowGLView_
protected
var windowGLView_
protected
local windowGLView_
protected

Property Documentation

- (UITextPosition*)
beginningOfDocument
readnonatomicassign
var beginningOfDocument
readnonatomicassign
local beginningOfDocument
readnonatomicassign
- (EAGLContext*) context
readnonatomicassign

OpenGL context.

var context
readnonatomicassign

OpenGL context.

local context
readnonatomicassign

OpenGL context.

- (GLuint) depthFormat
readnonatomicassign

depth format of the render buffer: 0, 16 or 24 bits

var depthFormat
readnonatomicassign

depth format of the render buffer: 0, 16 or 24 bits

local depthFormat
readnonatomicassign

depth format of the render buffer: 0, 16 or 24 bits

- (UITextPosition*) endOfDocument
readnonatomicassign
var endOfDocument
readnonatomicassign
local endOfDocument
readnonatomicassign
- (id<MacEventDelegate>
) eventDelegate
readwritenonatomicassign
var eventDelegate
readwritenonatomicassign
local eventDelegate
readwritenonatomicassign
- (float) frameZoomFactor
readwritenonatomicassign
var frameZoomFactor
readwritenonatomicassign
local frameZoomFactor
readwritenonatomicassign
- (id<UITextInputDelegate>
) inputDelegate
readwritenonatomicassign
var inputDelegate
readwritenonatomicassign
local inputDelegate
readwritenonatomicassign
- (BOOL) isFullScreen
readnonatomicassign
var isFullScreen
readnonatomicassign
local isFullScreen
readnonatomicassign
- (BOOL) isKeyboardShown
readnonatomicassign
var isKeyboardShown
readnonatomicassign
local isKeyboardShown
readnonatomicassign
- (NSNotification*)
keyboardShowNotification
readwritenonatomiccopy
var keyboardShowNotification
readwritenonatomiccopy
local keyboardShowNotification
readwritenonatomiccopy
- (UITextRange*) markedTextRange
readnonatomicassign
var markedTextRange
readnonatomicassign
- (NSDictionary*) markedTextStyle
readwritenonatomiccopy
var markedTextStyle
readwritenonatomiccopy
local markedTextStyle
readwritenonatomiccopy
- (BOOL) multiSampling
readwritenonatomicassign
var multiSampling
readwritenonatomicassign
local multiSampling
readwritenonatomicassign
- (NSString*) pixelFormat
readnonatomicassign

pixel format: it could be RGBA8 (32-bit) or RGB565 (16-bit)

var pixelFormat
readnonatomicassign

pixel format: it could be RGBA8 (32-bit) or RGB565 (16-bit)

local pixelFormat
readnonatomicassign

pixel format: it could be RGBA8 (32-bit) or RGB565 (16-bit)

- (UITextRange*) selectedTextRange
readwriteatomiccopy
var selectedTextRange
readwriteatomiccopy
local selectedTextRange
readwriteatomiccopy
- (CGSize) surfaceSize
readnonatomicassign

returns surface size in pixels

var surfaceSize
readnonatomicassign

returns surface size in pixels

local surfaceSize
readnonatomicassign

returns surface size in pixels

- (id<UITextInputTokenizer>
) tokenizer
readnonatomicassign
var tokenizer
readnonatomicassign
local tokenizer
readnonatomicassign

The documentation for this class was generated from the following files: