I originally planned to make this a render-to-texture demo, but this is fairly interesting by itself.
32 lines
497 B
C++
32 lines
497 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
#include "math/vec2.hpp"
|
|
#include "math/vec3.hpp"
|
|
#include "math/vec4.hpp"
|
|
|
|
using vec2 = vec<2, float>;
|
|
using vec3 = vec<3, float>;
|
|
using vec4 = vec<4, float>;
|
|
|
|
struct vertex__texture__normal {
|
|
uint16_t vertex;
|
|
uint16_t texture;
|
|
uint16_t normal;
|
|
};
|
|
|
|
struct vertex__normal {
|
|
uint16_t vertex;
|
|
uint16_t normal;
|
|
};
|
|
|
|
struct position__color {
|
|
vec3 position;
|
|
vec3 color;
|
|
};
|
|
|
|
using face_vtn = vertex__texture__normal[3];
|
|
|
|
using face_vn = vertex__normal[3];
|