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 GLContextInfo& glContextInfo, const DisplayMode& mode) -> bool
- Checks if the desired pixel format is supported.
Constructors, destructors, conversion operators
- EglGfxDevice(struct android_app* state, const GLContextInfo& glContextInfo, 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 currentVideoMode(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.