X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmatrix.cpp;h=b7f76bc77528965fcff8f15ef90b353cf3dd836b;hb=c4fa55619539de9045167250d5b1c13d1827cf7a;hp=549fe8b61578ecf94958e2650519aea7579a8e00;hpb=2e7f19b895424c3a77940e648639f8df2b395d0f;p=libs%2Fgl.git diff --git a/source/matrix.cpp b/source/matrix.cpp index 549fe8b6..b7f76bc7 100644 --- a/source/matrix.cpp +++ b/source/matrix.cpp @@ -278,12 +278,14 @@ GLenum MatrixStack::current_mode = GL_MODELVIEW; MatrixStack::MatrixStack(GLenum m): mode(m) { + matrices.reserve(mode==GL_MODELVIEW ? 32 : 4); matrices.push_back(Matrix()); } MatrixStack::MatrixStack(): mode(0) { + matrices.reserve(32); matrices.push_back(Matrix()); }