#include <CCGLView.h>
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... | |
| 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) |
| local | setIMEKeyboardState ( local open, local str) |
| virtual bool | windowShouldClose () |
| var | windowShouldClose () |
| local | windowShouldClose () |
| virtual void | pollInputEvents () |
| Polls input events. More... | |
| var | pollInputEvents () |
| Polls input events. More... | |
| local | pollInputEvents () |
| Polls input events. More... | |
| virtual void | pollEvents () |
| virtual const 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 zoomFactor) |
| Set and get zoom factor for frame. More... | |
| local | setFrameZoomFactor ( local zoomFactor) |
| Set and get zoom factor for frame. More... | |
| virtual float | getFrameZoomFactor () const |
| virtual int | getRetinaFactor () const |
| Get retina factor. More... | |
| var | getRetinaFactor () |
| Get retina factor. More... | |
| local | getRetinaFactor () |
| Get retina factor. More... | |
| virtual bool | setContentScaleFactor (float scaleFactor) |
| only works on ios platform More... | |
| virtual float | getContentScaleFactor () const |
| local | getContentScaleFactor () |
| virtual bool | isRetinaDisplay () const |
| returns whether or not the view is in Retina Display mode More... | |
| var | isRetinaDisplay () |
| returns whether or not the view is in Retina Display mode More... | |
| local | isRetinaDisplay () |
| returns whether or not the view is in Retina Display mode More... | |
| virtual void * | getEAGLView () const |
| var | getEAGLView () |
| local | getEAGLView () |
| virtual Size | getRenerTargetSize () const =0 |
| local | getRenerTargetSize () |
| virtual const Mat4 & | getOrientationMatrix () const =0 |
| local | getOrientationMatrix () |
| virtual const Mat4 & | getReverseOrientationMatrix () 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... | |
| var | getVisibleRect () |
| Get the visible rectangle of opengl viewport. More... | |
| local | getVisibleRect () |
| 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 Size & | getDesignResolutionSize () const |
| Get design resolution size. More... | |
| var | getDesignResolutionSize () |
| Get design resolution size. More... | |
| local | getDesignResolutionSize () |
| 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) |
| local | setViewName ( local viewname) |
| const std::string & | getViewName () const |
| var | getViewName () |
| local | getViewName () |
| 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 these functions: More... | |
| virtual void | handleTouchesMove (int num, intptr_t ids[], float xs[], float ys[]) |
| var | handleTouchesMove ( var num) |
| local | handleTouchesMove ( local num) |
| virtual void | handleTouchesEnd (int num, intptr_t ids[], float xs[], float ys[]) |
| local | handleTouchesEnd ( local num) |
| virtual void | handleTouchesCancel (int num, intptr_t ids[], float xs[], float ys[]) |
| var | handleTouchesCancel ( var num) |
| local | handleTouchesCancel ( local num) |
| const Rect & | getViewPortRect () 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 |
| 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... | |
| Ref * | autorelease () |
| Releases the ownership sometime soon automatically. More... | |
| unsigned int | getReferenceCount () const |
| Returns the Ref's current reference count. More... | |
| virtual | ~Ref () |
Static Public Member Functions | |
| static void | setGLContextAttrs (GLContextAttrs &glContextAttrs) |
| local | setGLContextAttrs ( local glContextAttrs) |
| static GLContextAttrs | getGLContextAttrs () |
| var | getGLContextAttrs () |
| local | getGLContextAttrs () |
Static Public Attributes | |
| static GLContextAttrs | _glContextAttrs |
| var | _glContextAttrs |
| local | _glContextAttrs |
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 |
| var | _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... | |
| var | _referenceCount |
| count of references More... | |
| local | _referenceCount |
| count of references More... | |
| GLView | ( | ) |
| var ctor | ( | ) |
| local GLView | ( | ) |
|
virtual |
|
pure virtual |
Force destroying EGL view, subclass must implement this method.
Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
pure virtual |
Force destroying EGL view, subclass must implement this method.
Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
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.
| var getAllTouches | ( | ) |
Get list of all active touches.
| local getAllTouches | ( | ) |
Get list of all active touches.
|
pure virtual |
Implemented in GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl.
|
inlinevirtual |
Reimplemented in GLViewImpl.
|
inlinevirtual |
Reimplemented in GLViewImpl.
|
inlinevirtual |
Reimplemented in GLViewImpl.
|
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'.
|
inlinevirtual |
Reimplemented in GLViewImpl.
|
inlinevirtual |
Reimplemented in GLViewImpl.
|
inlinevirtual |
Reimplemented in GLViewImpl.
|
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.
|
inlinevirtual |
Reimplemented in GLViewImpl.
|
inlinevirtual |
Reimplemented in GLViewImpl.
|
inlinevirtual |
Reimplemented in GLViewImpl.
|
static |
|
static |
|
static |
|
pure virtual |
Implemented in GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl, and GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl, and GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl, and GLViewImpl.
|
inline |
returns the current Resolution policy
|
inline |
returns the current Resolution policy
|
inline |
returns the current Resolution policy
|
inlinevirtual |
Get retina factor.
Reimplemented in GLViewImpl.
|
inlinevirtual |
Get retina factor.
Reimplemented in GLViewImpl.
|
inlinevirtual |
Get retina factor.
Reimplemented in GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl.
| 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.
|
virtual |
Get the current scissor rectangle.
|
virtual |
Get the current scissor rectangle.
|
virtual |
Get the current scissor rectangle.
| const std::string& getViewName | ( | ) | const |
| var getViewName | ( | ) |
| local getViewName | ( | ) |
| 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.
|
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 |
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.
|
pure virtual |
Implemented in GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl.
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override these functions:
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override these functions:
|
virtual |
Touch events are handled by default; if you want to customize your handlers, please override these functions:
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
|
pure virtual |
Get whether opengl render system is ready, subclass must implement this method.
Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
pure virtual |
Get whether opengl render system is ready, subclass must implement this method.
Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
pure virtual |
Get whether opengl render system is ready, subclass must implement this method.
Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
inlinevirtual |
returns whether or not the view is in Retina Display mode
Reimplemented in GLViewImpl.
|
inlinevirtual |
returns whether or not the view is in Retina Display mode
Reimplemented in GLViewImpl.
|
inlinevirtual |
returns whether or not the view is in Retina Display mode
Reimplemented in GLViewImpl.
|
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 |
Reimplemented in GLViewImpl.
|
virtual |
Reimplemented in GLViewImpl.
|
virtual |
Reimplemented in GLViewImpl.
|
virtual |
Polls input events.
Subclass must implement methods if platform does not provide event callbacks.
|
virtual |
Polls input events.
Subclass must implement methods if platform does not provide event callbacks.
|
virtual |
Polls input events.
Subclass must implement methods if platform does not provide event callbacks.
|
inlinevirtual |
only works on ios platform
Reimplemented in GLViewImpl.
|
inlinevirtual |
only works on ios platform
Reimplemented in GLViewImpl.
|
inlinevirtual |
only works on ios platform
Reimplemented in GLViewImpl.
|
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 |
Set the frame size of EGL view.
Reimplemented in GLViewImpl, and GLViewImpl.
|
virtual |
Set the frame size of EGL view.
Reimplemented in GLViewImpl, and GLViewImpl.
|
virtual |
Set the frame size of EGL view.
Reimplemented in GLViewImpl, and GLViewImpl.
|
inlinevirtual |
Set and get zoom factor for frame.
This two methods are for debugging big resolution (e.g.new ipad) app on desktop.
Reimplemented in GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
inlinevirtual |
Set and get zoom factor for frame.
This two methods are for debugging big resolution (e.g.new ipad) app on desktop.
Reimplemented in GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
inlinevirtual |
Set and get zoom factor for frame.
This two methods are for debugging big resolution (e.g.new ipad) app on desktop.
Reimplemented in GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
static |
|
static |
|
static |
|
pure virtual |
Open or close IME keyboard , subclass must implement this method.
Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
pure virtual |
Open or close IME keyboard , subclass must implement this method.
Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
pure virtual |
Open or close IME keyboard , subclass must implement this method.
Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl, and GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl, and GLViewImpl.
|
pure virtual |
Implemented in GLViewImpl, and GLViewImpl.
|
virtual |
Set Scissor rectangle with points.
Reimplemented in GLViewImpl, GLViewImpl, and GLViewImpl.
|
virtual |
Set Scissor rectangle with points.
Reimplemented in GLViewImpl, GLViewImpl, and GLViewImpl.
|
virtual |
Set Scissor rectangle with points.
Reimplemented in GLViewImpl, GLViewImpl, and GLViewImpl.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Set opengl view port rectangle with points.
Reimplemented in GLViewImpl, GLViewImpl, and GLViewImpl.
|
virtual |
Set opengl view port rectangle with points.
Reimplemented in GLViewImpl, GLViewImpl, and GLViewImpl.
|
virtual |
Set opengl view port rectangle with points.
Reimplemented in GLViewImpl, GLViewImpl, and GLViewImpl.
|
pure virtual |
Exchanges the front and back buffers, subclass must implement this method.
Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
pure virtual |
Exchanges the front and back buffers, subclass must implement this method.
Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
pure virtual |
Exchanges the front and back buffers, subclass must implement this method.
Implemented in GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, GLViewImpl, and GLViewImpl.
|
protected |
|
protected |
|
protected |
|
inlinevirtual |
Reimplemented in GLViewImpl.
|
inlinevirtual |
Reimplemented in GLViewImpl.
|
inlinevirtual |
Reimplemented in GLViewImpl.
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |