-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2010 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
#ifndef MSP_GL_TEXTURING_H_
#define MSP_GL_TEXTURING_H_
namespace Msp {
namespace GL {
-class TexEnv;
class Texture;
class Texturing: public Bindable<Texturing>
{
private:
- struct Attachment
- {
- const Texture *tex;
- const TexEnv *env;
-
- Attachment();
- };
-
- std::vector<Attachment> attachments;
+ std::vector<const Texture *> attachments;
public:
~Texturing();
void attach(unsigned, const Texture &);
- void attach(unsigned, const Texture &, const TexEnv &);
void detach(unsigned);
private:
- void set_attachment(unsigned, const Texture *, const TexEnv *);
+ void set_attachment(unsigned, const Texture *);
+public:
+ const Texture *get_attached_texture(unsigned) const;
+
+private:
void bind_attachment(unsigned) const;
static void unbind_attachment(unsigned);