From: Mikko Rasa Date: Wed, 27 Nov 2013 08:30:26 +0000 (+0200) Subject: Make TexUnits aware of their incides X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=706d49dc7ca9b3969f6f79db16b0cc02576f3de3;p=libs%2Fgl.git Make TexUnits aware of their incides --- diff --git a/source/texunit.cpp b/source/texunit.cpp index aa52aed4..2b3418fe 100644 --- a/source/texunit.cpp +++ b/source/texunit.cpp @@ -72,7 +72,12 @@ TexUnit &TexUnit::activate(unsigned n) throw out_of_range("TexUnit::activate"); if(units.size()<=n) + { + unsigned i = units.size(); units.resize(n+1); + for(; i