50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
// Copyright (c) 2023 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include "display/Color.hpp"
|
|
#include "display/mesh/Mesh.hpp"
|
|
#include "display/shader/Shader.hpp"
|
|
|
|
#define SCENE_DEBUG_LINE_VERTICE_COUNT 2
|
|
#define SCENE_DEBUG_LINE_INDICE_COUNT 2
|
|
#define SCENE_DEBUG_LINE_PRIORITY 1
|
|
|
|
namespace Dawn {
|
|
class SimpleTexturedShader;
|
|
class Camera;
|
|
|
|
struct SceneDebugCube {
|
|
glm::vec3 min;
|
|
glm::vec3 max;
|
|
struct Color color = COLOR_RED;
|
|
glm::mat4 transform = glm::mat4(1.0f);
|
|
};
|
|
|
|
struct SceneDebugLine {
|
|
glm::vec3 v0 = glm::vec3(0, 0, 0);
|
|
glm::vec3 v1 = glm::vec3(1, 1, 1);
|
|
struct Color color = COLOR_RED;
|
|
glm::mat4 transform = glm::mat4(1.0f);
|
|
int32_t priority = SCENE_DEBUG_LINE_PRIORITY;
|
|
|
|
|
|
/**
|
|
* Creates a renderable shader item for this debug line.
|
|
*
|
|
* @param mesh Mesh that this debug line will buffer its indices in to
|
|
* @param lineIndex Currently iterated line index.
|
|
* @param camera Camera for this line index to set the shader params for.
|
|
* @param shader Shader that the params will be set for.
|
|
* @return The queueable shader pass item.
|
|
*/
|
|
struct ShaderPassItem createShaderItem(
|
|
Mesh *mesh,
|
|
int32_t *lineIndex,
|
|
Camera *camera,
|
|
SimpleTexturedShader *shader
|
|
);
|
|
};
|
|
} |