From 93afaab0c394a848998ed3df44d7df741b892a3f Mon Sep 17 00:00:00 2001 From: Volodymyr Patuta Date: Sat, 2 Jan 2021 23:08:47 +0100 Subject: [PATCH] new structure object_t It contains a surface, an ID (star=0, planet=1, moon=2) and its params. --- moteur.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/moteur.h b/moteur.h index ad80835..f11768c 100644 --- a/moteur.h +++ b/moteur.h @@ -29,7 +29,7 @@ extern "C" { typedef struct vertex_t vertex_t; typedef struct triangle_t triangle_t; typedef struct surface_t surface_t; - + typedef struct object_t object_t; /*!\brief états pour les sommets ou les triangles */ enum pstate_t { PS_NONE = 0, @@ -124,6 +124,12 @@ extern "C" { void (*shadingfunc)(surface_t *, GLuint *, vertex_t *); }; + struct object_t { + int id; + surface_t * s; + float vars[10]; + }; + /* dans primitives.c */ extern void transform_n_raster(surface_t * s, float * mvMat, float * projMat); extern void clearDepth(void);