Added texture loading and displaying for 3D models

This commit is contained in:
trotFunky 2019-09-30 19:20:10 +02:00
parent 01ad1a2317
commit 4050410039
4 changed files with 89 additions and 8 deletions

View file

@ -21,7 +21,7 @@ public:
/// Loads an ASCII OFF file. Detects if there is texture data. Only triangles are supported.
bool load_ascii_off_file(const std::string& file_name);
void assign_texture(Texture& new_texture);
bool assign_texture(Texture& new_texture);
void set_scaling(float x_scale, float y_scale, float z_scale);
void set_rotation(float angle, float x, float y, float z);
@ -37,7 +37,7 @@ private:
Vec3f* vertices{};
/// Indices of the vertices making up each face
Vec3i* faces{};
/// Normals of each face
/// Normals of each vertex
Vec3f* normals{};
uint32_t texture_count;