summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-10 16:38:42 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-10 16:38:42 +0300
commit57c4153a8ba211741b5f8fa87f262eefd3a837e9 (patch)
tree4f3b4d0f87ebea1e989b7a87054127af69ab0bff /src/render
parentab1ed6038406492b7d60036c3b9c5d46e7e0f754 (diff)
downloadmv-57c4153a8ba211741b5f8fa87f262eefd3a837e9.tar.gz
mv-57c4153a8ba211741b5f8fa87f262eefd3a837e9.tar.bz2
mv-57c4153a8ba211741b5f8fa87f262eefd3a837e9.tar.xz
mv-57c4153a8ba211741b5f8fa87f262eefd3a837e9.zip
Remove all element buffer references from mobile opengl 2 backend.
Diffstat (limited to 'src/render')
-rw-r--r--src/render/mobileopengl2graphics.cpp28
-rw-r--r--src/render/mobileopengl2graphics.h4
2 files changed, 0 insertions, 32 deletions
diff --git a/src/render/mobileopengl2graphics.cpp b/src/render/mobileopengl2graphics.cpp
index b049d2ede..6cb88c34d 100644
--- a/src/render/mobileopengl2graphics.cpp
+++ b/src/render/mobileopengl2graphics.cpp
@@ -97,9 +97,7 @@ MobileOpenGL2Graphics::MobileOpenGL2Graphics() :
mDrawTypeUniform(0U),
mVao(0U),
mVbo(0U),
- mEbo(0U),
mVboBinded(0U),
- mEboBinded(0U),
mAttributesBinded(0U),
mColorAlpha(false),
mTextureDraw(false),
@@ -127,11 +125,6 @@ void MobileOpenGL2Graphics::deleteGLObjects()
// logger->log("delete buffer vbo: %u", mVbo);
mglDeleteBuffers(1, &mVbo);
}
- if (mEbo)
- {
-// logger->log("delete buffer ebo: %u", mEbo);
- mglDeleteBuffers(1, &mEbo);
- }
if (mVao)
mglDeleteVertexArrays(1, &mVao);
}
@@ -160,9 +153,6 @@ void MobileOpenGL2Graphics::postInit()
mglGenBuffers(1, &mVbo);
// logger->log("gen vbo buffer: %u", mVbo);
bindArrayBuffer(mVbo);
- mglGenBuffers(1, &mEbo);
-// logger->log("gen ebo buffer: %u", mEbo);
- bindElementBuffer(mEbo);
logger->log("Compiling shaders");
mProgram = shaders.getSimpleProgram();
@@ -203,7 +193,6 @@ void MobileOpenGL2Graphics::screenResized()
{
deleteGLObjects();
mVboBinded = 0U;
- mEboBinded = 0U;
mAttributesBinded = 0U;
postInit();
}
@@ -357,11 +346,8 @@ void MobileOpenGL2Graphics::testDraw()
};
*/
// logger->log("allocate: %d, %ld", mVboBinded, sizeof(vertices));
-// logger->log("allocate ebo: %d, %ld", mEboBinded, sizeof(elements));
// mglBufferData(GL_ARRAY_BUFFER, sizeof(vertices),
// vertices, GL_STREAM_DRAW);
-// mglBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(elements),
-// elements, GL_STREAM_DRAW);
#ifdef DEBUG_DRAW_CALLS
mDrawCalls ++;
#endif
@@ -1159,20 +1145,6 @@ void MobileOpenGL2Graphics::bindArrayBuffer(const GLuint vbo)
}
}
-void MobileOpenGL2Graphics::bindElementBuffer(const GLuint ebo)
-{
- if (mEboBinded != ebo)
- {
- mEboBinded = ebo;
- logger->log("bind element: %u", ebo);
- mglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo);
-/*
- if (mglIsBuffer(ebo) != GL_TRUE)
- logger->log("bind wrong buffer: %u", vbo);
-*/
- }
-}
-
void MobileOpenGL2Graphics::bindArrayBufferAndAttributes(const GLuint vbo)
{
if (mVboBinded != vbo)
diff --git a/src/render/mobileopengl2graphics.h b/src/render/mobileopengl2graphics.h
index ea31daf6b..ece11a736 100644
--- a/src/render/mobileopengl2graphics.h
+++ b/src/render/mobileopengl2graphics.h
@@ -105,8 +105,6 @@ class MobileOpenGL2Graphics final : public Graphics
inline void bindAttributes();
- inline void bindElementBuffer(const GLuint ebo);
-
GLint *mIntArray A_NONNULLPOINTER;
GLint *mIntArrayCached A_NONNULLPOINTER;
ShaderProgram *mProgram;
@@ -123,9 +121,7 @@ class MobileOpenGL2Graphics final : public Graphics
GLuint mDrawTypeUniform;
GLuint mVao;
GLuint mVbo;
- GLuint mEbo;
GLuint mVboBinded;
- GLuint mEboBinded;
GLuint mAttributesBinded;
bool mColorAlpha;
bool mTextureDraw;