Antkeeper  0.0.1
operation.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Christopher J. Howard
3  *
4  * This file is part of Antkeeper source code.
5  *
6  * Antkeeper source code is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Antkeeper source code is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef ANTKEEPER_RENDER_OPERATION_HPP
21 #define ANTKEEPER_RENDER_OPERATION_HPP
22 
23 #include <engine/math/vector.hpp>
28 #include <cstdint>
29 #include <memory>
30 #include <span>
31 
32 namespace render {
33 
37 struct operation
38 {
40  const gl::vertex_array* vertex_array{nullptr};
42  std::size_t vertex_offset{0};
43  std::size_t vertex_stride{0};
44  std::uint32_t first_vertex{0};
45  std::uint32_t vertex_count{0};
46  std::uint32_t first_instance{0};
47  std::uint32_t instance_count{1};
48 
49  std::shared_ptr<render::material> material;
50 
52  float depth{};
53 
54  std::span<const math::fmat4> matrix_palette{};
55 
56  std::uint32_t layer_mask{};
57 };
58 
59 } // namespace render
60 
61 #endif // ANTKEEPER_RENDER_OPERATION_HPP
Vertex arrays describes how vertex input attributes are stored in vertex buffers.
Vertex buffer object (VBO).
primitive_topology
Primitive topologies.
@ triangle_list
Separate triangle primitives.
High-level rendering.
n by m column-major matrix.
Definition: math/matrix.hpp:44
static constexpr matrix identity() noexcept
Returns an identity matrix, with ones on the main diagonal and zeros elsewhere.
Atomic render operation.
Definition: operation.hpp:38
std::uint32_t vertex_count
Definition: operation.hpp:45
std::uint32_t instance_count
Definition: operation.hpp:47
std::span< const math::fmat4 > matrix_palette
Definition: operation.hpp:54
std::size_t vertex_offset
Definition: operation.hpp:42
std::size_t vertex_stride
Definition: operation.hpp:43
std::uint32_t layer_mask
Definition: operation.hpp:56
std::uint32_t first_instance
Definition: operation.hpp:46
math::fmat4 transform
Definition: operation.hpp:51
gl::primitive_topology primitive_topology
Definition: operation.hpp:39
std::uint32_t first_vertex
Definition: operation.hpp:44
const gl::vertex_buffer * vertex_buffer
Definition: operation.hpp:41
std::shared_ptr< render::material > material
Definition: operation.hpp:49
const gl::vertex_array * vertex_array
Definition: operation.hpp:40