Add PhongMaterial struct

This commit is contained in:
Abdelrahman Said 2024-08-18 22:19:54 +01:00
parent 29749c834a
commit ddfeba238d

View File

@ -25,6 +25,14 @@ struct triangle {
MAKE_LIST_TYPE(Triangle); MAKE_LIST_TYPE(Triangle);
typedef struct phong_material PhongMaterial;
struct phong_material {
f32 specular;
f32 diffuse;
f32 ambient;
f32 shininess;
};
typedef struct model Model; typedef struct model Model;
struct model { struct model {
LIST_TYPE(V3f) * vertices; LIST_TYPE(V3f) * vertices;
@ -33,6 +41,7 @@ struct model {
LIST_TYPE(Triangle) * triangles; LIST_TYPE(Triangle) * triangles;
Image *texture; Image *texture;
Image *normal; Image *normal;
PhongMaterial material;
}; };
Model load_obj_file(Arena *arena, const char *filename, const char *texture, Model load_obj_file(Arena *arena, const char *filename, const char *texture,