diff options
author | rodri <rgl@antares-labs.eu> | 2024-07-13 15:18:19 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-07-13 15:18:19 +0000 |
commit | 82888bed1931e83ed1401485033cb9f7acdadc94 (patch) | |
tree | a481e076aa8ba6b28b30d1495061d4d7ff156512 /graphics.h | |
parent | 04d50b8bbe324fdb7a8a1e724fbc59c4050862f0 (diff) | |
download | libgraphics-82888bed1931e83ed1401485033cb9f7acdadc94.tar.gz libgraphics-82888bed1931e83ed1401485033cb9f7acdadc94.tar.bz2 libgraphics-82888bed1931e83ed1401485033cb9f7acdadc94.zip |
enable culling and add a camera knob for it.
Diffstat (limited to 'graphics.h')
-rw-r--r-- | graphics.h | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -6,24 +6,27 @@ typedef enum { } Projection; enum { - PPoint, + /* culling modes */ + CullNone, + CullFront, + CullBack, + + /* primitive types */ + PPoint = 0, PLine, PTriangle, -}; -enum { - LIGHT_POINT, + /* light types */ + LIGHT_POINT = 0, LIGHT_DIRECTIONAL, LIGHT_SPOT, -}; -enum { - RAWTexture, /* unmanaged */ + /* texture formats */ + RAWTexture = 0, /* unmanaged */ sRGBTexture, -}; -enum { - VAPoint, + /* vertex attribute types */ + VAPoint = 0, VANumber, }; @@ -282,12 +285,12 @@ struct Camera } clip; Matrix3 proj; /* VCS to clip space xform */ Projection projtype; + int cullmode; struct { uvlong min, avg, max, acc, n, v; uvlong nframes; } stats; - struct { Rendertime R[100], E[100], Tn[100], Rn[100]; int cur; |