class
EglGfxDeviceThe EGL based graphics device.
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
DisplayMode
object. - ~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 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 swapping 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 that will be used in full screen by the monitor that hosts the window.
- void createSurface()
- Recreates a surface from a native window.
- void bindContext()
- Binds the current context.
- void unbindContext()
- Unbinds the current context.
- void querySurfaceSize()
- Queries the size of the current 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 that will be used in full screen by the monitor that hosts the window.