![]() |
vkmEngine 1.0.0
A C++ game engine · vkmengine.com
|
What an authoring host tells the engine about the frame it draws over. More...
#include <host_chrome.h>
Classes | |
| struct | ViewportRect |
| A rect in framebuffer pixels: the unit glViewport takes. More... | |
Public Member Functions | |
| void | setViewport (uint32_t x, uint32_t y, uint32_t width, uint32_t height) |
| Declare the rect inside the window the 3D scene renders into. | |
| ViewportRect | viewport (const WindowManager &window) const |
| The declared rect, resolved against the window it sits in. | |
| void | setCapture (bool pointer, bool keyboard) |
| Declare that the host's own UI, not the scene, has the devices. | |
| bool | capturesPointer () const |
| Whether the host's UI owns the pointer this frame. | |
| bool | capturesKeyboard () const |
| Whether the host's UI owns the keyboard this frame. | |
What an authoring host tells the engine about the frame it draws over.
The host frames the engine's output: panels around a scene rect, taking the pointer over them. Readers take it off the frame context; unset, it is the whole window with nothing captured.
Written in the Editor stage, so earlier stages see the previous frame's rect.
|
inline |
Declare the rect inside the window the 3D scene renders into.
| x | Left edge in framebuffer pixels; scale screen coordinates by WindowManager::framebufferScale first. |
| y | Top edge, same units. |
| width | Zero means the whole window. |
| height | Zero means the whole window. |
| ViewportRect Vkm::Engine::HostChrome::viewport | ( | const WindowManager & | window | ) | const |
The declared rect, resolved against the window it sits in.
| window | Window the scene is drawn into; fills a zero extent. |
|
inline |
Declare that the host's own UI, not the scene, has the devices.
Separate, since a focused text field takes the keyboard while the pointer is over the viewport, and a panel takes the pointer unfocused.
| pointer | Host UI is under the cursor or dragging, or the host has taken the view from the game (an ejected session). |
| keyboard | A field is typed into, a popup or rebind waits for a key, or the host has taken the view from the game. |
|
inline |
Whether the host's UI owns the pointer this frame.
|
inline |
Whether the host's UI owns the keyboard this frame.