]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texunit.cpp
Style update: add spaces around assignment operators
[libs/gl.git] / source / texunit.cpp
index 7aced5cc3ba2ab182a4c5e37ce6b37f42e6e21a6..1155fa96286be0ab199280e61ea909115545df30 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
 */
 
@@ -22,8 +22,15 @@ TexUnit::TexUnit():
 
 bool TexUnit::set_texture(const Texture *tex)
 {
-       bool result=(tex!=texture);
-       texture=tex;
+       bool result = (tex!=texture);
+       texture = tex;
+       return result;
+}
+
+bool TexUnit::set_texenv(const TexEnv *env)
+{
+       bool result = (texenv!=env);
+       texenv = env;
        return result;
 }
 
@@ -37,7 +44,7 @@ TexUnit &TexUnit::activate(unsigned n)
                static RequireVersion _ver(1, 3);
                glActiveTexture(GL_TEXTURE0+n);
        }
-       cur_unit=&units[n];
+       cur_unit = &units[n];
 
        return units[n];
 }
@@ -50,7 +57,7 @@ TexUnit &TexUnit::current()
 }
 
 vector<TexUnit> TexUnit::units;
-TexUnit *TexUnit::cur_unit=0;
+TexUnit *TexUnit::cur_unit = 0;
 
 } // namespace GL
 } // namespace Msp