X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexturing.h;h=2b409d64fb713ee221a4842110832258bd92f711;hp=c51782bbf237959558af379998d5f4bab504d962;hb=d901696935a6bf9fdad6ac8abe65ffab79bd297d;hpb=abc16c5ab0fff0945d724febe9d5d3889fb8a6ce diff --git a/source/texturing.h b/source/texturing.h index c51782bb..2b409d64 100644 --- a/source/texturing.h +++ b/source/texturing.h @@ -1,10 +1,3 @@ -/* $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_ @@ -14,36 +7,32 @@ Distributed under the LGPL namespace Msp { namespace GL { -class TexEnv; class Texture; class Texturing: public Bindable { private: - struct Attachment - { - const Texture *tex; - const TexEnv *env; - - Attachment(); - }; + std::vector attachments; - std::vector attachments; + static bool legacy_used; 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 bind_attachment(unsigned) const; + void set_attachment(unsigned, const Texture *); +public: + const Texture *get_attached_texture(unsigned) const; + +private: + void bind_attachment(unsigned, bool) const; static void unbind_attachment(unsigned); public: - void bind() const; + void bind(bool = true) const; static void unbind(); };