Window

The window interface gives the programmer access to all functions related to updating the state of the window. Functions are accessed through the UVK::Window class.

windowSize

Returns the window size as an FVector2 using the default size formatting

setTitle

Sets the title to some text

fullscreen

Returns a boolean you can check if the window is at full screen

name

Returns the name of the window

iconLocation

Returns the location of the window icon

Renderer

Controls everything related to the renderer settings and functionality. Renderer settings need to be changed, and the program needs to be restarted for changes to take effect. Functions are accessed by the UVK::Renderer class.

switchRenderer

Used to switch between the 2 renderer APIs the engine uses(Vulkan and OpenGL). WARNING: SOON TO BE REMOVED DUE TO THE OPENGL RENDERER BEING OBSOLETE

getVSync

Returns a reference to a boolean. The boolean controls weather V-Sync is on or off.

getImmediateRender

Returns a reference to a boolean. The boolean controls weather we are rendering frames immediately to the screen, or we generally adhere to vertical blanks. If it is on all frames will immediately be rendered to the screen, this however, may cause screen tearing. If it is off, then the renderer will mostly adhere to vertical blanks, which can help with visual stutter on applications with almost constant frame rate.

saveSettings

Same as the function in the UVK::SettingsManager class

Input

The input interface provides useful functions for interacting with the input system. Functions are accessed by the UVK::Input class.

getKey

The uint8_t getKey(uint16_t key) function returns a uint8_t flag, when given a key from the Keys namespace as an argument. When compared with one of the key events in keys like:

constexpr uint8_t KeyReleased = 0;
constexpr uint8_t KeyPressed = 1;
constexpr uint8_t KeyRepeat = 2;

The return value can be used to check for input events. The getKey function only responds to actual keys and not to input actions, and additionally these keys are layout independent.

getAction

Given a string containing the name of an action the const InputAction& getAction(const std::string& name) function reference to an input action if one is found, if not then the engine will respond with an error message in the console and will crash the application. If the input was valid, an InputAction will be returned, which can be used to check for the same input events as the getKey function. Additionally, input actions can be rebound to any key on the keyboard but are still layout independent

getActions

Returns the list of all currently active input actions

getMousePositionChange

The FVector2 getMousePositionChange() function returns an FVector2 containing the change of the mouse position between the current and previous frame

getCurrentMousePosition

The FVector2 getCurrentMousePosition() function returns the current frame's mouse position

getLastMousePosition

The FVector2 getLastMousePosition() function returns the last frame's mouse position

getScroll

Returns an FVector2 containing the scroll velocity of the user. Can be either vertical or horizontal scroll, which is why it returns an FVector2