⚠️ This documentation corresponds to the latest development branch of axmol. It might diverge from the official releases.
|
Axmol Engine 3.0.0-dff292a
|
By RenderView you can operate the frame information of EGL view through some function. More...
#include <RenderView.h>
Inherits Object.
Public Member Functions | |
| virtual | ~RenderView () |
| @lua NA | |
| virtual void | end ()=0 |
| Force destroying EGL view, subclass must implement this method. | |
| virtual bool | isGfxContextReady ()=0 |
| Get whether graphics context is ready, subclass must implement this method. | |
| virtual void | swapBuffers ()=0 |
| Exchanges the front and back buffers, subclass must implement this method. | |
| virtual void | setIMEKeyboardState (bool open)=0 |
| Open or close IME keyboard , subclass must implement this method. | |
| virtual bool | windowShouldClose () |
| When the window is closed, it will return false if the platforms is Ios or Android. | |
| virtual void | pollEvents () |
| Polls the events. | |
| const Vec2 & | getWindowSize () const |
| Get the zoomed window size In general, it returns the screen size since the EGL view is a fullscreen view. | |
| virtual void | setWindowSize (float, float) |
| Set the zoomed window size. | |
| virtual void | setWindowZoomFactor (float) |
| Set zoom factor for frame. | |
| virtual float | getWindowZoomFactor () const |
| Get zoom factor for frame. | |
| AX_DEPRECATED (3.0) const Vec2 &getFrameSize() const | |
| implicit deprecated APIs, use getWindowSize instead | |
| virtual void | setCursorVisible (bool) |
| Hide or Show the mouse cursor if there is one. | |
| virtual float | getRenderScale () const |
| Get render scale. | |
| virtual Vec2 | getVisibleSize () const |
| Get the visible area size of render viewport. | |
| virtual Vec2 | getVisibleOrigin () const |
| Get the visible origin point of render viewport. | |
| virtual Rect | getVisibleRect () const |
| Get the visible rectangle of render viewport. | |
| virtual Rect | getSafeAreaRect () const |
| Gets safe area rectangle. | |
| virtual void | setDesignResolutionSize (float width, float height, ResolutionPolicy resolutionPolicy) |
| Set the design resolution size. | |
| virtual const Vec2 & | getDesignResolutionSize () const |
| Get design resolution size. | |
| virtual void | setViewportInPoints (float x, float y, float w, float h) |
| Set render view port rectangle with points. | |
| virtual void | setScissorInPoints (float x, float y, float w, float h) |
| Set Scissor rectangle with points. | |
| virtual bool | isScissorEnabled () |
| Get whether GL_SCISSOR_TEST is enable. | |
| virtual Rect | getScissorInPoints () const |
| Get the current scissor rectangle. | |
| std::string_view | getViewName () const |
| Get the view name. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| virtual void | setIcon (std::string_view filename) const |
| Set window icon (implemented for windows and linux). | |
| virtual void | setIcon (const std::vector< std::string_view > &filelist) const |
| Set window icon (implemented for windows and linux). | |
| virtual void | setDefaultIcon () const |
| Set default window icon (implemented for windows and linux). | |
| const Rect & | getViewportRect () const |
| Get the render view port rectangle. | |
| std::vector< Touch * > | getAllTouches () const |
| Get list of all active touches. | |
| float | getScaleX () const |
| Get scale factor of the horizontal direction. | |
| float | getScaleY () const |
| Get scale factor of the vertical direction. | |
| ResolutionPolicy | getResolutionPolicy () const |
| Returns the current Resolution policy. | |
| virtual void * | getNativeWindow () const |
| Get the Native Window object. | |
| virtual void * | getNativeDisplay () const |
| Get the Native Display object. | |
| virtual WindowPlatform | getWindowPlatform () const |
| Get the Window Platform object. | |
| void | renderScene (Scene *scene, Renderer *renderer) |
| Renders a Scene with a Renderer This method is called directly by the Director. | |
| void | setInteractive (bool interactive) |
| Enable or disable interactions. | |
| void | updateRenderSurface (float width, float height, uint8_t updateFlag) |
| Updates the render surface size (framebuffer/render target) and synchronizes related view parameters. | |
| Public Member Functions inherited from Object | |
| void | retain () |
| Retains the ownership. | |
| void | release () |
| Releases the ownership immediately. | |
| Object * | autorelease () |
| Releases the ownership sometime soon automatically. | |
| unsigned int | getReferenceCount () const |
| Returns the Object's current reference count. | |
| virtual | ~Object () |
| Destructor. | |
Additional Inherited Members | |
| Public Attributes inherited from Object | |
| unsigned int | _ID |
| object id, ScriptSupport need public _ID | |
| int | _luaID |
| Lua reference id. | |
By RenderView you can operate the frame information of EGL view through some function.
|
pure virtual |
Force destroying EGL view, subclass must implement this method.
@lua endToLua
|
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.
|
inline |
Get the zoomed window size In general, it returns the screen size since the EGL view is a fullscreen view.
|
inlinevirtual |
Set the zoomed window size.
| 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 |
Get zoom factor for frame.
This methods are for debugging big resolution (e.g.new ipad) app on desktop.
|
inlinevirtual |
|
inlinevirtual |
Get render scale.
|
virtual |
Get the visible area size of render viewport.
|
virtual |
Get the visible origin point of render viewport.
|
virtual |
Get the visible rectangle of render 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 |
Get design resolution size.
Default resolution size is the same as 'getWindowSize'.
|
virtual |
Set render 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 |
Get whether GL_SCISSOR_TEST is enable.
|
virtual |
Get the current scissor rectangle.
| std::string_view getViewName | ( | ) | const |
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. |
| 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. |
|
inlinevirtual |
Set window icon (implemented for windows and linux).
| filename | A path to image file, e.g., "icons/cusom.png". |
|
inlinevirtual |
Set window icon (implemented for windows and linux).
Best icon (based on size) will be auto selected.
| filelist | The array contains icons. |
|
inlinevirtual |
Set default window icon (implemented for windows and linux).
On windows it will use icon from .exe file (if included). On linux it will use default window icon.
| const Rect & getViewportRect | ( | ) | const |
Get the render view port rectangle.
| std::vector< Touch * > getAllTouches | ( | ) | const |
Get list of all active touches.
| float getScaleX | ( | ) | const |
Get scale factor of the horizontal direction.
| float getScaleY | ( | ) | const |
Get scale factor of the vertical direction.
|
inline |
Returns the current Resolution policy.
|
inlinevirtual |
Get the Native Window object.
|
inlinevirtual |
Get the Native Display object.
|
inlinevirtual |
Get the Window Platform object.
| void setInteractive | ( | bool | interactive | ) |
Enable or disable interactions.
When disabled, it prevents touches to be dispatched and will cancel current touches
| void updateRenderSurface | ( | float | width, |
| float | height, | ||
| uint8_t | updateFlag ) |
Updates the render surface size (framebuffer/render target) and synchronizes related view parameters.
This method performs the following actions:
| width | The target width of the render surface. Its meaning depends on updateFlag: it may represent the framebuffer width, logical window width, or design resolution width. |
| height | The target height of the render surface. Its meaning depends on updateFlag: it may represent the framebuffer height, logical window height, or design resolution height. |
| updateFlag | Optional flags to control which parts of the view should be updated. Defaults to SurfaceUpdateFlag::AllUpdates. |