class
surfaceprimitive object that create a surface we can render on.
create a surface we can render on, which, depending on the platform could be anything from a resizeable window to the sole surface we can present on (ex. mobile and console platforms).
member-functions
Function documentation
const core:: data:: window& core:: os:: surface:: data() const
Brief
returns the window data that was used to initialize this window.
Details
void core:: os:: surface:: terminate()
Brief
marks the surface to be terminated.
Details
when invoking this method, the surface will be marked for destruction.
bool core:: os:: surface:: open() const
Returns | if the surface is "open" (i.e initialized and not-terminated) |
---|
void core:: os:: surface:: focus(bool value)
Brief
suggests the surface to become focused.
Details
the strength of the focus suggestion is based on the platform specific implementation of focus.
Parameters | |
---|---|
value in | sets the focus value. |
bool core:: os:: surface:: focused() const
Returns | if the platform considers this surface to be 'in focus'. |
---|
bool core:: os:: surface:: resize(uint32_t width,
uint32_t height)
Brief
suggests a new size for the surface.
Details
Parameters | |
---|---|
width in | the suggested width of the surface. |
height in | the suggested height of the surface. |
Returns | if the resize was successfull |
core:: systems:: input& core:: os:: surface:: input() const noexcept
Brief
the input instance associated with this surface.
Details
every surface has its own input system even though that some platforms cannot have multiple surfaces, or that their input systems boil down to a singleton. by returning a specific instance, regardless of this we ensure that all access and handling is uniform across the various platforms.
void core:: os:: surface:: register_swapchain(core:: resource:: handle<core:: ivk:: swapchain> swapchain)
Brief
this method will be called by the swapchain class, so that the surface knows who to notify of resize events, etc..