diff options
author | Stijn Buys <ingar@osirion.org> | 2009-02-08 16:50:54 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-02-08 16:50:54 +0000 |
commit | ba9d61266c5f5d3d618e55bf6b85a2569c04c29f (patch) | |
tree | 6e630ba2c6500701b08df04f44f921421b82782f /src/model/fragment.h | |
parent | 2386bda56b33de68370fa8acc76e39ddddd836c6 (diff) |
materials system
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 |