30#include "gl_helper.hpp"
36#include <glm/gtc/matrix_transform.hpp>
37#include <glm/gtc/type_ptr.hpp>
226 GLint mipmap_max = GL_LINEAR);
237 void Draw(Types::ShaderName 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 hasMipmap = 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_hasMipmap(GLboolean hasMipmap);
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.
GLint wrapping
Type of texture wrapping.
GLint filtering_min
Minifying texture filtering.
std::vector< Types::Vertex > vertices
vertices of the mesh
GLint mipmap_min
Type of mipmap minifying texture filtering.
GLboolean hasMipmap
Should the texture have a mipmap?
void Draw(Types::ShaderName shader_name)
Draw the mesh.
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.
std::vector< Types::Texture > textures
textures of the mesh
GLint filtering_mag
Magnifying texture filtering.
GLint mipmap_mag
Type of mipmap magnifying texture filtering.
std::vector< unsigned int > indices
indices of the mesh
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.