summaryrefslogtreecommitdiff
path: root/gfx/models/vertex.h
blob: 5b858de3cb2d381887619912fb1a7de0c172639e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include "config/types.h"
#include <glad/gl.h>

class Vertex {
public:
#ifndef __cpp_aggregate_paren_init
	constexpr Vertex(
			RelativePosition3D pos, TextureRelCoord texCoord, Normal3D normal, RGBA colour = {}, GLuint material = 0) :
		pos {std::move(pos)}, texCoord {std::move(texCoord)}, normal {std::move(normal)}, colour {std::move(colour)},
		material {material}
	{
	}
#endif

	bool operator==(const Vertex &) const = default;

	RelativePosition3D pos {};
	TextureRelCoord texCoord {};
	Normal3D normal {};
	RGBA colour {};
	GLuint material {};
};