Repository navigation
Expand file tree
/
Copy pathApplicationData.h
More file actions
73 lines (61 loc) · 1.94 KB
/
Copy pathApplicationData.h
File metadata and controls
73 lines (61 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* @file ApplicationData.h
* @brief This header file keeps user-provided application data (vertices, indices etc.).
* @author Mustafa Yemural (myemural)
* @date 22.11.2025
*
* Copyright (c) 2025 Mustafa Yemural - www.mustafayemural.com
* Released under the MIT License
* https://opensource.org/licenses/MIT
*/
#pragma once
#include <vector>
#include <glm/glm.hpp>
#include "PrimitiveUtils.h"
#include "Vertex.h"
namespace examples::fundamentals::queries_and_performance::timestamp_query
{
#define NUM_CUBES 20
#define NUM_CUBES_PIPELINE_1 3
#define NUM_CUBES_PIPELINE_2 7
#define NUM_CUBES_PIPELINE_3 4
#define NUM_CUBES_PIPELINE_4 6
// Vertex Data for Cube
inline const std::vector cubeVertices = common::utility::CreateCubeVertices<common::utility::VertexPos3Uv2>(1.0f);
// Index Data for Cube
inline const std::vector<std::uint16_t> cubeIndices = common::utility::CreateCubeIndices();
// MVP Matrices (for Push Constants)
struct MvpData
{
glm::mat4 mvpMatrix;
};
// Model position vectors
// clang-format off
inline constexpr glm::vec3 modelPositions[NUM_CUBES] = {
// Top-left cubes for pipeline 1 (3 cubes)
{ -2.0f, 2.0f, -2.0f },
{ -1.0f, 2.5f, -3.5f },
{ -1.5f, 1.5f, -5.0f },
// Top-right cubes for pipeline 2 (7 cubes)
{ 2.0f, 2.0f, -2.5f },
{ 2.5f, 2.5f, -4.0f },
{ 3.0f, 1.5f, -5.5f },
{ 3.5f, 2.0f, -7.0f },
{ 2.0f, 2.2f, -8.0f },
{ 2.8f, 1.8f, -9.0f },
{ 3.2f, 2.3f, -10.0f },
// Bottom-left cubes for pipeline 3 (4 cubes)
{ -2.0f, -2.0f, -2.5f },
{ -1.5f, -2.5f, -4.0f },
{ -2.5f, -1.5f, -5.5f },
{ -1.8f, -2.2f, -7.0f },
// Bottom-right cubes for pipeline 4 (6 cubes)
{ 2.0f, -2.0f, -3.0f },
{ 2.5f, -2.5f, -4.5f },
{ 3.0f, -1.5f, -6.0f },
{ 3.5f, -2.0f, -7.5f },
{ 2.8f, -2.2f, -9.0f },
{ 3.2f, -1.8f, -10.5f }
};
// clang-format on
} // namespace examples::fundamentals::queries_and_performance::timestamp_query