EglGfxDevice class
The EGL-based graphics device.
Manages the EGL display connection, drawing surface and rendering context for the Android backend.
Base classes
- class nCine::IGfxDevice
- Represents the interface to the graphics device where everything is rendered.
Public static functions
- static auto IsModeSupported(struct android_app* state, const ContextInfo& contextInfo, const DisplayMode& mode) -> bool
- Checks if the desired pixel format is supported.
Constructors, destructors, conversion operators
- EglGfxDevice(struct android_app* state, const ContextInfo& contextInfo, const DisplayMode& displayMode)
- Constructor taking a
DisplayModeobject. - ~EglGfxDevice() override
Public functions
- void SetSwapInterval(int interval) override
- Sets the number of vertical blanks to occur before a buffer swap.
- void SetResolution(bool fullscreen, int width = 0, int height = 0) override
- Sets the screen resolution with two integers.
- void SetWindowPosition(int x, int y) override
- Sets the position of the application window with two integers.
- void SetWindowSize(int width, int height) override
- Sets the window size with two integers.
- void Update() override
- Updates the screen by swapping the back and front buffers.
- void SetWindowTitle(StringView windowTitle) override
- Sets the application window title.
- void SetWindowIcon(StringView iconFilename) override
- Sets the application window icon.
- auto GetCurrentVideoMode(unsigned int monitorIndex) const -> const VideoMode& override
- Returns the current video mode for the specified monitor.
- auto SetVideoMode(unsigned int modeIndex) -> bool override
- Sets the video mode used in full screen by the monitor that hosts the window.
- void CreateSurface()
- Recreates the drawing surface from the native window.
- void BindContext()
- Makes the EGL context current on the calling thread.
- void UnbindContext()
- Releases the EGL context from the calling thread.
- auto QuerySurfaceSize() -> Vector2i
- Queries the size of the current drawing surface.
Protected functions
- void SetResolutionInternal(int width, int height) override
Private functions
- void UpdateMonitors() override
- Updates the array of connected monitors.
Function documentation
void nCine:: Backends:: EglGfxDevice:: SetSwapInterval(int interval) override
Sets the number of vertical blanks to occur before a buffer swap.
An interval of -1 will enable adaptive v-sync if available.
void nCine:: Backends:: EglGfxDevice:: SetWindowSize(int width,
int height) override
Sets the window size with two integers.
bool nCine:: Backends:: EglGfxDevice:: SetVideoMode(unsigned int modeIndex) override
Sets the video mode used in full screen by the monitor that hosts the window.