diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-10 16:56:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-10 16:56:43 +0300 |
commit | 6ccc6e73a226c40c2f3538f6d6126bb2774edd52 (patch) | |
tree | b74983012893021f3fd33e286b90898b3c071a7d /src/render/modernopenglgraphics.cpp | |
parent | 6e2867b935af242ca96767732e37b85a01620f42 (diff) | |
download | plus-6ccc6e73a226c40c2f3538f6d6126bb2774edd52.tar.gz plus-6ccc6e73a226c40c2f3538f6d6126bb2774edd52.tar.bz2 plus-6ccc6e73a226c40c2f3538f6d6126bb2774edd52.tar.xz plus-6ccc6e73a226c40c2f3538f6d6126bb2774edd52.zip |
Remove unused buffers from modernopengl.
Diffstat (limited to 'src/render/modernopenglgraphics.cpp')
-rw-r--r-- | src/render/modernopenglgraphics.cpp | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp index ab8a9a787..22c9beea7 100644 --- a/src/render/modernopenglgraphics.cpp +++ b/src/render/modernopenglgraphics.cpp @@ -51,10 +51,8 @@ unsigned int ModernOpenGLGraphics::mLastDrawCalls = 0; #endif ModernOpenGLGraphics::ModernOpenGLGraphics() : - mFloatTexArray(nullptr), - mShortVertArray(nullptr), - mFloatTexArrayCached(nullptr), - mShortVertArrayCached(nullptr), + mFloatArray(nullptr), + mFloatArrayCached(nullptr), mSimpleProgram(nullptr), mTextureProgram(nullptr), mAlphaCached(1.0F), @@ -103,14 +101,10 @@ void ModernOpenGLGraphics::initArrays(const int vertCount) // need alocate small size, after if limit reached reallocate to double size const size_t sz = mMaxVertices * 4 + 30; vertexBufSize = mMaxVertices; - if (!mFloatTexArray) - mFloatTexArray = new GLfloat[sz]; - if (!mShortVertArray) - mShortVertArray = new GLshort[sz]; - if (!mFloatTexArrayCached) - mFloatTexArrayCached = new GLfloat[sz]; - if (!mShortVertArrayCached) - mShortVertArrayCached = new GLshort[sz]; + if (!mFloatArray) + mFloatArray = new GLfloat[sz]; + if (!mFloatArrayCached) + mFloatArrayCached = new GLfloat[sz]; } void ModernOpenGLGraphics::postInit() @@ -158,14 +152,10 @@ void ModernOpenGLGraphics::deleteArrays() void ModernOpenGLGraphics::deleteArraysInternal() { - delete [] mFloatTexArray; - mFloatTexArray = nullptr; - delete [] mShortVertArray; - mShortVertArray = nullptr; - delete [] mFloatTexArrayCached; - mFloatTexArrayCached = nullptr; - delete [] mShortVertArrayCached; - mShortVertArrayCached = nullptr; + delete [] mFloatArray; + mFloatArray = nullptr; + delete [] mFloatArrayCached; + mFloatArrayCached = nullptr; } bool ModernOpenGLGraphics::setVideoMode(const int w, const int h, @@ -340,6 +330,7 @@ void ModernOpenGLGraphics::drawPatternInline(const Image *const image, const int x, const int y, const int w, const int h) { + } void ModernOpenGLGraphics::drawRescaledPattern(const Image *const image, |