+++ /dev/null
-#ifndef MSP_GL_TEXGEN_H_
-#define MSP_GL_TEXGEN_H_
-
-#include "gl.h"
-#include "vector.h"
-
-namespace Msp {
-namespace GL {
-
-enum TexCoordComponent
-{
- SCOORD = GL_S,
- TCOORD = GL_T,
- RCOORD = GL_R,
- QCOORD = GL_Q
-};
-
-enum TexGenMode
-{
- EYE_LINEAR = GL_EYE_LINEAR,
- OBJECT_LINEAR = GL_OBJECT_LINEAR,
- REFLECTION_MAP = GL_REFLECTION_MAP,
- NORMAL_MAP = GL_NORMAL_MAP
-};
-
-class TexGen
-{
-private:
- TexGenMode mode;
- Vector4 plane;
-
-public:
- TexGen();
- ~TexGen();
-
- void set_mode(TexGenMode);
- void set_plane(const Vector4 &);
-
- void bind_to(TexCoordComponent c) const { bind_to(0, c); }
- void bind_to(unsigned, TexCoordComponent) const;
-
- static const TexGen *current(TexCoordComponent c) { return current(0, c); }
- static const TexGen *current(unsigned, TexCoordComponent);
- static void unbind_from(TexCoordComponent c) { unbind_from(0, c); }
- static void unbind_from(unsigned, TexCoordComponent);
-private:
- static unsigned coord_index(TexCoordComponent);
-};
-
-} // namespace GL
-} // namespace Msp
-
-#endif