From ba9d61266c5f5d3d618e55bf6b85a2569c04c29f Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 8 Feb 2009 16:50:54 +0000 Subject: materials system --- src/model/fragment.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/model/fragment.h') diff --git a/src/model/fragment.h b/src/model/fragment.h index 1978baa..d9c200d 100644 --- a/src/model/fragment.h +++ b/src/model/fragment.h @@ -12,6 +12,7 @@ #include "math/axis.h" #include "math/color.h" #include "math/vector3f.h" +#include "model/material.h" namespace model { @@ -24,7 +25,7 @@ public: enum Type {Triangles, Quads}; /// create a new fragment - Fragment(Type type, unsigned int material); + Fragment(Type type, const Material *material); /// add a vertex to the fragment size_t add_vertex(math::Vector3f const & vertex, math::Vector3f const &normal, math::Color const & color, bool detail); @@ -54,7 +55,7 @@ public: } /// material flags - inline unsigned int material() + inline const Material * material() const { return fragment_material; } @@ -64,7 +65,7 @@ private: size_t fragment_index; size_t fragment_structural_size; size_t fragment_detail_size; - unsigned int fragment_material; + const Material * fragment_material; }; /// a collection of fragments -- cgit v1.2.3