1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:57:45 +00:00

3DFileViewer: Support textured models

Models that contain UV co-ordinates are now supported,
and will display with a texture wrapped around it, provided
a `bmp` with the same name as the object is in the same
directory as the 3D Model.
This commit is contained in:
Jesse Buhagiar 2021-05-23 23:57:53 +10:00 committed by Ali Mohammad Pur
parent 3287709df9
commit 343e66b816
7 changed files with 13657 additions and 9899 deletions

View file

@ -16,9 +16,18 @@ struct Vertex {
GLfloat z;
};
struct TexCoord {
GLfloat u;
GLfloat v;
};
// A triangle defines a single "face" of a mesh
struct Triangle {
GLuint a;
GLuint b;
GLuint c;
GLuint tex_coord_index0;
GLuint tex_coord_index1;
GLuint tex_coord_index2;
};