cocos2d-x  3.4
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GLViewImpl Class Reference

Class that represent the OpenGL View. More...

#include <CCGLViewImpl-wp8.h>

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

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...
 
float getFrameZoomFactor () const
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...
 
bool windowShouldClose ()
void pollEvents ()
GLFWwindow * getWindow () const
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...
 
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...
 
virtual void setIMEKeyboardState (bool bOpen) override
 Open or close IME keyboard , subclass must implement this method. More...
 
void setFrameZoomFactor (float zoomFactor)
 Set and get zoom factor for frame. More...
 
void enableRetina (bool enabled)
 Retina support is disabled by default. More...
 
bool isRetinaEnabled () const
 Check whether retina display is enabled. More...
 
int getRetinaFactor () const
 Get retina factor. More...
 
HWND getWin32Window ()
id getCocoaWindow ()
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...
 
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...
 
virtual bool isOpenGLReady ()
 Get whether opengl render system is ready, subclass must implement this method. More...
 
virtual void end ()
 Force destroying EGL view, subclass must implement this method. More...
 
virtual void swapBuffers ()
 Exchanges the front and back buffers, subclass must implement this method. 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...
 
Windows::Graphics::Display::DisplayOrientations getDeviceOrientation ()
Size getRenerTargetSize () const
virtual void setIMEKeyboardState (bool bOpen)
 Open or close IME keyboard , subclass must implement this method. More...
 
virtual void setIMEKeyboardState (bool bOpen, std::string str)
virtual bool Create (float width, float height, float dpi, Windows::Graphics::Display::DisplayOrientations orientation)
void setDispatcher (Windows::UI::Core::CoreDispatcher^dispatcher)
Windows::UI::Core::CoreDispatcher getDispatcher ()
void setPanel (Windows::UI::Xaml::Controls::Panel^panel)
Windows::UI::Xaml::Controls::Panel getPanel ()
void OnPointerPressed (Windows::UI::Core::PointerEventArgs^args)
void OnPointerMoved (Windows::UI::Core::PointerEventArgs^args)
void OnPointerReleased (Windows::UI::Core::PointerEventArgs^args)
void OnPointerPressed (Windows::UI::Core::CoreWindow^sender, Windows::UI::Core::PointerEventArgs^args)
void OnPointerWheelChanged (Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^args)
void OnPointerMoved (Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^args)
void OnPointerReleased (Windows::UI::Core::CoreWindow^sender, Windows::UI::Core::PointerEventArgs^args)
void OnVisibilityChanged (Windows::UI::Core::CoreWindow^sender, Windows::UI::Core::VisibilityChangedEventArgs^args)
void OnWindowClosed (Windows::UI::Core::CoreWindow^sender, Windows::UI::Core::CoreWindowEventArgs^args)
void OnResuming (Platform::Object^sender, Platform::Object^args)
void OnSuspending (Platform::Object^sender, Windows::ApplicationModel::SuspendingEventArgs^args)
void OnBackKeyPress ()
void QueueBackKeyPress ()
void QueuePointerEvent (PointerEventType type, Windows::UI::Core::PointerEventArgs^args)
void QueueEvent (std::shared_ptr< InputEvent > &event)
bool ShowMessageBox (Platform::String^title, Platform::String^message)
int Run ()
void Render ()
void resize (int width, int height)
float getFrameZoomFactor ()
void centerWindow ()
void UpdateOrientation (Windows::Graphics::Display::DisplayOrientations orientation)
void UpdateForWindowSizeChange (float width, float height)
void SetDPI (float dpi)
float GetDPI ()
void ProcessEvents ()
 GLViewImpl ()
virtual ~GLViewImpl ()
virtual bool isOpenGLReady ()
 Get whether opengl render system is ready, subclass must implement this method. More...
 
virtual void end ()
 Force destroying EGL view, subclass must implement this method. More...
 
virtual void swapBuffers ()
 Exchanges the front and back buffers, subclass must implement this method. More...
 
virtual void setFrameSize (float width, float height)
 Set the frame size of EGL view. More...
 
virtual void setIMEKeyboardState (bool bOpen)
 Open or close IME keyboard , subclass must implement this method. More...
 
void ShowKeyboard (Windows::Foundation::Rect r)
void HideKeyboard (Windows::Foundation::Rect r)
virtual bool Create (Windows::UI::Core::CoreWindow^window, Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^panel)
void UpdateForWindowSizeChange ()
void OnRendering ()
void OnSuspending ()
void GLViewImpl::QueueEvent (std::shared_ptr< InputEvent > &event)
void OnPointerPressed (Windows::UI::Core::PointerEventArgs^args)
void OnPointerMoved (Windows::UI::Core::PointerEventArgs^args)
void OnPointerReleased (Windows::UI::Core::PointerEventArgs^args)
void OnPointerPressed (Windows::UI::Core::CoreWindow^sender, Windows::UI::Core::PointerEventArgs^args)
void OnBackKeyPress ()
Windows::UI::Core::CoreWindow getWindow ()
int Run ()
void resize (int width, int height)
void setFrameZoomFactor (float fZoomFactor)
 Set and get zoom factor for frame. More...
 
float getFrameZoomFactor ()
void centerWindow ()
virtual bool isOpenGLReady ()
 Get whether opengl render system is ready, subclass must implement this method. More...
 
virtual void end ()
 Force destroying EGL view, subclass must implement this method. More...
 
virtual void swapBuffers ()
 Exchanges the front and back buffers, subclass must implement this method. 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...
 
const Mat4getOrientationMatrix () const
const Mat4getReverseOrientationMatrix () const
Windows::Graphics::Display::DisplayOrientations getDeviceOrientation ()
Size getRenerTargetSize () const
virtual void setIMEKeyboardState (bool bOpen)
 Open or close IME keyboard , subclass must implement this method. More...
 
virtual void setIMEKeyboardState (bool bOpen, std::string str)
Platform::String stringToPlatformString (std::string strSrc)
void ShowKeyboard (Windows::Foundation::Rect r)
void HideKeyboard (Windows::Foundation::Rect r)
virtual bool Create (EGLDisplay eglDisplay, EGLContext eglContext, EGLSurface eglSurface, float width, float height, Windows::Graphics::Display::DisplayOrientations orientation)
virtual void UpdateDevice (EGLDisplay eglDisplay, EGLContext eglContext, EGLSurface eglSurface)
void OnPointerPressed (Windows::UI::Core::PointerEventArgs^args)
void OnPointerMoved (Windows::UI::Core::PointerEventArgs^args)
void OnPointerReleased (Windows::UI::Core::PointerEventArgs^args)
void OnPointerPressed (Windows::UI::Core::CoreWindow^sender, Windows::UI::Core::PointerEventArgs^args)
void OnPointerWheelChanged (Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^args)
void OnPointerMoved (Windows::UI::Core::CoreWindow^, Windows::UI::Core::PointerEventArgs^args)
void OnPointerReleased (Windows::UI::Core::CoreWindow^sender, Windows::UI::Core::PointerEventArgs^args)
void OnVisibilityChanged (Windows::UI::Core::CoreWindow^sender, Windows::UI::Core::VisibilityChangedEventArgs^args)
void OnWindowClosed (Windows::UI::Core::CoreWindow^sender, Windows::UI::Core::CoreWindowEventArgs^args)
void OnResuming (Platform::Object^sender, Platform::Object^args)
void OnSuspending (Platform::Object^sender, Windows::ApplicationModel::SuspendingEventArgs^args)
void OnBackKeyPress ()
void QueueBackKeyPress ()
void QueuePointerEvent (PointerEventType type, Windows::UI::Core::PointerEventArgs^args)
void GLViewImpl::QueueEvent (std::shared_ptr< InputEvent > &event)
void SetXamlEventDelegate (Cocos2dEventDelegate^delegate)
void SetXamlMessageBoxDelegate (Cocos2dMessageBoxDelegate^delegate)
void SetXamlEditBoxDelegate (Cocos2dEditBoxDelegate^delegate)
bool ShowMessageBox (Platform::String^title, Platform::String^message)
bool OpenXamlEditBox (Platform::String^strPlaceHolder, Platform::String^strText, int maxLength, int inputMode, int inputFlag, Windows::Foundation::EventHandler< Platform::String^>^receiveHandler)
int Run ()
void Render ()
void resize (int width, int height)
float getFrameZoomFactor ()
void centerWindow ()
void UpdateOrientation (Windows::Graphics::Display::DisplayOrientations orientation)
void UpdateForWindowSizeChange (float width, float height)
void ProcessEvents ()
void AddPointerEvent (PointerEventType type, Windows::UI::Core::PointerEventArgs^args)
- Public Member Functions inherited from GLView
 GLView ()
virtual ~GLView ()
virtual void pollInputEvents ()
 Polls input events. More...
 
virtual const SizegetFrameSize () const
 Get the frame size of EGL view. More...
 
virtual Size getVisibleSize () const
 Get the visible area size of opengl viewport. More...
 
virtual Vec2 getVisibleOrigin () const
 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...
 
virtual const SizegetDesignResolutionSize () const
 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)
const std::string & getViewName () const
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[])
virtual void handleTouchesEnd (int num, intptr_t ids[], float xs[], float ys[])
virtual void handleTouchesCancel (int num, intptr_t ids[], float xs[], float ys[])
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...
 
float getScaleY () const
 Get scale factor of the vertical direction. More...
 
ResolutionPolicy getResolutionPolicy () const
 returns the current Resolution policy More...
 
- 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 ()

Static Public Member Functions

static GLViewImplcreate (const std::string &viewname)
static GLViewImplcreateWithRect (const std::string &viewName, Rect rect, float frameZoomFactor=1.0f)
static GLViewImplcreateWithFullScreen (const std::string &viewName)
static GLViewImplcreate (const std::string &viewName)
static GLViewImplcreateWithRect (const std::string &viewName, Rect size, float frameZoomFactor=1.0f)
static GLViewImplcreateWithFullScreen (const std::string &viewName)
static GLViewImplcreateWithFullScreen (const std::string &viewName, const GLFWvidmode &videoMode, GLFWmonitor *monitor)
static GLViewImplcreateWithEAGLView (void *eaGLView)
 creates a GLViewImpl with a objective-c CCEAGLViewImpl instance More...
 
static GLViewImplcreate (const std::string &viewName)
 creates a GLViewImpl with a title name in fullscreen mode More...
 
static GLViewImplcreateWithRect (const std::string &viewName, Rect rect, float frameZoomFactor=1.0f)
 creates a GLViewImpl with a title name, a rect and the zoom factor More...
 
static GLViewImplcreateWithFullScreen (const std::string &viewName)
 creates a GLViewImpl with a name in fullscreen mode More...
 
static void convertAttrs ()
static GLViewImplcreate (const std::string &viewName)
static GLViewImplsharedOpenGLView ()
 get the shared main open gl window More...
 
static GLViewImplsharedOpenGLView ()
 get the shared main open gl window More...
 
static GLViewImplcreate (const std::string &viewName)
static GLViewImplsharedOpenGLView ()
 get the shared main open gl window More...
 
- Static Public Member Functions inherited from GLView
static void setGLContextAttrs (GLContextAttrs &glContextAttrs)
static GLContextAttrs getGLContextAttrs ()

Static Public Attributes

static void * _pixelFormat
static int _depthFormat
- Static Public Attributes inherited from GLView
static GLContextAttrs _glContextAttrs

Protected Member Functions

 GLViewImpl ()
virtual ~GLViewImpl ()
bool initWithRect (const std::string &viewName, Rect rect, float frameZoomFactor)
bool initWithFullScreen (const std::string &viewName)
 GLViewImpl ()
virtual ~GLViewImpl ()
bool initWithRect (const std::string &viewName, Rect rect, float frameZoomFactor)
bool initWithFullScreen (const std::string &viewName)
bool initWithFullscreen (const std::string &viewname, const GLFWvidmode &videoMode, GLFWmonitor *monitor)
bool initGlew ()
void updateFrameSize ()
void onGLFWError (int errorID, const char *errorDesc)
void onGLFWMouseCallBack (GLFWwindow *window, int button, int action, int modify)
void onGLFWMouseMoveCallBack (GLFWwindow *window, double x, double 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)
void onGLFWWindowIconifyCallback (GLFWwindow *window, int iconified)
 GLViewImpl ()
virtual ~GLViewImpl ()
bool initWithEAGLView (void *eaGLView)
bool initWithRect (const std::string &viewName, Rect rect, float frameZoomFactor)
bool initWithFullScreen (const std::string &viewName)
 GLViewImpl ()
virtual ~GLViewImpl ()
bool initWithRect (const std::string &viewName, Rect rect, float frameZoomFactor)
bool initWithFullScreen (const std::string &viewName)
void setFrameZoomFactor (float zoomFactor)
 Set and get zoom factor for frame. More...
 
bool isRetina ()
 GLViewImpl ()
virtual ~GLViewImpl ()
bool initWithRect (const std::string &viewName, Rect rect, float frameZoomFactor)
bool initWithFullScreen (const std::string &viewName)
void setFrameZoomFactor (float zoomFactor)
 Set and get zoom factor for frame. More...
 
bool isRetina ()
- Protected Member Functions inherited from GLView
void updateDesignResolutionSize ()
void handleTouchesOfEndOrCancel (EventTouch::EventCode eventCode, int num, intptr_t ids[], float xs[], float ys[])
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 

Protected Attributes

bool _captured
bool _supportTouch
bool _isInRetinaMonitor
bool _isRetinaEnabled
int _retinaFactor
float _frameZoomFactor
GLFWwindow * _mainWindow
GLFWmonitor * _monitor
float _mouseX
float _mouseY
void * _eaglview
bool _isRetina
- Protected Attributes inherited from GLView
Size _screenSize
Size _designResolutionSize
Rect _viewPortRect
std::string _viewName
float _scaleX
float _scaleY
ResolutionPolicy _resolutionPolicy
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Friends

class GLFWEventHandler

Detailed Description

Class that represent the OpenGL View.

Constructor & Destructor Documentation

GLViewImpl ( )
protected
virtual ~GLViewImpl ( )
protectedvirtual
GLViewImpl ( )
protected
virtual ~GLViewImpl ( )
protectedvirtual
GLViewImpl ( )
protected
virtual ~GLViewImpl ( )
protectedvirtual
GLViewImpl ( )
protected
virtual ~GLViewImpl ( )
protectedvirtual
virtual ~GLViewImpl ( )
virtual
GLViewImpl ( )
protected
virtual ~GLViewImpl ( )
protectedvirtual

Member Function Documentation

void AddPointerEvent ( PointerEventType  type,
Windows::UI::Core::PointerEventArgs^  args 
)
void centerWindow ( )
void centerWindow ( )
void centerWindow ( )
static void convertAttrs ( )
static
static GLViewImpl* create ( const std::string &  viewname)
static
static GLViewImpl* create ( const std::string &  viewName)
static

creates a GLViewImpl with a title name in fullscreen mode

static GLViewImpl* create ( const std::string &  viewName)
static
static GLViewImpl* create ( const std::string &  viewName)
static
static GLViewImpl* create ( const std::string &  viewName)
static
virtual bool Create ( float  width,
float  height,
float  dpi,
Windows::Graphics::Display::DisplayOrientations  orientation 
)
virtual
virtual bool Create ( EGLDisplay  eglDisplay,
EGLContext  eglContext,
EGLSurface  eglSurface,
float  width,
float  height,
Windows::Graphics::Display::DisplayOrientations  orientation 
)
virtual
virtual bool Create ( Windows::UI::Core::CoreWindow^  window,
Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^  panel 
)
virtual
static GLViewImpl*
createWithEAGLView
( void *  eaGLView)
static

creates a GLViewImpl with a objective-c CCEAGLViewImpl instance

static GLViewImpl*
createWithFullScreen
( const std::string &  viewName)
static
static GLViewImpl*
createWithFullScreen
( const std::string &  viewName)
static

creates a GLViewImpl with a name in fullscreen mode

static GLViewImpl*
createWithFullScreen
( const std::string &  viewName)
static
static GLViewImpl*
createWithFullScreen
( const std::string &  viewName,
const GLFWvidmode &  videoMode,
GLFWmonitor *  monitor 
)
static
static GLViewImpl* createWithRect ( const std::string &  viewName,
Rect  rect,
float  frameZoomFactor = 1.0f 
)
static
static GLViewImpl* createWithRect ( const std::string &  viewName,
Rect  rect,
float  frameZoomFactor = 1.0f 
)
static

creates a GLViewImpl with a title name, a rect and the zoom factor

static GLViewImpl* createWithRect ( const std::string &  viewName,
Rect  size,
float  frameZoomFactor = 1.0f 
)
static
void enableRetina ( bool  enabled)

Retina support is disabled by default.

Note
This method is only available on Mac.
void end ( )
overridevirtual

Force destroying EGL view, subclass must implement this method.

Implements GLView.

virtual void end ( )
virtual

Force destroying EGL view, subclass must implement this method.

Implements GLView.

virtual void end ( )
virtual

Force destroying EGL view, subclass must implement this method.

Implements GLView.

virtual void end ( )
overridevirtual

Force destroying EGL view, subclass must implement this method.

Implements GLView.

virtual void end ( )
overridevirtual

Force destroying EGL view, subclass must implement this method.

Implements GLView.

virtual void end ( )
virtual

Force destroying EGL view, subclass must implement this method.

Implements GLView.

id getCocoaWindow ( )
inlinevirtual

Implements GLView.

float getContentScaleFactor ( ) const
virtual

returns the content scale factor

Reimplemented from GLView.

Windows::Graphics::Display::DisplayOrientations
getDeviceOrientation
( )
inline
Windows::Graphics::Display::DisplayOrientations
getDeviceOrientation
( )
inline
Windows::UI::Core::CoreDispatcher
getDispatcher
( )
inline
float GetDPI ( )
inline
void* getEAGLView ( ) const
inlinevirtual

returns the objective-c CCEAGLView instance

Reimplemented from GLView.

float getFrameZoomFactor ( ) const
virtual

Reimplemented from GLView.

float getFrameZoomFactor ( )
float getFrameZoomFactor ( )
float getFrameZoomFactor ( )
const Mat4& getOrientationMatrix ( ) const
virtual

Implements GLView.

Windows::UI::Xaml::Controls::Panel
getPanel
( )
inline
Size getRenerTargetSize ( ) const
inlinevirtual

Implements GLView.

Size getRenerTargetSize ( ) const
inlinevirtual

Implements GLView.

int getRetinaFactor ( ) const
inlinevirtual

Get retina factor.

Reimplemented from GLView.

const Mat4&
getReverseOrientationMatrix
( ) const
inlinevirtual

Implements GLView.

HWND getWin32Window ( )
inlinevirtual

Implements GLView.

GLFWwindow* getWindow ( ) const
inline
Windows::UI::Core::CoreWindow
getWindow
( )
inline
void GLViewImpl::QueueEvent ( std::shared_ptr< InputEvent > &  event)
void GLViewImpl::QueueEvent ( std::shared_ptr< InputEvent > &  event)
void HideKeyboard ( Windows::Foundation::Rect  r)
void HideKeyboard ( Windows::Foundation::Rect  r)
bool initGlew ( )
protected
bool initWithEAGLView ( void *  eaGLView)
protected
bool initWithFullScreen ( const std::string &  viewName)
protected
bool initWithFullScreen ( const std::string &  viewName)
protected
bool initWithFullScreen ( const std::string &  viewName)
protected
bool initWithFullscreen ( const std::string &  viewname,
const GLFWvidmode &  videoMode,
GLFWmonitor *  monitor 
)
protected
bool initWithFullScreen ( const std::string &  viewName)
protected
bool initWithFullScreen ( const std::string &  viewName)
protected
bool initWithRect ( const std::string &  viewName,
Rect  rect,
float  frameZoomFactor 
)
protected
bool initWithRect ( const std::string &  viewName,
Rect  rect,
float  frameZoomFactor 
)
protected
bool initWithRect ( const std::string &  viewName,
Rect  rect,
float  frameZoomFactor 
)
protected
bool initWithRect ( const std::string &  viewName,
Rect  rect,
float  frameZoomFactor 
)
protected
bool initWithRect ( const std::string &  viewName,
Rect  rect,
float  frameZoomFactor 
)
protected
bool isOpenGLReady ( )
overridevirtual

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

Implements GLView.

virtual bool isOpenGLReady ( )
virtual

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

Implements GLView.

virtual bool isOpenGLReady ( )
virtual

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

Implements GLView.

virtual bool isOpenGLReady ( )
overridevirtual

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

Implements GLView.

virtual bool isOpenGLReady ( )
overridevirtual

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

Implements GLView.

virtual bool isOpenGLReady ( )
virtual

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

Implements GLView.

bool isRetina ( )
inlineprotected
bool isRetina ( )
inlineprotected
bool isRetinaDisplay ( ) const
inlinevirtual

returns whether or not the view is in Retina Display mode

Reimplemented from GLView.

bool isRetinaEnabled ( ) const
inline

Check whether retina display is enabled.

void OnBackKeyPress ( )
void OnBackKeyPress ( )
void OnBackKeyPress ( )
void onGLFWCharCallback ( GLFWwindow *  window,
unsigned int  character 
)
protected
void onGLFWError ( int  errorID,
const char *  errorDesc 
)
protected
void onGLFWframebuffersize ( GLFWwindow *  window,
int  w,
int  h 
)
protected
void onGLFWKeyCallback ( GLFWwindow *  window,
int  key,
int  scancode,
int  action,
int  mods 
)
protected
void onGLFWMouseCallBack ( GLFWwindow *  window,
int  button,
int  action,
int  modify 
)
protected
void onGLFWMouseMoveCallBack ( GLFWwindow *  window,
double  x,
double  y 
)
protected
void onGLFWMouseScrollCallback ( GLFWwindow *  window,
double  x,
double  y 
)
protected
void onGLFWWindowIconifyCallback ( GLFWwindow *  window,
int  iconified 
)
protected
void onGLFWWindowPosCallback ( GLFWwindow *  windows,
int  x,
int  y 
)
protected
void onGLFWWindowSizeFunCallback ( GLFWwindow *  window,
int  width,
int  height 
)
protected
void OnPointerMoved ( Windows::UI::Core::PointerEventArgs^  args)
void OnPointerMoved ( Windows::UI::Core::CoreWindow^  ,
Windows::UI::Core::PointerEventArgs^  args 
)
void OnPointerMoved ( Windows::UI::Core::PointerEventArgs^  args)
void OnPointerMoved ( Windows::UI::Core::CoreWindow^  ,
Windows::UI::Core::PointerEventArgs^  args 
)
void OnPointerMoved ( Windows::UI::Core::PointerEventArgs^  args)
void OnPointerPressed ( Windows::UI::Core::PointerEventArgs^  args)
void OnPointerPressed ( Windows::UI::Core::CoreWindow^  sender,
Windows::UI::Core::PointerEventArgs^  args 
)
void OnPointerPressed ( Windows::UI::Core::PointerEventArgs^  args)
void OnPointerPressed ( Windows::UI::Core::CoreWindow^  sender,
Windows::UI::Core::PointerEventArgs^  args 
)
void OnPointerPressed ( Windows::UI::Core::PointerEventArgs^  args)
void OnPointerPressed ( Windows::UI::Core::CoreWindow^  sender,
Windows::UI::Core::PointerEventArgs^  args 
)
void OnPointerReleased ( Windows::UI::Core::PointerEventArgs^  args)
void OnPointerReleased ( Windows::UI::Core::CoreWindow^  sender,
Windows::UI::Core::PointerEventArgs^  args 
)
void OnPointerReleased ( Windows::UI::Core::PointerEventArgs^  args)
void OnPointerReleased ( Windows::UI::Core::CoreWindow^  sender,
Windows::UI::Core::PointerEventArgs^  args 
)
void OnPointerReleased ( Windows::UI::Core::PointerEventArgs^  args)
void OnPointerWheelChanged ( Windows::UI::Core::CoreWindow^  ,
Windows::UI::Core::PointerEventArgs^  args 
)
void OnPointerWheelChanged ( Windows::UI::Core::CoreWindow^  ,
Windows::UI::Core::PointerEventArgs^  args 
)
void OnRendering ( )
void OnResuming ( Platform::Object^  sender,
Platform::Object^  args 
)
void OnResuming ( Platform::Object^  sender,
Platform::Object^  args 
)
void OnSuspending ( Platform::Object^  sender,
Windows::ApplicationModel::SuspendingEventArgs^  args 
)
void OnSuspending ( Platform::Object^  sender,
Windows::ApplicationModel::SuspendingEventArgs^  args 
)
void OnSuspending ( )
void OnVisibilityChanged ( Windows::UI::Core::CoreWindow^  sender,
Windows::UI::Core::VisibilityChangedEventArgs^  args 
)
void OnVisibilityChanged ( Windows::UI::Core::CoreWindow^  sender,
Windows::UI::Core::VisibilityChangedEventArgs^  args 
)
void OnWindowClosed ( Windows::UI::Core::CoreWindow^  sender,
Windows::UI::Core::CoreWindowEventArgs^  args 
)
void OnWindowClosed ( Windows::UI::Core::CoreWindow^  sender,
Windows::UI::Core::CoreWindowEventArgs^  args 
)
bool OpenXamlEditBox ( Platform::String^  strPlaceHolder,
Platform::String^  strText,
int  maxLength,
int  inputMode,
int  inputFlag,
Windows::Foundation::EventHandler< Platform::String^>^  receiveHandler 
)
void pollEvents ( )
virtual

Reimplemented from GLView.

void ProcessEvents ( )
void ProcessEvents ( )
void QueueBackKeyPress ( )
void QueueBackKeyPress ( )
void QueueEvent ( std::shared_ptr< InputEvent > &  event)
void QueuePointerEvent ( PointerEventType  type,
Windows::UI::Core::PointerEventArgs^  args 
)
void QueuePointerEvent ( PointerEventType  type,
Windows::UI::Core::PointerEventArgs^  args 
)
void Render ( )
void Render ( )
void resize ( int  width,
int  height 
)
void resize ( int  width,
int  height 
)
void resize ( int  width,
int  height 
)
int Run ( )
int Run ( )
int Run ( )
bool setContentScaleFactor ( float  contentScaleFactor)
virtual

sets the content scale factor

Reimplemented from GLView.

void setDispatcher ( Windows::UI::Core::CoreDispatcher^  dispatcher)
void SetDPI ( float  dpi)
inline
virtual void setFrameSize ( float  width,
float  height 
)
overridevirtual

Set the frame size of EGL view.

Reimplemented from GLView.

virtual void setFrameSize ( float  width,
float  height 
)
virtual

Set the frame size of EGL view.

Reimplemented from GLView.

void setFrameZoomFactor ( float  zoomFactor)
virtual

Set and get zoom factor for frame.

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

Reimplemented from GLView.

void setFrameZoomFactor ( float  zoomFactor)
protectedvirtual

Set and get zoom factor for frame.

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

Reimplemented from GLView.

void setFrameZoomFactor ( float  zoomFactor)
protectedvirtual

Set and get zoom factor for frame.

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

Reimplemented from GLView.

void setFrameZoomFactor ( float  zoomFactor)
virtual

Set and get zoom factor for frame.

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

Reimplemented from GLView.

void setIMEKeyboardState ( bool  open)
overridevirtual

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

Implements GLView.

virtual void setIMEKeyboardState ( bool  open)
virtual

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

Implements GLView.

virtual void setIMEKeyboardState ( bool  bOpen,
std::string  str 
)
virtual

Implements GLView.

virtual void setIMEKeyboardState ( bool  open)
virtual

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

Implements GLView.

virtual void setIMEKeyboardState ( bool  bOpen,
std::string  str 
)
virtual

Implements GLView.

virtual void setIMEKeyboardState ( bool  open)
overridevirtual

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

Implements GLView.

virtual void setIMEKeyboardState ( bool  open)
overridevirtual

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

Implements GLView.

virtual void setIMEKeyboardState ( bool  open)
virtual

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

Implements GLView.

void setPanel ( Windows::UI::Xaml::Controls::Panel^  panel)
virtual void setScissorInPoints ( float  x,
float  y,
float  w,
float  h 
)
virtual

Set Scissor rectangle with points.

Reimplemented from GLView.

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

Set Scissor rectangle with points.

Reimplemented from GLView.

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

Set Scissor rectangle with points.

Reimplemented from GLView.

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

Set opengl view port rectangle with points.

Reimplemented from GLView.

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

Set opengl view port rectangle with points.

Reimplemented from GLView.

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

Set opengl view port rectangle with points.

Reimplemented from GLView.

void SetXamlEditBoxDelegate ( Cocos2dEditBoxDelegate^  delegate)
inline
void SetXamlEventDelegate ( Cocos2dEventDelegate^  delegate)
inline
void SetXamlMessageBoxDelegate ( Cocos2dMessageBoxDelegate^  delegate)
inline
static GLViewImpl* sharedOpenGLView ( )
static

get the shared main open gl window

static GLViewImpl* sharedOpenGLView ( )
static

get the shared main open gl window

static GLViewImpl* sharedOpenGLView ( )
static

get the shared main open gl window

void ShowKeyboard ( Windows::Foundation::Rect  r)
void ShowKeyboard ( Windows::Foundation::Rect  r)
bool ShowMessageBox ( Platform::String^  title,
Platform::String^  message 
)
bool ShowMessageBox ( Platform::String^  title,
Platform::String^  message 
)
Platform::String
stringToPlatformString
( std::string  strSrc)
void swapBuffers ( )
overridevirtual

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

Implements GLView.

virtual void swapBuffers ( )
virtual

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

Implements GLView.

virtual void swapBuffers ( )
virtual

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

Implements GLView.

virtual void swapBuffers ( )
overridevirtual

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

Implements GLView.

virtual void swapBuffers ( )
overridevirtual

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

Implements GLView.

virtual void swapBuffers ( )
virtual

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

Implements GLView.

virtual void UpdateDevice ( EGLDisplay  eglDisplay,
EGLContext  eglContext,
EGLSurface  eglSurface 
)
virtual
void UpdateForWindowSizeChange ( float  width,
float  height 
)
void UpdateForWindowSizeChange ( float  width,
float  height 
)
void UpdateForWindowSizeChange ( )
void updateFrameSize ( )
protected
void UpdateOrientation ( Windows::Graphics::Display::DisplayOrientations  orientation)
void UpdateOrientation ( Windows::Graphics::Display::DisplayOrientations  orientation)
bool windowShouldClose ( )
virtual

Reimplemented from GLView.

Friends And Related Function Documentation

friend class GLFWEventHandler
friend

Member Data Documentation

bool _captured
protected
int _depthFormat
static
void* _eaglview
protected
float _frameZoomFactor
protected
bool _isInRetinaMonitor
protected
bool _isRetina
protected
bool _isRetinaEnabled
protected
GLFWwindow* _mainWindow
protected
GLFWmonitor* _monitor
protected
float _mouseX
protected
float _mouseY
protected
void* _pixelFormat
static
int _retinaFactor
protected
bool _supportTouch
protected

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