HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
gfx_draw_context.hpp
1
2
3#pragma once
4
6#include "pipeline_box_vertex.hpp"
7#include "pipeline_image_vertex.hpp"
8#include "pipeline_SDF_vertex.hpp"
9#include "pipeline_alpha_vertex.hpp"
10#include "../geometry/module.hpp"
11#include "../vector_span.hpp"
12#include <cstdlib>
13
14namespace hi { inline namespace v1 {
15class gfx_device;
16
18 gfx_device *device = nullptr;
19 vector_span<pipeline_box::vertex> box_vertices;
20 vector_span<pipeline_image::vertex> image_vertices;
21 vector_span<pipeline_SDF::vertex> sdf_vertices;
22 vector_span<pipeline_alpha::vertex> alpha_vertices;
23 aarectangle scissor_rectangle = {};
24 size_t frame_buffer_index = 0;
25 hi::subpixel_orientation subpixel_orientation = hi::subpixel_orientation::unknown;
26
27 constexpr gfx_draw_context(gfx_draw_context const&) noexcept = delete;
28 constexpr gfx_draw_context(gfx_draw_context&&) noexcept = default;
29 constexpr gfx_draw_context& operator=(gfx_draw_context const&) noexcept = delete;
30 constexpr gfx_draw_context& operator=(gfx_draw_context&&) noexcept = default;
31
32 constexpr gfx_draw_context(
33 gfx_device& device,
34 std::span<pipeline_box::vertex> box_vertices,
35 std::span<pipeline_image::vertex> image_vertices,
36 std::span<pipeline_SDF::vertex> sdf_vertices,
37 std::span<pipeline_alpha::vertex> alpha_vertices,
38 size_t frame_buffer_index,
39 aarectangle scissor_rectangle) noexcept :
40 device(std::addressof(device)),
41 box_vertices(box_vertices),
42 image_vertices(image_vertices),
43 sdf_vertices(sdf_vertices),
44 alpha_vertices(alpha_vertices),
45 frame_buffer_index(frame_buffer_index),
46 scissor_rectangle(scissor_rectangle)
47 {
48 }
49};
50
51}} // namespace hi::v1
DOXYGEN BUG.
Definition algorithm.hpp:13
geometry/margins.hpp
Definition cache.hpp:11
Class which represents an axis-aligned rectangle.
Definition axis_aligned_rectangle.hpp:27
Definition gfx_draw_context.hpp:17
T addressof(T... args)