2021-11-27 19:16:41 +00:00
|
|
|
#pragma once
|
2021-11-25 21:15:24 +00:00
|
|
|
|
2021-12-09 04:14:45 +00:00
|
|
|
#include <functional>
|
2021-12-02 21:58:15 +00:00
|
|
|
#ifdef __linux__
|
|
|
|
#include <GL/glew.h>
|
|
|
|
#include <GL/gl.h>
|
2021-12-13 03:17:59 +00:00
|
|
|
#else
|
2021-11-25 21:15:24 +00:00
|
|
|
#include <gl/glew.h>
|
|
|
|
#include <gl/gl.h>
|
2021-12-02 21:58:15 +00:00
|
|
|
#endif
|
2021-11-25 21:15:24 +00:00
|
|
|
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
|
2021-11-28 18:21:25 +00:00
|
|
|
#include "vector.h"
|
|
|
|
|
2021-11-25 21:15:24 +00:00
|
|
|
namespace simpleengine {
|
|
|
|
class Vertex {
|
|
|
|
public:
|
2021-11-28 18:21:25 +00:00
|
|
|
simpleengine::Vectorf position;
|
2021-11-25 21:15:24 +00:00
|
|
|
glm::vec3 color;
|
|
|
|
glm::vec2 tex_coord;
|
2021-12-07 05:17:04 +00:00
|
|
|
|
2021-12-09 04:14:45 +00:00
|
|
|
Vertex() = default;
|
|
|
|
|
2021-12-07 05:17:04 +00:00
|
|
|
Vertex(simpleengine::Vectorf position, glm::vec3 color, glm::vec2 tex_coord) : position(position), color(color), tex_coord(tex_coord) {
|
|
|
|
|
|
|
|
}
|
2021-11-25 21:15:24 +00:00
|
|
|
};
|
2021-12-09 04:14:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief A `Vertex` that can be lit up.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
class LitVertex {
|
|
|
|
public:
|
|
|
|
simpleengine::Vectorf position;
|
|
|
|
glm::vec3 color;
|
|
|
|
glm::vec2 tex_coord;
|
|
|
|
glm::vec3 normal;
|
|
|
|
|
|
|
|
LitVertex() = default;
|
|
|
|
|
|
|
|
LitVertex(simpleengine::Vectorf position, glm::vec3 color, glm::vec2 tex_coord, glm::vec3 normal) :
|
|
|
|
position(position), color(color), tex_coord(tex_coord), normal(normal) {
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
2021-11-27 19:16:41 +00:00
|
|
|
}
|