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:
parent
3287709df9
commit
343e66b816
7 changed files with 13657 additions and 9899 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue