]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texunit.cpp
Inherit Loaders from the ObjectLoader classes
[libs/gl.git] / source / texunit.cpp
index ba3e7ca6208e3716029027dcdb253b7203221f15..622599a213d2481acba6707e573286b0d4145f9d 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of libmspgl
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+Copyright © 2007-2008  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
@@ -27,6 +27,13 @@ bool TexUnit::set_texture(const Texture *tex)
        return result;
 }
 
+bool TexUnit::set_texenv(const TexEnv *env)
+{
+       bool result=(texenv!=env);
+       texenv=env;
+       return result;
+}
+
 TexUnit &TexUnit::activate(unsigned n)
 {
        if(units.size()<=n)
@@ -34,7 +41,7 @@ TexUnit &TexUnit::activate(unsigned n)
 
        if(cur_unit!=&units[n] && (cur_unit || n))
        {
-               require_version(1, 3);
+               static RequireVersion _ver(1, 3);
                glActiveTexture(GL_TEXTURE0+n);
        }
        cur_unit=&units[n];