30#include "gl_helper.hpp"
36#include <glm/gtc/matrix_transform.hpp>
37#include <glm/gtc/type_ptr.hpp>
224 GLboolean hasMipmap = GL_TRUE,
226 GLint mipmap_max = GL_LINEAR);
237 void draw(types::shader_name_t shader_name);
253 std::vector<types::vertex> vertices = {};
254 std::vector<unsigned int> indices = {};
255 std::vector<types::texture> textures = {};
256 GLint wrapping = GL_REPEAT;
257 GLint filtering_min = GL_NEAREST;
258 GLint filtering_mag = GL_LINEAR;
259 GLboolean has_mipmap = GL_TRUE;
260 GLint mipmap_min = GL_LINEAR_MIPMAP_LINEAR;
261 GLint mipmap_mag = GL_LINEAR;
264 builder &set_vertices(std::vector<types::vertex> vertices);
265 builder &set_indices(std::vector<unsigned int> indices);
266 builder &set_textures(std::vector<types::texture> textures);
267 builder &set_wrapping(GLint wrapping);
268 builder &set_filtering_min(GLint filtering_min);
269 builder &set_filtering_mag(GLint filtering_mag);
270 builder &set_has_mipmap(GLboolean has_mipmap);
271 builder &set_mipmap_min(GLint mipmap_min);
272 builder &set_mipmap_mag(GLint mipmap_mag);
The Builder class is used to build a Mesh object.
The Mesh class represents a 3D model.
std::vector< types::texture > textures
textures of the mesh
GLint filtering_min
Minifying texture filtering.
GLint mipmap_mag
Type of mipmap magnifying texture filtering.
void draw(types::shader_name_t shader_name)
Draw the mesh.
GLint wrapping
Type of texture wrapping.
GLboolean has_mipmap
Should the texture have a mipmap?
std::vector< unsigned int > indices
indices of the mesh
std::vector< types::vertex > vertices
vertices of the mesh
GLint mipmap_min
Type of mipmap minifying texture filtering.
GLint filtering_mag
Magnifying texture filtering.
mesh(std::vector< types::vertex > vertices, std::vector< unsigned int > indices, std::vector< types::texture > textures, GLint wrapping=GL_REPEAT, GLint filtering_min=GL_NEAREST, GLint filtering_mag=GL_LINEAR, GLboolean hasMipmap=GL_TRUE, GLint mipmap_min=GL_LINEAR_MIPMAP_LINEAR, GLint mipmap_max=GL_LINEAR)
Construct a new Mesh object.
Buffer wrapper around OpenGL buffer objects.
Vertex Array Object (VAO)
The Texture struct represents a texture of a 3D model.
The Vertex struct represents a vertex of a 3D model.