1
Fork 0
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:
Pedro Pereira 2021-11-05 01:08:29 +00:00 committed by Andreas Kling
parent a8fed919e7
commit 7fb8af73bf
2 changed files with 41 additions and 6 deletions

View file

@ -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;
};