35 lines
683 B
C++
35 lines
683 B
C++
|
|
#pragma once
|
|
|
|
#if !defined(SDL_GPU_TEST_PRIVATE_SDL_GPU_TEST_UTIL_MESH_HPP_INCLUDED)
|
|
#define SDL_GPU_TEST_PRIVATE_SDL_GPU_TEST_UTIL_MESH_HPP_INCLUDED 1
|
|
|
|
#include <vector>
|
|
|
|
#include <glm/vec2.hpp>
|
|
#include <glm/vec3.hpp>
|
|
#include <glm/vec4.hpp>
|
|
#include <mijin/io/stlstream.hpp>
|
|
#include <mijin/virtual_filesystem/filesystem.hpp>
|
|
|
|
namespace sdl_gpu_test
|
|
{
|
|
struct Vertex
|
|
{
|
|
glm::vec3 pos;
|
|
glm::vec3 normal;
|
|
glm::vec2 texcoord;
|
|
glm::vec4 color;
|
|
};
|
|
|
|
struct Mesh
|
|
{
|
|
std::vector<Vertex> vertices;
|
|
};
|
|
|
|
[[nodiscard]]
|
|
Mesh loadMesh(const mijin::PathReference& path);
|
|
} // namespace sdl_gpu_test
|
|
|
|
#endif // !defined(SDL_GPU_TEST_PRIVATE_SDL_GPU_TEST_UTIL_MESH_HPP_INCLUDED)
|