X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fmatrix.cpp;h=b7f76bc77528965fcff8f15ef90b353cf3dd836b;hp=549fe8b61578ecf94958e2650519aea7579a8e00;hb=1b7b75e3aaec35433cce81fc58e58e50e5a3f36e;hpb=01d2500733766710f4a11f49216a5b3dcc75a4a3 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()); }