diff options
Diffstat (limited to 'src/model/fragment.h')
-rw-r--r-- | src/model/fragment.h | 7 |
1 files changed, 4 insertions, 3 deletions
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 |