18 Mesh(
const void* vertices,
int vertex_stride,
const void* normals,
int normal_stride,
int num_vertices,
const void* indices,
int num_indices,
bool wireframe =
false);
29 bool wireframe =
false);
37 const void* tex_coords,
42 bool wireframe =
false);
44 template <
template <
class>
class Alloc>
46 const std::vector<Eigen::Vector3f, Alloc<Eigen::Vector3f>>& vertices,
47 const std::vector<Eigen::Vector3f, Alloc<Eigen::Vector3f>>& normals,
48 const std::vector<int>& indices,
49 bool wireframe =
false)
50 :
Mesh(vertices.data(), sizeof(float) * 3, normals.data(), sizeof(float) * 3, vertices.size(), indices.data(), indices.size(), wireframe) {}
52 template <
template <
class>
class Alloc>
54 const std::vector<Eigen::Vector3f, Alloc<Eigen::Vector3f>>& vertices,
55 const std::vector<Eigen::Vector3f, Alloc<Eigen::Vector3f>>& normals,
56 const std::vector<Eigen::Vector4f, Alloc<Eigen::Vector4f>>& colors,
57 const std::vector<int>& indices,
58 bool wireframe =
false)
59 :
Mesh(vertices.data(), sizeof(float) * 3, normals.data(), sizeof(float) * 3, colors.data(), sizeof(float) * 4, vertices.size(), indices.data(), indices.size(), wireframe) {}
65 void set_texture(
const std::shared_ptr<Texture>& texture, GLenum texture_target = GL_TEXTURE1);
90 GLenum texture_target;
91 std::shared_ptr<Texture> texture;
Definition drawable.hpp:12
GLSLShader is a wrapper for OpenGL shader programs.
Definition glsl_shader.hpp:49
Mesh(const void *vertices, int vertex_stride, const void *normals, int normal_stride, const void *colors, int color_stride, int num_vertices, const void *indices, int num_indices, bool wireframe=false)
Mesh(const std::vector< Eigen::Vector3f, Alloc< Eigen::Vector3f > > &vertices, const std::vector< Eigen::Vector3f, Alloc< Eigen::Vector3f > > &normals, const std::vector< int > &indices, bool wireframe=false)
Definition mesh.hpp:45
void set_texture(const std::shared_ptr< Texture > &texture, GLenum texture_target=GL_TEXTURE1)
virtual void draw(glk::GLSLShader &shader) const override
Mesh(const std::vector< Eigen::Vector3f, Alloc< Eigen::Vector3f > > &vertices, const std::vector< Eigen::Vector3f, Alloc< Eigen::Vector3f > > &normals, const std::vector< Eigen::Vector4f, Alloc< Eigen::Vector4f > > &colors, const std::vector< int > &indices, bool wireframe=false)
Definition mesh.hpp:53
Mesh(const void *vertices, int vertex_stride, const void *normals, int normal_stride, int num_vertices, const void *indices, int num_indices, bool wireframe=false)
Mesh(const void *vertices, int vertex_stride, const void *normals, int normal_stride, const void *colors, int color_stride, const void *tex_coords, int tex_coord_stride, int num_vertices, const void *indices, int num_indices, bool wireframe=false)
Texture class to wrap OpenGL texture object.
Definition texture.hpp:11
Definition async_buffer_copy.hpp:6