summaryrefslogtreecommitdiff
path: root/graphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'graphics.h')
-rw-r--r--graphics.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/graphics.h b/graphics.h
index 7eb284d..433d7b8 100644
--- a/graphics.h
+++ b/graphics.h
@@ -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
{