|
TachyonUI 1.1.0
High-performance UI for building tools.
|
#include <gui_core/graphics/sdlgpu/sdlgpu_window_context.h>
Public Member Functions | |
| ~SDLGPUWindowContext () override | |
| ID | GetID () const override |
| The GUI window's ID; the backend passes it with the window's input. | |
| OSWindowHandle | GetWindowHandle () const override |
| The window it was created for. | |
| bool | IsTransparent () const override |
| Whether the window has WindowFlags::Transparent. | |
| void | RenderWindowFrame (GraphicsContext *graphicsContext, IntRect rect, bool resizing) override |
| resizing: a live resize's redraw, which lays the window out again (its onGui) before it's drawn at the new size. | |
| void | RecordWindowFrame (GraphicsContext *graphicsContext, IntRect rect) override |
| Records and submits a frame without presenting it; PresentWindowFrame presents. | |
| std::optional< double > | PresentWindowFrame () override |
| The frame was presented when it was submitted: the seconds the swapchain's image took to come (the vsync wait). | |
| bool | ReadPixels (std::span< uint8_t > bgra) override |
| The last rendered frame, BGRA8 with tightly packed rows; bgra holds width x height x 4 bytes of the window's pixel size. | |
| Public Member Functions inherited from tachyon::IWindowContext | |
| virtual | ~IWindowContext ()=default |
| virtual bool | NeedsRecord () const |
| True when the window must be recorded this frame even though its draws didn't change (its swapchain is out of date). | |
| virtual void | UpdateTransparentWindow () |
| A transparent window the OS composites from a CPU copy (a layered window on Windows): shows its last frame again, where the window is. | |
Static Public Member Functions | |
| static SDLGPUWindowContext * | Create (SDLGPUGraphicsContext &graphics, SDL_Window *window, void *nativeWindow, OSWindowHandle osHandle, ID id, int2 size, WindowFlags flags, OnGuiFunc onGui) |
| Null, with the reason logged, when the window can't be claimed. | |
|
override |
|
static |
Null, with the reason logged, when the window can't be claimed.
nativeWindow is the OS's window (an HWND on Windows), which says whether it's layered. window and nativeWindow are null for a render-to-image window.
|
inlineoverridevirtual |
The GUI window's ID; the backend passes it with the window's input.
Implements tachyon::IWindowContext.
|
inlineoverridevirtual |
The window it was created for.
Implements tachyon::IWindowContext.
|
overridevirtual |
Whether the window has WindowFlags::Transparent.
Implements tachyon::IWindowContext.
|
overridevirtual |
resizing: a live resize's redraw, which lays the window out again (its onGui) before it's drawn at the new size.
Implements tachyon::IWindowContext.
|
overridevirtual |
Records and submits a frame without presenting it; PresentWindowFrame presents.
The default does both, through RenderWindowFrame.
Reimplemented from tachyon::IWindowContext.
|
overridevirtual |
The frame was presented when it was submitted: the seconds the swapchain's image took to come (the vsync wait).
A layered window's frame is read back and shown here instead.
Reimplemented from tachyon::IWindowContext.
|
overridevirtual |
The last rendered frame, BGRA8 with tightly packed rows; bgra holds width x height x 4 bytes of the window's pixel size.
False when it can't be read.
Reimplemented from tachyon::IWindowContext.