cocos2d-x  3.0-beta2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EGLView Class Reference

#include <CCEGLView.h>

Inheritance diagram for EGLView:
EGLViewProtocol EGLViewProtocol EGLViewProtocol

Public Member Functions

 EGLView ()
virtual ~EGLView ()
bool isOpenGLReady ()
 Get whether opengl render system is ready, subclass must implement this method. More...
 
void end ()
 Force destroying EGL view, subclass must implement this method. More...
 
void swapBuffers ()
 Exchanges the front and back buffers, subclass must implement this method. More...
 
void setIMEKeyboardState (bool bOpen)
 Open or close IME keyboard , subclass must implement this method. More...
 
var setIMEKeyboardState ( var bOpen)
 Open or close IME keyboard , subclass must implement this method. More...
 
local setIMEKeyboardState ( local bOpen)
 Open or close IME keyboard , subclass must implement this method. More...
 
 EGLView ()
virtual ~EGLView ()
virtual bool isOpenGLReady ()
 Get whether opengl render system is ready, subclass must implement this method. More...
 
virtual void end ()
 Force destroying EGL view, subclass must implement this method. More...
 
local end ()
 Force destroying EGL view, subclass must implement this method. More...
 
virtual void swapBuffers ()
 Exchanges the front and back buffers, subclass must implement this method. More...
 
virtual void setFrameSize (float width, float height)
 Set the frame size of EGL view. More...
 
local setFrameSize ( local width, local height)
 Set the frame size of EGL view. More...
 
virtual void setIMEKeyboardState (bool bOpen)
 Open or close IME keyboard , subclass must implement this method. More...
 
var setIMEKeyboardState ( var bOpen)
 Open or close IME keyboard , subclass must implement this method. More...
 
local setIMEKeyboardState ( local bOpen)
 Open or close IME keyboard , subclass must implement this method. More...
 
bool init (const std::string &viewName, float width, float height, float frameZoomFactor=1.0f)
var init ( var viewName, var width, var height, var 0f)
local init ( local viewName, local width, local height, local 0f)
bool initWithFullScreen (const std::string &viewName)
var initWithFullScreen ( var viewName)
local initWithFullScreen ( local viewName)
float getFrameZoomFactor ()
virtual void setViewPortInPoints (float x, float y, float w, float h)
 Set opengl view port rectangle with points. More...
 
local setViewPortInPoints ( local x, local y, local w, local h)
 Set opengl view port rectangle with points. More...
 
virtual void setScissorInPoints (float x, float y, float w, float h)
 Set Scissor rectangle with points. More...
 
local setScissorInPoints ( local x, local y, local w, local h)
 Set Scissor rectangle with points. More...
 
bool windowShouldClose ()
void pollEvents ()
GLFWwindow * getWindow () const
local getWindow ()
 EGLView ()
 ~EGLView ()
virtual bool isOpenGLReady ()
 Get whether opengl render system is ready, subclass must implement this method. More...
 
virtual bool setContentScaleFactor (float contentScaleFactor)
virtual void end ()
 Force destroying EGL view, subclass must implement this method. More...
 
virtual void swapBuffers ()
 Exchanges the front and back buffers, subclass must implement this method. More...
 
virtual void setIMEKeyboardState (bool bOpen)
 Open or close IME keyboard , subclass must implement this method. More...
 
- Public Member Functions inherited from EGLViewProtocol
 EGLViewProtocol ()
virtual ~EGLViewProtocol ()
virtual void pollInputEvents ()
 Polls input events. More...
 
virtual const SizegetFrameSize () const
 Get the frame size of EGL view. More...
 
virtual Size getVisibleSize () const
 Get the visible area size of opengl viewport. More...
 
virtual Point getVisibleOrigin () const
 Get the visible origin point of opengl viewport. More...
 
local getVisibleOrigin ()
 Get the visible origin point of opengl viewport. More...
 
virtual void setDesignResolutionSize (float width, float height, ResolutionPolicy resolutionPolicy)
 Set the design resolution size. More...
 
local setDesignResolutionSize ( local width, local height, local resolutionPolicy)
 Set the design resolution size. More...
 
virtual const SizegetDesignResolutionSize () const
 Get design resolution size. More...
 
local getDesignResolutionSize ()
 Get design resolution size. More...
 
virtual void setTouchDelegate (EGLTouchDelegate *delegate)
 Set touch delegate. More...
 
local setTouchDelegate ( local delegate)
 Set touch delegate. More...
 
virtual bool isScissorEnabled ()
 Get whether GL_SCISSOR_TEST is enable. More...
 
virtual Rect getScissorRect () const
 Get the current scissor rectangle. More...
 
virtual void setViewName (const std::string &viewname)
local setViewName ( local viewname)
const std::string & getViewName () const
local getViewName ()
virtual void handleTouchesBegin (int num, int ids[], float xs[], float ys[])
 Touch events are handled by default; if you want to customize your handlers, please override these functions: More...
 
virtual void handleTouchesMove (int num, int ids[], float xs[], float ys[])
local handleTouchesMove ( local num)
virtual void handleTouchesEnd (int num, int ids[], float xs[], float ys[])
local handleTouchesEnd ( local num)
virtual void handleTouchesCancel (int num, int ids[], float xs[], float ys[])
const RectgetViewPortRect () const
 Get the opengl view port rectangle. More...
 
float getScaleX () const
 Get scale factor of the horizontal direction. More...
 
float getScaleY () const
 Get scale factor of the vertical direction. More...
 
local getScaleY ()
 Get scale factor of the vertical direction. More...
 

Static Public Member Functions

static EGLViewgetInstance ()
 get the shared main open gl window More...
 
static CC_DEPRECATED_ATTRIBUTE
EGLView
sharedOpenGLView ()
local sharedOpenGLView ()
static EGLViewgetInstance ()
 get the shared main open gl window More...
 
static CC_DEPRECATED_ATTRIBUTE
EGLView
sharedOpenGLView ()
local sharedOpenGLView ()
static EGLViewgetInstance ()
 returns the singleton More...
 
static CC_DEPRECATED_ATTRIBUTE
EGLView
sharedOpenGLView ()

Protected Member Functions

void setFrameZoomFactor (float zoomFactor)
bool initGlew ()
bool isRetina ()
local isRetina ()
- Protected Member Functions inherited from EGLViewProtocol
void handleTouchesOfEndOrCancel (EventTouch::EventCode eventCode, int num, int ids[], float xs[], float ys[])
var handleTouchesOfEndOrCancel ( var eventCode, var num)
local handleTouchesOfEndOrCancel ( local eventCode, local num)

Protected Attributes

bool _captured
bool _supportTouch
var _supportTouch
local _supportTouch
bool _isRetina
float _frameZoomFactor
local _frameZoomFactor
GLFWwindow * _mainWindow
var _mainWindow
local _mainWindow
GLFWmonitor * _primaryMonitor
var _primaryMonitor
local _primaryMonitor
- Protected Attributes inherited from EGLViewProtocol
EGLTouchDelegate * _delegate
Size _screenSize
Size _designResolutionSize
var _designResolutionSize
local _designResolutionSize
Rect _viewPortRect
std::string _viewName
var _viewName
local _viewName
float _scaleX
float _scaleY
ResolutionPolicy _resolutionPolicy
var _resolutionPolicy
local _resolutionPolicy

Static Protected Attributes

static EGLViews_pEglView
var s_pEglView
local s_pEglView

Friends

class EGLViewEventHandler

Constructor & Destructor Documentation

EGLView ( )
var ctor ( )
local EGLView ( )
virtual ~EGLView ( )
virtual
EGLView ( )
var ctor ( )
local EGLView ( )
virtual ~EGLView ( )
virtual
EGLView ( )
~EGLView ( )

Member Function Documentation

void end ( )
virtual

Force destroying EGL view, subclass must implement this method.

Implements EGLViewProtocol.

var end ( )
virtual

Force destroying EGL view, subclass must implement this method.

Implements EGLViewProtocol.

local end ( )
virtual

Force destroying EGL view, subclass must implement this method.

Implements EGLViewProtocol.

virtual void end ( )
virtual

Force destroying EGL view, subclass must implement this method.

Implements EGLViewProtocol.

var end ( )
virtual

Force destroying EGL view, subclass must implement this method.

Implements EGLViewProtocol.

local end ( )
virtual

Force destroying EGL view, subclass must implement this method.

Implements EGLViewProtocol.

virtual void end ( )
virtual

Force destroying EGL view, subclass must implement this method.

Implements EGLViewProtocol.

float getFrameZoomFactor ( )
var getFrameZoomFactor ( )
local getFrameZoomFactor ( )
static EGLView* getInstance ( )
static

get the shared main open gl window

var getInstance ( )
static

get the shared main open gl window

local getInstance ( )
static

get the shared main open gl window

static EGLView* getInstance ( )
static

get the shared main open gl window

var getInstance ( )
static

get the shared main open gl window

local getInstance ( )
static

get the shared main open gl window

static EGLView* getInstance ( )
static

returns the singleton

local getInstance ( )
static

returns the singleton

GLFWwindow* getWindow ( ) const
inline
var getWindow ( )
inline
local getWindow ( )
inline
bool init ( const std::string &  viewName,
float  width,
float  height,
float  frameZoomFactor = 1.0f 
)
var init ( var  viewName,
var  width,
var  height,
var  frameZoomFactor = 1.0f 
)
local init ( local  viewName,
local  width,
local  height,
local  frameZoomFactor = 1.0f 
)
bool initGlew ( )
protected
var initGlew ( )
protected
local initGlew ( )
protected
bool initWithFullScreen ( const std::string &  viewName)
var initWithFullScreen ( var  viewName)
local initWithFullScreen ( local  viewName)
bool isOpenGLReady ( )
virtual

Get whether opengl render system is ready, subclass must implement this method.

Implements EGLViewProtocol.

var isOpenGLReady ( )
virtual

Get whether opengl render system is ready, subclass must implement this method.

Implements EGLViewProtocol.

local isOpenGLReady ( )
virtual

Get whether opengl render system is ready, subclass must implement this method.

Implements EGLViewProtocol.

virtual bool isOpenGLReady ( )
virtual

Get whether opengl render system is ready, subclass must implement this method.

Implements EGLViewProtocol.

virtual bool isOpenGLReady ( )
virtual

Get whether opengl render system is ready, subclass must implement this method.

Implements EGLViewProtocol.

var isOpenGLReady ( )
virtual

Get whether opengl render system is ready, subclass must implement this method.

Implements EGLViewProtocol.

local isOpenGLReady ( )
virtual

Get whether opengl render system is ready, subclass must implement this method.

Implements EGLViewProtocol.

bool isRetina ( )
inlineprotected
var isRetina ( )
inlineprotected
local isRetina ( )
inlineprotected
void pollEvents ( )
var pollEvents ( )
local pollEvents ( )
virtual bool setContentScaleFactor ( float  contentScaleFactor)
virtual
virtual void setFrameSize ( float  width,
float  height 
)
virtual

Set the frame size of EGL view.

Reimplemented from EGLViewProtocol.

var setFrameSize ( var  width,
var  height 
)
virtual

Set the frame size of EGL view.

Reimplemented from EGLViewProtocol.

local setFrameSize ( local  width,
local  height 
)
virtual

Set the frame size of EGL view.

Reimplemented from EGLViewProtocol.

void setFrameZoomFactor ( float  zoomFactor)
protected
var setFrameZoomFactor ( var  zoomFactor)
protected
local setFrameZoomFactor ( local  zoomFactor)
protected
void setIMEKeyboardState ( bool  open)
virtual

Open or close IME keyboard , subclass must implement this method.

Implements EGLViewProtocol.

var setIMEKeyboardState ( var  open)
virtual

Open or close IME keyboard , subclass must implement this method.

Implements EGLViewProtocol.

local setIMEKeyboardState ( local  open)
virtual

Open or close IME keyboard , subclass must implement this method.

Implements EGLViewProtocol.

virtual void setIMEKeyboardState ( bool  open)
virtual

Open or close IME keyboard , subclass must implement this method.

Implements EGLViewProtocol.

var setIMEKeyboardState ( var  open)
virtual

Open or close IME keyboard , subclass must implement this method.

Implements EGLViewProtocol.

local setIMEKeyboardState ( local  open)
virtual

Open or close IME keyboard , subclass must implement this method.

Implements EGLViewProtocol.

virtual void setIMEKeyboardState ( bool  open)
virtual

Open or close IME keyboard , subclass must implement this method.

Implements EGLViewProtocol.

virtual void setScissorInPoints ( float  x,
float  y,
float  w,
float  h 
)
virtual

Set Scissor rectangle with points.

Reimplemented from EGLViewProtocol.

var setScissorInPoints ( var  x,
var  y,
var  w,
var  h 
)
virtual

Set Scissor rectangle with points.

Reimplemented from EGLViewProtocol.

local setScissorInPoints ( local  x,
local  y,
local  w,
local  h 
)
virtual

Set Scissor rectangle with points.

Reimplemented from EGLViewProtocol.

virtual void setViewPortInPoints ( float  x,
float  y,
float  w,
float  h 
)
virtual

Set opengl view port rectangle with points.

Reimplemented from EGLViewProtocol.

var setViewPortInPoints ( var  x,
var  y,
var  w,
var  h 
)
virtual

Set opengl view port rectangle with points.

Reimplemented from EGLViewProtocol.

local setViewPortInPoints ( local  x,
local  y,
local  w,
local  h 
)
virtual

Set opengl view port rectangle with points.

Reimplemented from EGLViewProtocol.

static CC_DEPRECATED_ATTRIBUTE
EGLView* sharedOpenGLView
( )
static
var sharedOpenGLView ( )
static
local sharedOpenGLView ( )
static
static CC_DEPRECATED_ATTRIBUTE
EGLView* sharedOpenGLView
( )
static
var sharedOpenGLView ( )
static
local sharedOpenGLView ( )
static
static CC_DEPRECATED_ATTRIBUTE
EGLView* sharedOpenGLView
( )
static
void swapBuffers ( )
virtual

Exchanges the front and back buffers, subclass must implement this method.

Implements EGLViewProtocol.

var swapBuffers ( )
virtual

Exchanges the front and back buffers, subclass must implement this method.

Implements EGLViewProtocol.

local swapBuffers ( )
virtual

Exchanges the front and back buffers, subclass must implement this method.

Implements EGLViewProtocol.

virtual void swapBuffers ( )
virtual

Exchanges the front and back buffers, subclass must implement this method.

Implements EGLViewProtocol.

var swapBuffers ( )
virtual

Exchanges the front and back buffers, subclass must implement this method.

Implements EGLViewProtocol.

local swapBuffers ( )
virtual

Exchanges the front and back buffers, subclass must implement this method.

Implements EGLViewProtocol.

virtual void swapBuffers ( )
virtual

Exchanges the front and back buffers, subclass must implement this method.

Implements EGLViewProtocol.

bool windowShouldClose ( )
var windowShouldClose ( )
local windowShouldClose ( )

Friends And Related Function Documentation

friend class EGLViewEventHandler
friend
var EGLViewEventHandler
friend
local EGLViewEventHandler
friend

Member Data Documentation

bool _captured
protected
var _captured
protected
local _captured
protected
float _frameZoomFactor
protected
var _frameZoomFactor
protected
local _frameZoomFactor
protected
bool _isRetina
protected
var _isRetina
protected
local _isRetina
protected
GLFWwindow* _mainWindow
protected
var _mainWindow
protected
local _mainWindow
protected
GLFWmonitor* _primaryMonitor
protected
var _primaryMonitor
protected
local _primaryMonitor
protected
bool _supportTouch
protected
var _supportTouch
protected
local _supportTouch
protected
EGLView* s_pEglView
staticprotected
var s_pEglView
staticprotected
local s_pEglView
staticprotected

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