]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texturing.cpp
Remove a number of rarely used legacy features
[libs/gl.git] / source / texturing.cpp
index 1c8410c57a6bff3ee9388805964a1cca0876981c..db8ee65359a87993fe707fd0182bda4f210e1f51 100644 (file)
@@ -1,4 +1,3 @@
-#include "texenv.h"
 #include "texture.h"
 #include "texturing.h"
 #include "texunit.h"
@@ -16,20 +15,15 @@ Texturing::~Texturing()
 
 void Texturing::attach(unsigned attch, const Texture &tex)
 {
-       set_attachment(attch, &tex, 0);
-}
-
-void Texturing::attach(unsigned attch, const Texture &tex, const TexEnv &env)
-{
-       set_attachment(attch, &tex, &env);
+       set_attachment(attch, &tex);
 }
 
 void Texturing::detach(unsigned attch)
 {
-       set_attachment(attch, 0, 0);
+       set_attachment(attch, 0);
 }
 
-void Texturing::set_attachment(unsigned attch, const Texture *tex, const TexEnv *env)
+void Texturing::set_attachment(unsigned attch, const Texture *tex)
 {
        if(attch>=TexUnit::get_n_units())
                throw out_of_range("Texturing::set_attachment");
@@ -38,7 +32,6 @@ void Texturing::set_attachment(unsigned attch, const Texture *tex, const TexEnv
                attachments.resize(attch+1);
 
        attachments[attch].tex = tex;
-       attachments[attch].env = env;
 
        if(current()==this)
                bind_attachment(attch);
@@ -51,16 +44,11 @@ void Texturing::bind_attachment(unsigned i) const
                attch.tex->bind_to(i);
        else
                Texture::unbind_from(i);
-       if(attch.env)
-               attch.env->bind_to(i);
-       else
-               TexEnv::unbind_from(i);
 }
 
 void Texturing::unbind_attachment(unsigned i)
 {
        Texture::unbind_from(i);
-       TexEnv::unbind_from(i);
 }
 
 void Texturing::bind() const
@@ -90,8 +78,7 @@ void Texturing::unbind()
 
 
 Texturing::Attachment::Attachment():
-       tex(0),
-       env(0)
+       tex(0)
 { }
 
 } // namespace GL