cocos2d-x  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GLView Class Referenceabstract

By GLView you can operate the frame information of EGL view through some function. More...

#include <CCGLView.h>

Inheritance diagram for GLView:
Ref GLViewImpl GLViewImpl GLViewImpl GLViewImpl GLViewImpl GLViewImpl

Public Member Functions

 GLView ()
 ctor ()
 GLView ()
virtual ~GLView ()
virtual void end ()=0
 Force destroying EGL view, subclass must implement this method. More...
 
var end ()
 Force destroying EGL view, subclass must implement this method. More...
 
local end ()
 Force destroying EGL view, subclass must implement this method. More...
 
virtual bool isOpenGLReady ()=0
 Get whether opengl render system is ready, subclass must implement this method. More...
 
virtual void swapBuffers ()=0
 Exchanges the front and back buffers, subclass must implement this method. More...
 
virtual void setIMEKeyboardState (bool open)=0
 Open or close IME keyboard , subclass must implement this method. More...
 
var setIMEKeyboardState ( var open)
 Open or close IME keyboard , subclass must implement this method. More...
 
local setIMEKeyboardState ( local open)
 Open or close IME keyboard , subclass must implement this method. More...
 
virtual void setIMEKeyboardState (bool open, std::string str)=0
var setIMEKeyboardState ( var open, var str)
virtual bool windowShouldClose ()
 When the window is closed, it will return false if the platforms is Ios or Android. More...
 
virtual void pollInputEvents ()
var pollInputEvents ()
local pollInputEvents ()
virtual void pollEvents ()
 Polls the events. More...
 
var pollEvents ()
 Polls the events. More...
 
local pollEvents ()
 Polls the events. More...
 
virtual const SizegetFrameSize () const
 Get the frame size of EGL view. More...
 
virtual void setFrameSize (float width, float height)
 Set the frame size of EGL view. More...
 
var setFrameSize ( var width, var 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 setFrameZoomFactor (float zoomFactor)
 Set zoom factor for frame. More...
 
local setFrameZoomFactor ( local zoomFactor)
 Set zoom factor for frame. More...
 
virtual float getFrameZoomFactor () const
 Get zoom factor for frame. More...
 
var getFrameZoomFactor ()
 Get zoom factor for frame. More...
 
local getFrameZoomFactor ()
 Get zoom factor for frame. More...
 
virtual void setCursorVisible (bool isVisible)
 Hide or Show the mouse cursor if there is one. More...
 
var setCursorVisible ( var isVisible)
 Hide or Show the mouse cursor if there is one. More...
 
local setCursorVisible ( local isVisible)
 Hide or Show the mouse cursor if there is one. More...
 
virtual int getRetinaFactor () const
 Get retina factor. More...
 
virtual bool setContentScaleFactor (float scaleFactor)
 Only works on ios platform. More...
 
virtual float getContentScaleFactor () const
 Only works on ios platform. More...
 
var getContentScaleFactor ()
 Only works on ios platform. More...
 
local getContentScaleFactor ()
 Only works on ios platform. More...
 
virtual bool isRetinaDisplay () const
 Returns whether or not the view is in Retina Display mode. More...
 
virtual void * getEAGLView () const
virtual Size getRenerTargetSize () const =0
local getRenerTargetSize ()
virtual const Mat4getOrientationMatrix () const =0
local getOrientationMatrix ()
virtual const Mat4getReverseOrientationMatrix () const =0
var getReverseOrientationMatrix ()
local getReverseOrientationMatrix ()
virtual Size getVisibleSize () const
 Get the visible area size of opengl viewport. More...
 
var getVisibleSize ()
 Get the visible area size of opengl viewport. More...
 
local getVisibleSize ()
 Get the visible area size of opengl viewport. More...
 
virtual Vec2 getVisibleOrigin () const
 Get the visible origin point of opengl viewport. More...
 
local getVisibleOrigin ()
 Get the visible origin point of opengl viewport. More...
 
virtual Rect getVisibleRect () const
 Get the visible rectangle 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...
 
virtual void setViewPortInPoints (float x, float y, float w, float 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...
 
virtual bool isScissorEnabled ()
 Get whether GL_SCISSOR_TEST is enable. More...
 
virtual Rect getScissorRect () const
 Get the current scissor rectangle. More...
 
var getScissorRect ()
 Get the current scissor rectangle. More...
 
local getScissorRect ()
 Get the current scissor rectangle. More...
 
virtual void setViewName (const std::string &viewname)
 Set the view name. More...
 
const std::string & getViewName () const
 Get the view name. More...
 
virtual void handleTouchesBegin (int num, intptr_t ids[], float xs[], float ys[])
 Touch events are handled by default; if you want to customize your handlers, please override this function. More...
 
virtual void handleTouchesMove (int num, intptr_t ids[], float xs[], float ys[])
 Touch events are handled by default; if you want to customize your handlers, please override this function. More...
 
var handleTouchesMove ( var num)
 Touch events are handled by default; if you want to customize your handlers, please override this function. More...
 
local handleTouchesMove ( local num)
 Touch events are handled by default; if you want to customize your handlers, please override this function. More...
 
virtual void handleTouchesEnd (int num, intptr_t ids[], float xs[], float ys[])
 Touch events are handled by default; if you want to customize your handlers, please override this function. More...
 
local handleTouchesEnd ( local num)
 Touch events are handled by default; if you want to customize your handlers, please override this function. More...
 
virtual void handleTouchesCancel (int num, intptr_t ids[], float xs[], float ys[])
 Touch events are handled by default; if you want to customize your handlers, please override this function. More...
 
local handleTouchesCancel ( local num)
 Touch events are handled by default; if you want to customize your handlers, please override this function. More...
 
const RectgetViewPortRect () const
 Get the opengl view port rectangle. More...
 
std::vector< Touch * > getAllTouches () const
 Get list of all active touches. More...
 
float getScaleX () const
 Get scale factor of the horizontal direction. More...
 
var getScaleX ()
 Get scale factor of the horizontal direction. More...
 
local getScaleX ()
 Get scale factor of the horizontal direction. More...
 
float getScaleY () const
 Get scale factor of the vertical direction. More...
 
var getScaleY ()
 Get scale factor of the vertical direction. More...
 
local getScaleY ()
 Get scale factor of the vertical direction. More...
 
ResolutionPolicy getResolutionPolicy () const
 Returns the current Resolution policy. More...
 
var getResolutionPolicy ()
 Returns the current Resolution policy. More...
 
local getResolutionPolicy ()
 Returns the current Resolution policy. More...
 
virtual HWND getWin32Window ()=0
var getWin32Window ()
local getWin32Window ()
virtual id getCocoaWindow ()=0
var getCocoaWindow ()
local getCocoaWindow ()
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor. More...
 

Static Public Member Functions

static void setGLContextAttrs (GLContextAttrs &glContextAttrs)
 Static method and member so that we can modify it on all platforms before create OpenGL context. More...
 
var setGLContextAttrs ( var glContextAttrs)
 Static method and member so that we can modify it on all platforms before create OpenGL context. More...
 
local setGLContextAttrs ( local glContextAttrs)
 Static method and member so that we can modify it on all platforms before create OpenGL context. More...
 
static GLContextAttrs getGLContextAttrs ()
 Return the OpenGL context attrs. More...
 
var getGLContextAttrs ()
 Return the OpenGL context attrs. More...
 
local getGLContextAttrs ()
 Return the OpenGL context attrs. More...
 

Static Public Attributes

static GLContextAttrs _glContextAttrs
 The OpenGL context attrs. More...
 
var _glContextAttrs
 The OpenGL context attrs. More...
 
local _glContextAttrs
 The OpenGL context attrs. More...
 

Protected Member Functions

void updateDesignResolutionSize ()
var updateDesignResolutionSize ()
local updateDesignResolutionSize ()
void handleTouchesOfEndOrCancel (EventTouch::EventCode eventCode, int num, intptr_t ids[], float xs[], float ys[])
var handleTouchesOfEndOrCancel ( var eventCode, var num)
local handleTouchesOfEndOrCancel ( local eventCode, local num)
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

Protected Attributes

Size _screenSize
Size _designResolutionSize
var _designResolutionSize
local _designResolutionSize
Rect _viewPortRect
var _viewPortRect
local _viewPortRect
std::string _viewName
var _viewName
local _viewName
float _scaleX
var _scaleX
local _scaleX
float _scaleY
var _scaleY
local _scaleY
ResolutionPolicy _resolutionPolicy
var _resolutionPolicy
local _resolutionPolicy
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
local _referenceCount
 count of references More...
 

Detailed Description

By GLView you can operate the frame information of EGL view through some function.

Constructor & Destructor Documentation

GLView ( )
var ctor ( )
local GLView ( )
virtual ~GLView ( )
virtual

Member Function Documentation

virtual void end ( )
pure virtual

Force destroying EGL view, subclass must implement this method.

Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

var end ( )
pure virtual

Force destroying EGL view, subclass must implement this method.

Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

local end ( )
pure virtual

Force destroying EGL view, subclass must implement this method.

Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

std::vector<Touch*> getAllTouches ( ) const

Get list of all active touches.

Returns
A list of all active touches.
var getAllTouches ( )

Get list of all active touches.

Returns
A list of all active touches.
local getAllTouches ( )

Get list of all active touches.

Returns
A list of all active touches.
virtual id getCocoaWindow ( )
pure virtual

Implemented in GLViewImpl.

var getCocoaWindow ( )
pure virtual

Implemented in GLViewImpl.

local getCocoaWindow ( )
pure virtual

Implemented in GLViewImpl.

virtual float getContentScaleFactor ( ) const
inlinevirtual

Only works on ios platform.

Get Content Scale of the Factor.

Reimplemented in GLViewImpl.

var getContentScaleFactor ( )
inlinevirtual

Only works on ios platform.

Get Content Scale of the Factor.

Reimplemented in GLViewImpl.

local getContentScaleFactor ( )
inlinevirtual

Only works on ios platform.

Get Content Scale of the Factor.

Reimplemented in GLViewImpl.

virtual const Size&
getDesignResolutionSize
( ) const
virtual

Get design resolution size.

Default resolution size is the same as 'getFrameSize'.

Returns
The design resolution size.
var getDesignResolutionSize ( )
virtual

Get design resolution size.

Default resolution size is the same as 'getFrameSize'.

Returns
The design resolution size.
local getDesignResolutionSize ( )
virtual

Get design resolution size.

Default resolution size is the same as 'getFrameSize'.

Returns
The design resolution size.
virtual void* getEAGLView ( ) const
inlinevirtual

Reimplemented in GLViewImpl.

var getEAGLView ( )
inlinevirtual

Reimplemented in GLViewImpl.

local getEAGLView ( )
inlinevirtual

Reimplemented in GLViewImpl.

virtual const Size& getFrameSize ( ) const
virtual

Get the frame size of EGL view.

In general, it returns the screen size since the EGL view is a fullscreen view.

Returns
The frame size of EGL view.
var getFrameSize ( )
virtual

Get the frame size of EGL view.

In general, it returns the screen size since the EGL view is a fullscreen view.

Returns
The frame size of EGL view.
local getFrameSize ( )
virtual

Get the frame size of EGL view.

In general, it returns the screen size since the EGL view is a fullscreen view.

Returns
The frame size of EGL view.
virtual float getFrameZoomFactor ( ) const
inlinevirtual

Get zoom factor for frame.

This methods are for debugging big resolution (e.g.new ipad) app on desktop.

Returns
The zoom factor for frame.

Reimplemented in GLViewImpl.

var getFrameZoomFactor ( )
inlinevirtual

Get zoom factor for frame.

This methods are for debugging big resolution (e.g.new ipad) app on desktop.

Returns
The zoom factor for frame.

Reimplemented in GLViewImpl.

local getFrameZoomFactor ( )
inlinevirtual

Get zoom factor for frame.

This methods are for debugging big resolution (e.g.new ipad) app on desktop.

Returns
The zoom factor for frame.

Reimplemented in GLViewImpl.

static GLContextAttrs
getGLContextAttrs
( )
static

Return the OpenGL context attrs.

Returns
Return the OpenGL context attrs.
var getGLContextAttrs ( )
static

Return the OpenGL context attrs.

Returns
Return the OpenGL context attrs.
local getGLContextAttrs ( )
static

Return the OpenGL context attrs.

Returns
Return the OpenGL context attrs.
virtual const Mat4&
getOrientationMatrix
( ) const
pure virtual

Implemented in GLViewImpl.

var getOrientationMatrix ( )
pure virtual

Implemented in GLViewImpl.

local getOrientationMatrix ( )
pure virtual

Implemented in GLViewImpl.

virtual Size getRenerTargetSize ( ) const
pure virtual

Implemented in GLViewImpl, and GLViewImpl.

var getRenerTargetSize ( )
pure virtual

Implemented in GLViewImpl, and GLViewImpl.

local getRenerTargetSize ( )
pure virtual

Implemented in GLViewImpl, and GLViewImpl.

ResolutionPolicy
getResolutionPolicy
( ) const
inline

Returns the current Resolution policy.

Returns
The current Resolution policy.
var getResolutionPolicy ( )
inline

Returns the current Resolution policy.

Returns
The current Resolution policy.
local getResolutionPolicy ( )
inline

Returns the current Resolution policy.

Returns
The current Resolution policy.
virtual int getRetinaFactor ( ) const
inlinevirtual

Get retina factor.

Returns
The retina factor.

Reimplemented in GLViewImpl.

var getRetinaFactor ( )
inlinevirtual

Get retina factor.

Returns
The retina factor.

Reimplemented in GLViewImpl.

local getRetinaFactor ( )
inlinevirtual

Get retina factor.

Returns
The retina factor.

Reimplemented in GLViewImpl.

virtual const Mat4&
getReverseOrientationMatrix
( ) const
pure virtual

Implemented in GLViewImpl.

var getReverseOrientationMatrix ( )
pure virtual

Implemented in GLViewImpl.

local getReverseOrientationMatrix ( )
pure virtual

Implemented in GLViewImpl.

float getScaleX ( ) const

Get scale factor of the horizontal direction.

Returns
Scale factor of the horizontal direction.
var getScaleX ( )

Get scale factor of the horizontal direction.

Returns
Scale factor of the horizontal direction.
local getScaleX ( )

Get scale factor of the horizontal direction.

Returns
Scale factor of the horizontal direction.
float getScaleY ( ) const

Get scale factor of the vertical direction.

Returns
Scale factor of the vertical direction.
var getScaleY ( )

Get scale factor of the vertical direction.

Returns
Scale factor of the vertical direction.
local getScaleY ( )

Get scale factor of the vertical direction.

Returns
Scale factor of the vertical direction.
virtual Rect getScissorRect ( ) const
virtual

Get the current scissor rectangle.

Returns
The current scissor rectangle.
var getScissorRect ( )
virtual

Get the current scissor rectangle.

Returns
The current scissor rectangle.
local getScissorRect ( )
virtual

Get the current scissor rectangle.

Returns
The current scissor rectangle.
const std::string& getViewName ( ) const

Get the view name.

Returns
The view name.
var getViewName ( )

Get the view name.

Returns
The view name.
local getViewName ( )

Get the view name.

Returns
The view name.
const Rect& getViewPortRect ( ) const

Get the opengl view port rectangle.

Returns
Return the opengl view port rectangle.
var getViewPortRect ( )

Get the opengl view port rectangle.

Returns
Return the opengl view port rectangle.
local getViewPortRect ( )

Get the opengl view port rectangle.

Returns
Return the opengl view port rectangle.
virtual Vec2 getVisibleOrigin ( ) const
virtual

Get the visible origin point of opengl viewport.

Returns
The visible origin point of opengl viewport.
var getVisibleOrigin ( )
virtual

Get the visible origin point of opengl viewport.

Returns
The visible origin point of opengl viewport.
local getVisibleOrigin ( )
virtual

Get the visible origin point of opengl viewport.

Returns
The visible origin point of opengl viewport.
virtual Rect getVisibleRect ( ) const
virtual

Get the visible rectangle of opengl viewport.

Returns
The visible rectangle of opengl viewport.
var getVisibleRect ( )
virtual

Get the visible rectangle of opengl viewport.

Returns
The visible rectangle of opengl viewport.
local getVisibleRect ( )
virtual

Get the visible rectangle of opengl viewport.

Returns
The visible rectangle of opengl viewport.
virtual Size getVisibleSize ( ) const
virtual

Get the visible area size of opengl viewport.

Returns
The visible area size of opengl viewport.
var getVisibleSize ( )
virtual

Get the visible area size of opengl viewport.

Returns
The visible area size of opengl viewport.
local getVisibleSize ( )
virtual

Get the visible area size of opengl viewport.

Returns
The visible area size of opengl viewport.
virtual HWND getWin32Window ( )
pure virtual

Implemented in GLViewImpl.

var getWin32Window ( )
pure virtual

Implemented in GLViewImpl.

local getWin32Window ( )
pure virtual

Implemented in GLViewImpl.

virtual void handleTouchesBegin ( int  num,
intptr_t  ids[],
float  xs[],
float  ys[] 
)
virtual

Touch events are handled by default; if you want to customize your handlers, please override this function.

Parameters
numThe number of touch.
idsThe identity of the touch.
xsThe points of x.
ysThe points of y.
var handleTouchesBegin ( var  num,
var  ids[],
var  xs[],
var  ys[] 
)
virtual

Touch events are handled by default; if you want to customize your handlers, please override this function.

Parameters
numThe number of touch.
idsThe identity of the touch.
xsThe points of x.
ysThe points of y.
local handleTouchesBegin ( local  num,
local  ids[],
local  xs[],
local  ys[] 
)
virtual

Touch events are handled by default; if you want to customize your handlers, please override this function.

Parameters
numThe number of touch.
idsThe identity of the touch.
xsThe points of x.
ysThe points of y.
virtual void handleTouchesCancel ( int  num,
intptr_t  ids[],
float  xs[],
float  ys[] 
)
virtual

Touch events are handled by default; if you want to customize your handlers, please override this function.

Parameters
numThe number of touch.
idsThe identity of the touch.
xsThe points of x.
ysThe points of y.
var handleTouchesCancel ( var  num,
var  ids[],
var  xs[],
var  ys[] 
)
virtual

Touch events are handled by default; if you want to customize your handlers, please override this function.

Parameters
numThe number of touch.
idsThe identity of the touch.
xsThe points of x.
ysThe points of y.
local handleTouchesCancel ( local  num,
local  ids[],
local  xs[],
local  ys[] 
)
virtual

Touch events are handled by default; if you want to customize your handlers, please override this function.

Parameters
numThe number of touch.
idsThe identity of the touch.
xsThe points of x.
ysThe points of y.
virtual void handleTouchesEnd ( int  num,
intptr_t  ids[],
float  xs[],
float  ys[] 
)
virtual

Touch events are handled by default; if you want to customize your handlers, please override this function.

Parameters
numThe number of touch.
idsThe identity of the touch.
xsThe points of x.
ysThe points of y.
var handleTouchesEnd ( var  num,
var  ids[],
var  xs[],
var  ys[] 
)
virtual

Touch events are handled by default; if you want to customize your handlers, please override this function.

Parameters
numThe number of touch.
idsThe identity of the touch.
xsThe points of x.
ysThe points of y.
local handleTouchesEnd ( local  num,
local  ids[],
local  xs[],
local  ys[] 
)
virtual

Touch events are handled by default; if you want to customize your handlers, please override this function.

Parameters
numThe number of touch.
idsThe identity of the touch.
xsThe points of x.
ysThe points of y.
virtual void handleTouchesMove ( int  num,
intptr_t  ids[],
float  xs[],
float  ys[] 
)
virtual

Touch events are handled by default; if you want to customize your handlers, please override this function.

Parameters
numThe number of touch.
idsThe identity of the touch.
xsThe points of x.
ysThe points of y.
var handleTouchesMove ( var  num,
var  ids[],
var  xs[],
var  ys[] 
)
virtual

Touch events are handled by default; if you want to customize your handlers, please override this function.

Parameters
numThe number of touch.
idsThe identity of the touch.
xsThe points of x.
ysThe points of y.
local handleTouchesMove ( local  num,
local  ids[],
local  xs[],
local  ys[] 
)
virtual

Touch events are handled by default; if you want to customize your handlers, please override this function.

Parameters
numThe number of touch.
idsThe identity of the touch.
xsThe points of x.
ysThe points of y.
void handleTouchesOfEndOrCancel ( EventTouch::EventCode  eventCode,
int  num,
intptr_t  ids[],
float  xs[],
float  ys[] 
)
protected
var handleTouchesOfEndOrCancel ( var  eventCode,
var  num,
var  ids[],
var  xs[],
var  ys[] 
)
protected
local handleTouchesOfEndOrCancel ( local  eventCode,
local  num,
local  ids[],
local  xs[],
local  ys[] 
)
protected
virtual bool isOpenGLReady ( )
pure virtual

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

Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

var isOpenGLReady ( )
pure virtual

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

Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

local isOpenGLReady ( )
pure virtual

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

Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

virtual bool isRetinaDisplay ( ) const
inlinevirtual

Returns whether or not the view is in Retina Display mode.

Returns
Returns whether or not the view is in Retina Display mode.

Reimplemented in GLViewImpl.

var isRetinaDisplay ( )
inlinevirtual

Returns whether or not the view is in Retina Display mode.

Returns
Returns whether or not the view is in Retina Display mode.

Reimplemented in GLViewImpl.

local isRetinaDisplay ( )
inlinevirtual

Returns whether or not the view is in Retina Display mode.

Returns
Returns whether or not the view is in Retina Display mode.

Reimplemented in GLViewImpl.

virtual bool isScissorEnabled ( )
virtual

Get whether GL_SCISSOR_TEST is enable.

Returns
Whether GL_SCISSOR_TEST is enable.
var isScissorEnabled ( )
virtual

Get whether GL_SCISSOR_TEST is enable.

Returns
Whether GL_SCISSOR_TEST is enable.
local isScissorEnabled ( )
virtual

Get whether GL_SCISSOR_TEST is enable.

Returns
Whether GL_SCISSOR_TEST is enable.
virtual void pollEvents ( )
virtual

Polls the events.

Reimplemented in GLViewImpl.

var pollEvents ( )
virtual

Polls the events.

Reimplemented in GLViewImpl.

local pollEvents ( )
virtual

Polls the events.

Reimplemented in GLViewImpl.

virtual void pollInputEvents ( )
virtual
Deprecated:
Polls input events.

Subclass must implement methods if platform does not provide event callbacks.

var pollInputEvents ( )
virtual
Deprecated:
Polls input events.

Subclass must implement methods if platform does not provide event callbacks.

local pollInputEvents ( )
virtual
Deprecated:
Polls input events.

Subclass must implement methods if platform does not provide event callbacks.

virtual bool setContentScaleFactor ( float  scaleFactor)
inlinevirtual

Only works on ios platform.

Set Content Scale of the Factor.

Reimplemented in GLViewImpl.

var setContentScaleFactor ( var  scaleFactor)
inlinevirtual

Only works on ios platform.

Set Content Scale of the Factor.

Reimplemented in GLViewImpl.

local setContentScaleFactor ( local  scaleFactor)
inlinevirtual

Only works on ios platform.

Set Content Scale of the Factor.

Reimplemented in GLViewImpl.

virtual void setCursorVisible ( bool  isVisible)
inlinevirtual

Hide or Show the mouse cursor if there is one.

Parameters
isVisibleHide or Show the mouse cursor if there is one.

Reimplemented in GLViewImpl.

var setCursorVisible ( var  isVisible)
inlinevirtual

Hide or Show the mouse cursor if there is one.

Parameters
isVisibleHide or Show the mouse cursor if there is one.

Reimplemented in GLViewImpl.

local setCursorVisible ( local  isVisible)
inlinevirtual

Hide or Show the mouse cursor if there is one.

Parameters
isVisibleHide or Show the mouse cursor if there is one.

Reimplemented in GLViewImpl.

virtual void
setDesignResolutionSize
( float  width,
float  height,
ResolutionPolicy  resolutionPolicy 
)
virtual

Set the design resolution size.

Parameters
widthDesign resolution width.
heightDesign resolution height.
resolutionPolicyThe resolution policy desired, you may choose: [1] EXACT_FIT Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched. [2] NO_BORDER Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut. [3] SHOW_ALL Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown.
var setDesignResolutionSize ( var  width,
var  height,
var  resolutionPolicy 
)
virtual

Set the design resolution size.

Parameters
widthDesign resolution width.
heightDesign resolution height.
resolutionPolicyThe resolution policy desired, you may choose: [1] EXACT_FIT Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched. [2] NO_BORDER Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut. [3] SHOW_ALL Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown.
local setDesignResolutionSize ( local  width,
local  height,
local  resolutionPolicy 
)
virtual

Set the design resolution size.

Parameters
widthDesign resolution width.
heightDesign resolution height.
resolutionPolicyThe resolution policy desired, you may choose: [1] EXACT_FIT Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched. [2] NO_BORDER Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut. [3] SHOW_ALL Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown.
virtual void setFrameSize ( float  width,
float  height 
)
virtual

Set the frame size of EGL view.

Parameters
widthThe width of the fram size.
heightThe height of the fram size.

Reimplemented in GLViewImpl, and GLViewImpl.

var setFrameSize ( var  width,
var  height 
)
virtual

Set the frame size of EGL view.

Parameters
widthThe width of the fram size.
heightThe height of the fram size.

Reimplemented in GLViewImpl, and GLViewImpl.

local setFrameSize ( local  width,
local  height 
)
virtual

Set the frame size of EGL view.

Parameters
widthThe width of the fram size.
heightThe height of the fram size.

Reimplemented in GLViewImpl, and GLViewImpl.

virtual void setFrameZoomFactor ( float  zoomFactor)
inlinevirtual

Set zoom factor for frame.

This methods are for debugging big resolution (e.g.new ipad) app on desktop.

Parameters
zoomFactorThe zoom factor for frame.

Reimplemented in GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

var setFrameZoomFactor ( var  zoomFactor)
inlinevirtual

Set zoom factor for frame.

This methods are for debugging big resolution (e.g.new ipad) app on desktop.

Parameters
zoomFactorThe zoom factor for frame.

Reimplemented in GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

local setFrameZoomFactor ( local  zoomFactor)
inlinevirtual

Set zoom factor for frame.

This methods are for debugging big resolution (e.g.new ipad) app on desktop.

Parameters
zoomFactorThe zoom factor for frame.

Reimplemented in GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

static void setGLContextAttrs ( GLContextAttrs glContextAttrs)
static

Static method and member so that we can modify it on all platforms before create OpenGL context.

Parameters
glContextAttrsThe OpenGL context attrs.
var setGLContextAttrs ( var  glContextAttrs)
static

Static method and member so that we can modify it on all platforms before create OpenGL context.

Parameters
glContextAttrsThe OpenGL context attrs.
local setGLContextAttrs ( local  glContextAttrs)
static

Static method and member so that we can modify it on all platforms before create OpenGL context.

Parameters
glContextAttrsThe OpenGL context attrs.
virtual void setIMEKeyboardState ( bool  open)
pure virtual

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

Parameters
openOpen or close IME keyboard.

Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

var setIMEKeyboardState ( var  open)
pure virtual

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

Parameters
openOpen or close IME keyboard.

Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

local setIMEKeyboardState ( local  open)
pure virtual

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

Parameters
openOpen or close IME keyboard.

Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

virtual void setIMEKeyboardState ( bool  open,
std::string  str 
)
pure virtual

Implemented in GLViewImpl, and GLViewImpl.

var setIMEKeyboardState ( var  open,
var  str 
)
pure virtual

Implemented in GLViewImpl, and GLViewImpl.

local setIMEKeyboardState ( local  open,
local  str 
)
pure virtual

Implemented in GLViewImpl, and GLViewImpl.

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

Set Scissor rectangle with points.

Parameters
xSet the points of x.
ySet the points of y.
wSet the width of the view port
hSet the Height of the view port.

Reimplemented in GLViewImpl, GLViewImpl, and GLViewImpl.

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

Set Scissor rectangle with points.

Parameters
xSet the points of x.
ySet the points of y.
wSet the width of the view port
hSet the Height of the view port.

Reimplemented in GLViewImpl, GLViewImpl, and GLViewImpl.

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

Set Scissor rectangle with points.

Parameters
xSet the points of x.
ySet the points of y.
wSet the width of the view port
hSet the Height of the view port.

Reimplemented in GLViewImpl, GLViewImpl, and GLViewImpl.

virtual void setViewName ( const std::string &  viewname)
virtual

Set the view name.

Parameters
viewnameA string will be set to the view as name.
var setViewName ( var  viewname)
virtual

Set the view name.

Parameters
viewnameA string will be set to the view as name.
local setViewName ( local  viewname)
virtual

Set the view name.

Parameters
viewnameA string will be set to the view as name.
virtual void setViewPortInPoints ( float  x,
float  y,
float  w,
float  h 
)
virtual

Set opengl view port rectangle with points.

Parameters
xSet the points of x.
ySet the points of y.
wSet the width of the view port
hSet the Height of the view port.

Reimplemented in GLViewImpl, GLViewImpl, and GLViewImpl.

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

Set opengl view port rectangle with points.

Parameters
xSet the points of x.
ySet the points of y.
wSet the width of the view port
hSet the Height of the view port.

Reimplemented in GLViewImpl, GLViewImpl, and GLViewImpl.

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

Set opengl view port rectangle with points.

Parameters
xSet the points of x.
ySet the points of y.
wSet the width of the view port
hSet the Height of the view port.

Reimplemented in GLViewImpl, GLViewImpl, and GLViewImpl.

virtual void swapBuffers ( )
pure virtual

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

Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

var swapBuffers ( )
pure virtual

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

Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

local swapBuffers ( )
pure virtual

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

Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.

void updateDesignResolutionSize ( )
protected
var updateDesignResolutionSize ( )
protected
local updateDesignResolutionSize ( )
protected
virtual bool windowShouldClose ( )
inlinevirtual

When the window is closed, it will return false if the platforms is Ios or Android.

If the platforms is windows or Mac,it will return true.

Returns
In ios and android it will return false,if in windows or Mac it will return true.

Reimplemented in GLViewImpl.

var windowShouldClose ( )
inlinevirtual

When the window is closed, it will return false if the platforms is Ios or Android.

If the platforms is windows or Mac,it will return true.

Returns
In ios and android it will return false,if in windows or Mac it will return true.

Reimplemented in GLViewImpl.

local windowShouldClose ( )
inlinevirtual

When the window is closed, it will return false if the platforms is Ios or Android.

If the platforms is windows or Mac,it will return true.

Returns
In ios and android it will return false,if in windows or Mac it will return true.

Reimplemented in GLViewImpl.

Member Data Documentation

Size _designResolutionSize
protected
var _designResolutionSize
protected
local _designResolutionSize
protected
GLContextAttrs _glContextAttrs
static

The OpenGL context attrs.

var _glContextAttrs
static

The OpenGL context attrs.

local _glContextAttrs
static

The OpenGL context attrs.

ResolutionPolicy _resolutionPolicy
protected
var _resolutionPolicy
protected
local _resolutionPolicy
protected
float _scaleX
protected
var _scaleX
protected
local _scaleX
protected
float _scaleY
protected
var _scaleY
protected
local _scaleY
protected
Size _screenSize
protected
std::string _viewName
protected
var _viewName
protected
local _viewName
protected
Rect _viewPortRect
protected
var _viewPortRect
protected
local _viewPortRect
protected

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