SimpleEngine/include/simpleengine/vertex.h

47 lines
1.2 KiB
C
Raw Normal View History

#pragma once
#include <functional>
#ifdef __linux__
#include <GL/glew.h>
#include <GL/gl.h>
#else
#include <gl/glew.h>
#include <gl/gl.h>
#endif
#include <glm/glm.hpp>
2021-11-28 18:21:25 +00:00
#include "vector.h"
namespace simpleengine {
/**
* @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, int texture_id = -1.f) :
2022-09-27 20:22:04 +00:00
position(position), color(color), tex_coord(tex_coord), normal(glm::vec3(0.f)) {
}
LitVertex(simpleengine::Vectorf position, glm::vec3 color, glm::vec2 tex_coord, glm::vec3 normal, int texture_id = -1.f) :
2022-09-27 20:22:04 +00:00
position(position), color(color), tex_coord(tex_coord), normal(normal) {
}
LitVertex(simpleengine::Vectorf position, glm::vec2 tex_coord, glm::vec3 normal, int texture_id = -1.f) :
2022-09-27 20:22:04 +00:00
position(position), color(glm::vec3(1.f)), tex_coord(tex_coord), normal(normal) {
}
};
}