diff --git a/drape/drape_tests/glfunctions.cpp b/drape/drape_tests/glfunctions.cpp index 5ce6b6bffe..3ca10c1d68 100644 --- a/drape/drape_tests/glfunctions.cpp +++ b/drape/drape_tests/glfunctions.cpp @@ -7,6 +7,11 @@ using namespace emul; #define MOCK_CALL(f) GLMockFunctions::Instance().f; +void GLFunctions::glFlush() +{ + +} + uint32_t GLFunctions::glGenVertexArray() { return MOCK_CALL(glGenVertexArray()); diff --git a/drape/glfunctions.cpp b/drape/glfunctions.cpp index 55190d2532..37bdecb057 100644 --- a/drape/glfunctions.cpp +++ b/drape/glfunctions.cpp @@ -15,6 +15,7 @@ namespace void (*glClearColorFn)(GLfloat r, GLfloat g, GLfloat b, GLfloat a) = NULL; void (*glClearFn)(GLbitfield mask) = NULL; void (*glViewportFn)(GLint x, GLint y, GLsizei w, GLsizei h) = NULL; + void (*glFlushFn)() = NULL; /// VAO void (*glGenVertexArraysFn)(GLsizei n, GLuint * ids) = NULL; @@ -102,6 +103,7 @@ void GLFunctions::Init() glClearColorFn = &::glClearColor; glClearFn = &::glClear; glViewportFn = &::glViewport; + glFlushFn = &::glFlush; /// VBO glGenBuffersFn = &::glGenBuffers; @@ -181,6 +183,11 @@ void GLFunctions::glViewport(uint32_t x, uint32_t y, uint32_t w, uint32_t h) GLCHECK(glViewportFn(x, y, w, h)); } +void GLFunctions::glFlush() +{ + GLCHECK(glFlushFn()); +} + uint32_t GLFunctions::glGenVertexArray() { ASSERT(glGenVertexArraysFn != NULL, ()); diff --git a/drape/glfunctions.hpp b/drape/glfunctions.hpp index 2567472f7b..fd05ca0a12 100644 --- a/drape/glfunctions.hpp +++ b/drape/glfunctions.hpp @@ -12,6 +12,7 @@ public: static void glClearColor(float r, float g, float b, float a); static void glClear(); static void glViewport(uint32_t x, uint32_t y, uint32_t w, uint32_t h); + static void glFlush(); /// VAO support static uint32_t glGenVertexArray(); diff --git a/drape_frontend/batchers_pool.cpp b/drape_frontend/batchers_pool.cpp index b05358ccd3..ee38a29ae6 100644 --- a/drape_frontend/batchers_pool.cpp +++ b/drape_frontend/batchers_pool.cpp @@ -18,6 +18,7 @@ namespace df const GLState & state, TransferPointer buffer) { + GLFunctions::glFlush(); sendMessage(MovePointer(new FlushTileMessage(key, state, buffer))); } }