fixed bug with "number of periods on the texture" calculation.

This commit is contained in:
rachytski 2012-06-09 00:18:47 +04:00 committed by Alex Zolotarev
parent 22e3a7a351
commit cb731dc273

View file

@ -71,7 +71,7 @@ namespace yg
curLen += tmpV[i++];
}
int periods = max(int(256 / length), 1);
int periods = max(int((256 - 4) / length), 1);
m_pat.reserve(periods * vec.size());
for (int i = 0; i < periods; ++i)
copy(vec.begin(), vec.end(), back_inserter(m_pat));