aboutsummaryrefslogtreecommitdiff
path: root/graphics.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-02-21 12:34:36 +0000
committerrodri <rgl@antares-labs.eu>2024-02-21 12:34:36 +0000
commit22e341ed6fc92f7bd547b0e6b1d5501d3eb9a7db (patch)
treeefd2aecf91466e84117106355f5ddac167693026 /graphics.h
parentaada4866f55485246e4e42f68f7402f022b687a2 (diff)
downloadlibgraphics-22e341ed6fc92f7bd547b0e6b1d5501d3eb9a7db.tar.gz
libgraphics-22e341ed6fc92f7bd547b0e6b1d5501d3eb9a7db.tar.bz2
libgraphics-22e341ed6fc92f7bd547b0e6b1d5501d3eb9a7db.zip
add initial support for OBJMaterial properties.
Diffstat (limited to 'graphics.h')
-rw-r--r--graphics.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/graphics.h b/graphics.h
index 3919eb4..930eca1 100644
--- a/graphics.h
+++ b/graphics.h
@@ -8,6 +8,7 @@ typedef enum {
enum {
LIGHT_POINT,
LIGHT_DIRECTIONAL,
+ LIGHT_SPOT,
};
typedef struct Color Color;
@@ -51,7 +52,9 @@ struct LightSource
struct Material
{
- int stub;
+ Color ambient;
+ Color diffuse;
+ Color specular;
};
struct Model
@@ -178,6 +181,7 @@ Viewport *mkviewport(Rectangle);
void rmviewport(Viewport*);
/* render */
+Point3 model2world(Entity*, Point3);
Point3 world2vcs(Camera*, Point3);
Point3 vcs2clip(Camera*, Point3);
Point3 world2clip(Camera*, Point3);