mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
3DFileViewer: Add vertex normal parsing to WavefrontOBJLoader
This change allows us to parse vertex-normal lines "vn x y z" and map them to the correct index on face lines ("f v1/vt1/vn1").
This commit is contained in:
parent
a8fed919e7
commit
7fb8af73bf
2 changed files with 41 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Jesse Buhagiar <jooster669@gmail.com>
|
||||
* Copyright (c) 2021, Mathieu Gaillard <gaillard.mathieu.39@gmail.com>
|
||||
* Copyright (c) 2021, Pedro Pereira <pmh.pereira@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -30,4 +31,8 @@ struct Triangle {
|
|||
GLuint tex_coord_index0;
|
||||
GLuint tex_coord_index1;
|
||||
GLuint tex_coord_index2;
|
||||
|
||||
GLuint normal_index0;
|
||||
GLuint normal_index1;
|
||||
GLuint normal_index2;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue