mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 04:22:28 +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
Notes:
sideshowbarker
2024-07-18 17:21:59 +09:00
Author: https://github.com/Quaker762
Commit: 343e66b816
Pull-request: https://github.com/SerenityOS/serenity/pull/7024
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/ccapitalK
Reviewed-by: https://github.com/predmond
Reviewed-by: https://github.com/sunverwerth
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