summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-10 16:56:43 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-10 16:56:43 +0300
commit6ccc6e73a226c40c2f3538f6d6126bb2774edd52 (patch)
treeb74983012893021f3fd33e286b90898b3c071a7d /src/render
parent6e2867b935af242ca96767732e37b85a01620f42 (diff)
downloadmv-6ccc6e73a226c40c2f3538f6d6126bb2774edd52.tar.gz
mv-6ccc6e73a226c40c2f3538f6d6126bb2774edd52.tar.bz2
mv-6ccc6e73a226c40c2f3538f6d6126bb2774edd52.tar.xz
mv-6ccc6e73a226c40c2f3538f6d6126bb2774edd52.zip
Remove unused buffers from modernopengl.
Diffstat (limited to 'src/render')
-rw-r--r--src/render/modernopenglgraphics.cpp31
-rw-r--r--src/render/modernopenglgraphics.h6
2 files changed, 13 insertions, 24 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,
diff --git a/src/render/modernopenglgraphics.h b/src/render/modernopenglgraphics.h
index 8e60c5b5f..3b3be8d85 100644
--- a/src/render/modernopenglgraphics.h
+++ b/src/render/modernopenglgraphics.h
@@ -78,10 +78,8 @@ class ModernOpenGLGraphics final : public Graphics
const int dstX, const int dstY,
const int width, const int height);
- GLfloat *mFloatTexArray;
- GLshort *mShortVertArray;
- GLfloat *mFloatTexArrayCached;
- GLshort *mShortVertArrayCached;
+ GLfloat *mFloatArray;
+ GLfloat *mFloatArrayCached;
ShaderProgram *mSimpleProgram;
ShaderProgram *mTextureProgram;
float mAlphaCached;