Class that represent the OpenGL View. More...
#include <CCGLView.h>
Public Member Functions | |
bool | isOpenGLReady () override |
Get whether opengl render system is ready, subclass must implement this method. More... | |
void | end () override |
Force destroying EGL view, subclass must implement this method. More... | |
void | swapBuffers () override |
Exchanges the front and back buffers, subclass must implement this method. More... | |
void | setIMEKeyboardState (bool bOpen) override |
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... | |
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 () |
virtual bool | isOpenGLReady () override |
Get whether opengl render system is ready, subclass must implement this method. More... | |
local | isOpenGLReady () |
Get whether opengl render system is ready, subclass must implement this method. More... | |
virtual void | end () override |
Force destroying EGL view, subclass must implement this method. More... | |
virtual void | swapBuffers () override |
Exchanges the front and back buffers, subclass must implement this method. More... | |
virtual void | setFrameSize (float width, float height) override |
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 | setIMEKeyboardState (bool bOpen) override |
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... | |
void | setFrameZoomFactor (float zoomFactor) |
void | enableRetina (bool enabled) |
Retina support is disabled by default. More... | |
bool | isRetinaEnabled () |
Check whether retina display is enabled. More... | |
bool | setContentScaleFactor (float contentScaleFactor) |
sets the content scale factor More... | |
float | getContentScaleFactor () const |
returns the content scale factor More... | |
bool | isRetinaDisplay () const |
returns whether or not the view is in Retina Display mode More... | |
void * | getEAGLView () const |
returns the objective-c CCEAGLView instance More... | |
virtual bool | isOpenGLReady () override |
Get whether opengl render system is ready, subclass must implement this method. More... | |
virtual void | end () override |
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 void | swapBuffers () override |
Exchanges the front and back buffers, subclass must implement this method. More... | |
virtual void | setIMEKeyboardState (bool bOpen) override |
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... | |
Public Member Functions inherited from GLViewProtocol | |
GLViewProtocol () | |
virtual | ~GLViewProtocol () |
virtual void | pollInputEvents () |
Polls input events. More... | |
virtual const Size & | getFrameSize () const |
Get the frame size of EGL view. 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 Point | 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 Size & | getDesignResolutionSize () const |
Get design resolution size. More... | |
local | getDesignResolutionSize () |
Get design resolution size. 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 |
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[]) |
virtual void | handleTouchesCancel (int num, int ids[], float xs[], float ys[]) |
const Rect & | getViewPortRect () const |
Get the opengl view port rectangle. More... | |
local | getViewPortRect () |
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... | |
ResolutionPolicy | getResolutionPolicy () const |
returns the current Resolution policy More... | |
var | getResolutionPolicy () |
returns the current Resolution policy More... | |
Public Member Functions inherited from Ref | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Release the ownership immediately. More... | |
Ref * | autorelease () |
Release 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 GLView * | create (const std::string &viewname) |
local | create ( local viewname) |
static GLView * | createWithRect (const std::string &viewName, Rect rect, float frameZoomFactor=1.0f) |
local | createWithRect ( local viewName, local rect, local 0f) |
static GLView * | createWithFullScreen (const std::string &viewName) |
local | createWithFullScreen ( local viewName) |
static GLView * | create (const std::string &viewName) |
static GLView * | createWithRect (const std::string &viewName, Rect size, float frameZoomFactor=1.0f) |
static GLView * | createWithFullScreen (const std::string &viewName) |
local | createWithFullScreen ( local viewName) |
static GLView * | createWithEAGLView (void *eaglview) |
creates a GLView with a objective-c CCEAGLView instance More... | |
local | createWithEAGLView ( local eaglview) |
creates a GLView with a objective-c CCEAGLView instance More... | |
static GLView * | create (const std::string &viewName) |
creates a GLView with a title name in fullscreen mode More... | |
local | create ( local viewName) |
creates a GLView with a title name in fullscreen mode More... | |
static GLView * | createWithRect (const std::string &viewName, Rect rect, float frameZoomFactor=1.0f) |
creates a GLView with a title name, a rect and the zoom factor More... | |
local | createWithRect ( local viewName, local rect, local 0f) |
creates a GLView with a title name, a rect and the zoom factor More... | |
static GLView * | createWithFullScreen (const std::string &viewName) |
creates a GLView with a name in fullscreen mode More... | |
local | createWithFullScreen ( local viewName) |
creates a GLView with a name in fullscreen mode More... | |
Protected Member Functions | |
GLView () | |
virtual | ~GLView () |
bool | initWithRect (const std::string &viewName, Rect rect, float frameZoomFactor) |
var | initWithRect ( var viewName, var rect, var frameZoomFactor) |
local | initWithRect ( local viewName, local rect, local frameZoomFactor) |
bool | initWithFullScreen (const std::string &viewName) |
GLView () | |
virtual | ~GLView () |
bool | initWithRect (const std::string &viewName, Rect rect, float frameZoomFactor) |
var | initWithRect ( var viewName, var rect, var frameZoomFactor) |
local | initWithRect ( local viewName, local rect, local frameZoomFactor) |
bool | initWithFullScreen (const std::string &viewName) |
bool | initGlew () |
void | updateFrameSize () |
void | onGLFWError (int errorID, const char *errorDesc) |
void | onGLFWMouseCallBack (GLFWwindow *window, int button, int action, int modify) |
var | onGLFWMouseCallBack ( var window, var button, var action, var modify) |
local | onGLFWMouseCallBack ( local window, local button, local action, local modify) |
void | onGLFWMouseMoveCallBack (GLFWwindow *window, double x, double y) |
local | onGLFWMouseMoveCallBack ( local window, local x, local y) |
void | onGLFWMouseScrollCallback (GLFWwindow *window, double x, double y) |
void | onGLFWKeyCallback (GLFWwindow *window, int key, int scancode, int action, int mods) |
void | onGLFWCharCallback (GLFWwindow *window, unsigned int character) |
void | onGLFWWindowPosCallback (GLFWwindow *windows, int x, int y) |
void | onGLFWframebuffersize (GLFWwindow *window, int w, int h) |
void | onGLFWWindowSizeFunCallback (GLFWwindow *window, int width, int height) |
GLView () | |
virtual | ~GLView () |
bool | initWithEAGLView (void *eaglview) |
local | initWithEAGLView ( local eaglview) |
bool | initWithRect (const std::string &viewName, Rect rect, float frameZoomFactor) |
bool | initWithFullScreen (const std::string &viewName) |
Protected Member Functions inherited from GLViewProtocol | |
void | updateDesignResolutionSize () |
local | updateDesignResolutionSize () |
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 Member Functions inherited from Ref | |
Ref () | |
Constructor. More... | |
Protected Attributes | |
bool | _captured |
bool | _supportTouch |
var | _supportTouch |
local | _supportTouch |
bool | _isInRetinaMonitor |
var | _isInRetinaMonitor |
local | _isInRetinaMonitor |
bool | _isRetinaEnabled |
int | _retinaFactor |
float | _frameZoomFactor |
var | _frameZoomFactor |
local | _frameZoomFactor |
GLFWwindow * | _mainWindow |
GLFWmonitor * | _primaryMonitor |
var | _primaryMonitor |
local | _primaryMonitor |
float | _mouseX |
float | _mouseY |
void * | _eaglview |
Protected Attributes inherited from GLViewProtocol | |
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 |
Protected Attributes inherited from Ref | |
unsigned int | _referenceCount |
count of references More... | |
Friends | |
class | GLFWEventHandler |
Class that represent the OpenGL View.
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
creates a GLView with a title name in fullscreen mode
|
static |
creates a GLView with a title name in fullscreen mode
|
static |
creates a GLView with a title name in fullscreen mode
|
static |
creates a GLView with a objective-c CCEAGLView instance
|
static |
creates a GLView with a objective-c CCEAGLView instance
|
static |
creates a GLView with a objective-c CCEAGLView instance
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
creates a GLView with a name in fullscreen mode
|
static |
creates a GLView with a name in fullscreen mode
|
static |
creates a GLView with a name in fullscreen mode
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
creates a GLView with a title name, a rect and the zoom factor
|
static |
creates a GLView with a title name, a rect and the zoom factor
|
static |
creates a GLView with a title name, a rect and the zoom factor
void enableRetina | ( | bool | enabled) |
Retina support is disabled by default.
var enableRetina | ( | var | enabled) |
Retina support is disabled by default.
local enableRetina | ( | local | enabled) |
Retina support is disabled by default.
|
overridevirtual |
Force destroying EGL view, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Force destroying EGL view, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Force destroying EGL view, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Force destroying EGL view, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Force destroying EGL view, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Force destroying EGL view, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Force destroying EGL view, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Force destroying EGL view, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Force destroying EGL view, subclass must implement this method.
Implements GLViewProtocol.
float getContentScaleFactor | ( | ) | const |
returns the content scale factor
var getContentScaleFactor | ( | ) |
returns the content scale factor
local getContentScaleFactor | ( | ) |
returns the content scale factor
|
inline |
returns the objective-c CCEAGLView instance
|
inline |
returns the objective-c CCEAGLView instance
|
inline |
returns the objective-c CCEAGLView instance
float getFrameZoomFactor | ( | ) |
var getFrameZoomFactor | ( | ) |
local getFrameZoomFactor | ( | ) |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
overridevirtual |
Get whether opengl render system is ready, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Get whether opengl render system is ready, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Get whether opengl render system is ready, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Get whether opengl render system is ready, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Get whether opengl render system is ready, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Get whether opengl render system is ready, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Get whether opengl render system is ready, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Get whether opengl render system is ready, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Get whether opengl render system is ready, subclass must implement this method.
Implements GLViewProtocol.
|
inline |
returns whether or not the view is in Retina Display mode
|
inline |
returns whether or not the view is in Retina Display mode
|
inline |
returns whether or not the view is in Retina Display mode
|
inline |
Check whether retina display is enabled.
|
inline |
Check whether retina display is enabled.
|
inline |
Check whether retina display is enabled.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void pollEvents | ( | ) |
var pollEvents | ( | ) |
local pollEvents | ( | ) |
bool setContentScaleFactor | ( | float | contentScaleFactor) |
sets the content scale factor
var setContentScaleFactor | ( | var | contentScaleFactor) |
sets the content scale factor
local setContentScaleFactor | ( | local | contentScaleFactor) |
sets the content scale factor
|
overridevirtual |
Set the frame size of EGL view.
Reimplemented from GLViewProtocol.
|
overridevirtual |
Set the frame size of EGL view.
Reimplemented from GLViewProtocol.
|
overridevirtual |
Set the frame size of EGL view.
Reimplemented from GLViewProtocol.
void setFrameZoomFactor | ( | float | zoomFactor) |
var setFrameZoomFactor | ( | var | zoomFactor) |
local setFrameZoomFactor | ( | local | zoomFactor) |
|
overridevirtual |
Open or close IME keyboard , subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Open or close IME keyboard , subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Open or close IME keyboard , subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Open or close IME keyboard , subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Open or close IME keyboard , subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Open or close IME keyboard , subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Open or close IME keyboard , subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Open or close IME keyboard , subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Open or close IME keyboard , subclass must implement this method.
Implements GLViewProtocol.
|
virtual |
Set Scissor rectangle with points.
Reimplemented from GLViewProtocol.
|
virtual |
Set Scissor rectangle with points.
Reimplemented from GLViewProtocol.
|
virtual |
Set Scissor rectangle with points.
Reimplemented from GLViewProtocol.
|
virtual |
Set opengl view port rectangle with points.
Reimplemented from GLViewProtocol.
|
virtual |
Set opengl view port rectangle with points.
Reimplemented from GLViewProtocol.
|
virtual |
Set opengl view port rectangle with points.
Reimplemented from GLViewProtocol.
|
overridevirtual |
Exchanges the front and back buffers, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Exchanges the front and back buffers, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Exchanges the front and back buffers, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Exchanges the front and back buffers, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Exchanges the front and back buffers, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Exchanges the front and back buffers, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Exchanges the front and back buffers, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Exchanges the front and back buffers, subclass must implement this method.
Implements GLViewProtocol.
|
overridevirtual |
Exchanges the front and back buffers, subclass must implement this method.
Implements GLViewProtocol.
|
protected |
|
protected |
|
protected |
bool windowShouldClose | ( | ) |
var windowShouldClose | ( | ) |
local windowShouldClose | ( | ) |
|
friend |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |