By GLView you can operate the frame information of EGL view through some function. More...
Inherits Ref.
Inherited by GLViewImpl.
Public Member Functions | |
virtual void | end ()=0 |
Force destroying EGL view, subclass must implement this method. | |
local | endToLua () |
Force destroying EGL view, subclass must implement this method. | |
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 bool | windowShouldClose () |
When the window is closed, it will return false if the platforms is Ios or Android. More... | |
virtual void | pollInputEvents () |
local | pollInputEvents () |
virtual void | pollEvents () |
Polls the events. More... | |
var | pollEvents () |
Polls the events. More... | |
local | pollEvents () |
Polls the events. More... | |
virtual Size | getFrameSize () const |
Get the frame size of EGL view. More... | |
var | getFrameSize () |
Get the frame size of EGL view. More... | |
local | getFrameSize () |
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) |
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) |
Hide or Show the mouse cursor if there is one. More... | |
var | setCursorVisible ( var bool) |
Hide or Show the mouse cursor if there is one. More... | |
local | setCursorVisible ( local bool) |
Hide or Show the mouse cursor if there is one. More... | |
virtual int | getRetinaFactor () const |
Get retina factor. More... | |
var | getRetinaFactor () |
Get retina factor. More... | |
local | getRetinaFactor () |
Get retina factor. More... | |
virtual bool | setContentScaleFactor (float) |
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 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 Rect | getSafeAreaRect () const |
Gets safe area rectangle. | |
var | getSafeAreaRect () |
Gets safe area rectangle. | |
local | getSafeAreaRect () |
Gets safe area rectangle. | |
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 Size & | getDesignResolutionSize () 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 | handleTouchesMove (int num, intptr_t ids[], float xs[], float ys[], float fs[], float ms[]) |
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... | |
var | handleTouchesCancel ( var num) |
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 Rect & | getViewPortRect () const |
Get the opengl view port rectangle. More... | |
var | getViewPortRect () |
Get the opengl view port rectangle. More... | |
local | getViewPortRect () |
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... | |
void | renderScene (Scene *scene, Renderer *renderer) |
Renders a Scene with a Renderer This method is called directly by the Director. | |
void | setVR (VRIRenderer *vrrenderer) |
Sets a VR renderer. More... | |
Public Member Functions inherited from Ref | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
local | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
local | getReferenceCount () |
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... | |
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... | |
Additional Inherited Members | |
Public Attributes inherited from Ref | |
unsigned int | _ID |
object id, ScriptSupport need public _ID | |
local | _ID |
object id, ScriptSupport need public _ID | |
int | _luaID |
Lua reference id. | |
local | _luaID |
Lua reference id. | |
void * | _scriptObject |
scriptObject, support for swift | |
local | _scriptObject |
scriptObject, support for swift | |
bool | _rooted |
When true, it means that the object was already rooted. | |
local | _rooted |
When true, it means that the object was already rooted. | |
By GLView you can operate the frame information of EGL view through some function.
|
pure virtual |
Get whether opengl render system is ready, subclass must implement this method.
|
pure virtual |
Get whether opengl render system is ready, subclass must implement this method.
|
pure virtual |
Get whether opengl render system is ready, subclass must implement this method.
|
pure virtual |
Exchanges the front and back buffers, subclass must implement this method.
|
pure virtual |
Exchanges the front and back buffers, subclass must implement this method.
|
pure virtual |
Exchanges the front and back buffers, subclass must implement this method.
|
pure virtual |
Open or close IME keyboard , subclass must implement this method.
open | Open or close IME keyboard. |
|
pure virtual |
Open or close IME keyboard , subclass must implement this method.
open | Open or close IME keyboard. |
|
pure virtual |
Open or close IME keyboard , subclass must implement this method.
open | Open or close IME keyboard. |
|
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.
|
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.
|
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.
|
static |
Static method and member so that we can modify it on all platforms before create OpenGL context.
glContextAttrs | The OpenGL context attrs. |
|
static |
Static method and member so that we can modify it on all platforms before create OpenGL context.
glContextAttrs | The OpenGL context attrs. |
|
static |
Static method and member so that we can modify it on all platforms before create OpenGL context.
glContextAttrs | The OpenGL context attrs. |
|
static |
Return the OpenGL context attrs.
|
static |
Return the OpenGL context attrs.
|
static |
Return the OpenGL context attrs.
|
virtual |
Subclass must implement methods if platform does not provide event callbacks.
|
virtual |
Subclass must implement methods if platform does not provide event callbacks.
|
virtual |
Subclass must implement methods if platform does not provide event callbacks.
|
virtual |
Polls the events.
|
virtual |
Polls the events.
|
virtual |
Polls the events.
|
virtual |
Get the frame size of EGL view.
In general, it returns the screen size since the EGL view is a fullscreen view.
|
virtual |
Get the frame size of EGL view.
In general, it returns the screen size since the EGL view is a fullscreen view.
|
virtual |
Get the frame size of EGL view.
In general, it returns the screen size since the EGL view is a fullscreen view.
|
virtual |
Set the frame size of EGL view.
width | The width of the fram size. |
height | The height of the fram size. |
|
virtual |
Set the frame size of EGL view.
width | The width of the fram size. |
height | The height of the fram size. |
|
virtual |
Set the frame size of EGL view.
width | The width of the fram size. |
height | The height of the fram size. |
|
inlinevirtual |
Set zoom factor for frame.
This methods are for debugging big resolution (e.g.new ipad) app on desktop.
zoomFactor | The zoom factor for frame. |
|
inlinevirtual |
Set zoom factor for frame.
This methods are for debugging big resolution (e.g.new ipad) app on desktop.
zoomFactor | The zoom factor for frame. |
|
inlinevirtual |
Set zoom factor for frame.
This methods are for debugging big resolution (e.g.new ipad) app on desktop.
zoomFactor | The zoom factor for frame. |
|
inlinevirtual |
Get zoom factor for frame.
This methods are for debugging big resolution (e.g.new ipad) app on desktop.
|
inlinevirtual |
Get zoom factor for frame.
This methods are for debugging big resolution (e.g.new ipad) app on desktop.
|
inlinevirtual |
Get zoom factor for frame.
This methods are for debugging big resolution (e.g.new ipad) app on desktop.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Get retina factor.
|
inlinevirtual |
Get retina factor.
|
inlinevirtual |
Get retina factor.
|
inlinevirtual |
Only works on ios platform.
Set Content Scale of the Factor.
|
inlinevirtual |
Only works on ios platform.
Set Content Scale of the Factor.
|
inlinevirtual |
Only works on ios platform.
Set Content Scale of the Factor.
|
inlinevirtual |
Only works on ios platform.
Get Content Scale of the Factor.
|
inlinevirtual |
Only works on ios platform.
Get Content Scale of the Factor.
|
inlinevirtual |
Only works on ios platform.
Get Content Scale of the Factor.
|
inlinevirtual |
Returns whether or not the view is in Retina Display mode.
|
inlinevirtual |
Returns whether or not the view is in Retina Display mode.
|
inlinevirtual |
Returns whether or not the view is in Retina Display mode.
|
virtual |
Get the visible area size of opengl viewport.
|
virtual |
Get the visible area size of opengl viewport.
|
virtual |
Get the visible area size of opengl viewport.
|
virtual |
Get the visible origin point of opengl viewport.
|
virtual |
Get the visible origin point of opengl viewport.
|
virtual |
Get the visible origin point of opengl viewport.
|
virtual |
Get the visible rectangle of opengl viewport.
|
virtual |
Get the visible rectangle of opengl viewport.
|
virtual |
Get the visible rectangle of opengl viewport.
|
virtual |
Set the design resolution size.
width | Design resolution width. |
height | Design resolution height. |
resolutionPolicy | The 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 |
Set the design resolution size.
width | Design resolution width. |
height | Design resolution height. |
resolutionPolicy | The 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 |
Set the design resolution size.
width | Design resolution width. |
height | Design resolution height. |
resolutionPolicy | The 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 |
Get design resolution size.
Default resolution size is the same as 'getFrameSize'.
|
virtual |
Get design resolution size.
Default resolution size is the same as 'getFrameSize'.
|
virtual |
Get design resolution size.
Default resolution size is the same as 'getFrameSize'.
|
virtual |
Set opengl view port rectangle with points.
x | Set the points of x. |
y | Set the points of y. |
w | Set the width of the view port |
h | Set the Height of the view port. |
|
virtual |
Set opengl view port rectangle with points.
x | Set the points of x. |
y | Set the points of y. |
w | Set the width of the view port |
h | Set the Height of the view port. |
|
virtual |
Set opengl view port rectangle with points.
x | Set the points of x. |
y | Set the points of y. |
w | Set the width of the view port |
h | Set the Height of the view port. |
|
virtual |
Set Scissor rectangle with points.
x | Set the points of x. |
y | Set the points of y. |
w | Set the width of the view port |
h | Set the Height of the view port. |
|
virtual |
Set Scissor rectangle with points.
x | Set the points of x. |
y | Set the points of y. |
w | Set the width of the view port |
h | Set the Height of the view port. |
|
virtual |
Set Scissor rectangle with points.
x | Set the points of x. |
y | Set the points of y. |
w | Set the width of the view port |
h | Set the Height of the view port. |
|
virtual |
Get whether GL_SCISSOR_TEST is enable.
|
virtual |
Get whether GL_SCISSOR_TEST is enable.
|
virtual |
Get whether GL_SCISSOR_TEST is enable.
|
virtual |
Get the current scissor rectangle.
|
virtual |
Get the current scissor rectangle.
|
virtual |
Get the current scissor rectangle.
|
virtual |
Set the view name.
viewname | A string will be set to the view as name. |
|
virtual |
Set the view name.
viewname | A string will be set to the view as name. |
|
virtual |
Set the view name.
viewname | A string will be set to the view as name. |
const std::string& getViewName | ( | ) | const |
Get the view name.
var getViewName | ( | ) |
Get the view name.
local getViewName | ( | ) |
Get the view name.
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
fs | The force of 3d touches. ms The maximum force of 3d touches |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
fs | The force of 3d touches. ms The maximum force of 3d touches |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
fs | The force of 3d touches. ms The maximum force of 3d touches |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override this function.
num | The number of touch. |
ids | The identity of the touch. |
xs | The points of x. |
ys | The points of y. |
const Rect& getViewPortRect | ( | ) | const |
Get the opengl view port rectangle.
var getViewPortRect | ( | ) |
Get the opengl view port rectangle.
local getViewPortRect | ( | ) |
Get the opengl view port rectangle.
std::vector<Touch*> getAllTouches | ( | ) | const |
Get list of all active touches.
var getAllTouches | ( | ) |
Get list of all active touches.
local getAllTouches | ( | ) |
Get list of all active touches.
float getScaleX | ( | ) | const |
Get scale factor of the horizontal direction.
var getScaleX | ( | ) |
Get scale factor of the horizontal direction.
local getScaleX | ( | ) |
Get scale factor of the horizontal direction.
float getScaleY | ( | ) | const |
Get scale factor of the vertical direction.
var getScaleY | ( | ) |
Get scale factor of the vertical direction.
local getScaleY | ( | ) |
Get scale factor of the vertical direction.
|
inline |
Returns the current Resolution policy.
|
inline |
Returns the current Resolution policy.
|
inline |
Returns the current Resolution policy.
void setVR | ( | VRIRenderer * | vrrenderer | ) |
Sets a VR renderer.
if vrrenderer
is nullptr
VR will be disabled
var setVR | ( | var | vrrenderer | ) |
Sets a VR renderer.
if vrrenderer
is nullptr
VR will be disabled
local setVR | ( | local | vrrenderer | ) |
Sets a VR renderer.
if vrrenderer
is nullptr
VR will be disabled
|
static |
The OpenGL context attrs.
|
static |
The OpenGL context attrs.
|
static |
The OpenGL context attrs.