diff options
author | rodri <rgl@antares-labs.eu> | 2024-02-12 23:02:28 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-02-12 23:02:28 +0000 |
commit | e90bf70b0d7167166a3c84e4f3e9277ce4a7e97a (patch) | |
tree | 39ac469fecf1247eaa711b373b661d829e43e10b /graphics.h | |
parent | d3b995b6e6d02a4c2413313b34a1548a777f99f9 (diff) | |
download | libgraphics-e90bf70b0d7167166a3c84e4f3e9277ce4a7e97a.tar.gz libgraphics-e90bf70b0d7167166a3c84e4f3e9277ce4a7e97a.tar.bz2 libgraphics-e90bf70b0d7167166a3c84e4f3e9277ce4a7e97a.zip |
completed homogeneous clipping procedure.
Diffstat (limited to 'graphics.h')
-rw-r--r-- | graphics.h | 41 |
1 files changed, 41 insertions, 0 deletions
@@ -5,8 +5,18 @@ typedef enum { PERSPECTIVE } Projection; +enum { + LIGHT_POINT, + LIGHT_DIRECTIONAL, +}; + typedef struct Color Color; typedef struct Vertex Vertex; +typedef struct LightSource LightSource; +typedef struct Material Material; +typedef struct Model Model; +typedef struct Entity Entity; +typedef struct Environment Environment; typedef struct VSparams VSparams; typedef struct FSparams FSparams; typedef struct SUparams SUparams; @@ -27,10 +37,41 @@ struct Vertex Point3 n; /* surface normal */ Color c; /* shading color */ Point2 uv; /* texture coordinate */ + + double intensity; }; typedef Vertex Triangle[3]; +struct LightSource +{ + Point3 p; + int type; +}; + +struct Material +{ + int stub; +}; + +struct Model +{ + Material *materials; + ulong nmaterials; +}; + +struct Entity +{ + Model *mdl; +}; + +struct Scene +{ + Entity **ents; + ulong nents; + +}; + /* shader params */ struct VSparams { |