Vertex.hpp
1// Copyright 2019 Arthur Sonzogni. All rights reserved.
2// Use of this source code is governed by the MIT license that can be found in
3// the LICENSE file.
4
5#ifndef SMK_VERTEX_HPP
6#define SMK_VERTEX_HPP
7
8#include <glm/glm.hpp>
9
10namespace smk {
11
12/// The vertex structure suitable for a 2D shader.
13struct Vertex2D {
14 glm::vec2 space_position = {0.f, 0.f};
15 glm::vec2 texture_position = {0.f, 0.f};
16
17 static void Bind();
18};
19
20/// The vertex structure suitable for a 2D shader.
21struct Vertex3D {
22 glm::vec3 space_position = {0.f, 0.f, 0.f};
23 glm::vec3 normal = {0.f, 0.f, 0.f};
24 glm::vec2 texture_position = {0.f, 0.f};
25
26 static void Bind();
27};
28
29using Vertex = Vertex2D;
30
31} // namespace smk.
32
33#endif /* end of include guard: SMK_VERTEX_HPP */
The vertex structure suitable for a 2D shader.
Definition: Vertex.hpp:13
The vertex structure suitable for a 2D shader.
Definition: Vertex.hpp:21