Class CCEGLViewProtocol

#include <Geode/cocos/platform/CCEGLViewProtocol.h>
classCCEGLViewProtocol{ ... }
No description provided
Examples0
Public static methods0
Public member functions26
virtualvoidend()

Force destroying EGL view, subclass must implement this method.

virtualboolisOpenGLReady()

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

virtualvoidswapBuffers()

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

virtualvoidsetIMEKeyboardState(
boolbOpen
)

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

virtualcocos2d::CCSizeconst&getFrameSize()const

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

virtualvoidsetFrameSize(
floatwidth
,
floatheight
)

Set the frame size of EGL view.

virtualcocos2d::CCSizegetVisibleSize()const

Get the visible area size of opengl viewport.

virtualcocos2d::CCPointgetVisibleOrigin()const

Get the visible origin point of opengl viewport.

virtualvoidsetDesignResolutionSize(
floatwidth
,
floatheight
,
ResolutionPolicyresolutionPolicy
)

Set the design resolution size.

Parameters

width

Design resolution width.

height

Design resolution height.

resolutionPolicy

The resolution policy desired, you may choose: [1] kResolutionExactFit 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] kResolutionNoBorder 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] kResolutionShowAll 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.
virtualcocos2d::CCSizeconst&getDesignResolutionSize()const

Get design resolution size. Default resolution size is the same as ‘getFrameSize’.

virtualvoidsetTouchDelegate()

Set touch delegate

virtualvoidsetViewPortInPoints(,,,)

Set opengl view port rectangle with points.

virtualvoidsetScissorInPoints(,,,)

Set Scissor rectangle with points.

virtualboolisScissorEnabled()

Get whether GL_SCISSOR_TEST is enable

virtualcocos2d::CCRectgetScissorRect()

Get the current scissor rectangle

virtualvoidsetViewName(
charconst*pszViewName
)
No description provided
charconst*getViewName()
No description provided
virtualvoidhandleTouchesBegin(
intnum
,,,)

Touch events are handled by default; if you want to customize your handlers, please override these functions:

virtualvoidhandleTouchesMove(
intnum
,,,)
No description provided
virtualvoidhandleTouchesEnd(
intnum
,,,)
No description provided
virtualvoidhandleTouchesCancel(
intnum
,,,)
No description provided
cocos2d::CCRectconst&getViewPortRect()const

Get the opengl view port rectangle.

floatgetScaleX()const

Get scale factor of the horizontal direction.

floatgetScaleY()const

Get scale factor of the vertical direction.

virtualvoidpollInputEvents()
No description provided
voidupdateDesignResolutionSize()
No description provided
Fields0
Protected member functions0
Protected fields8
;
No description provided
cocos2d::CCSizem_obScreenSize
;
No description provided
cocos2d::CCSizem_obDesignResolutionSize
;
No description provided
cocos2d::CCRectm_obViewPortRect
;
No description provided
char[50]m_szViewName
;
No description provided
floatm_fScaleX
;
No description provided
floatm_fScaleY
;
No description provided
ResolutionPolicym_eResolutionPolicy
;
No description provided