From be74509b31b26e714c6b380e17ed3935ec0b6cf0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 12 Jun 2014 23:23:00 +0300 Subject: In modernopengl add support for buffered draw tile collection. This is first cached function implemented in modernopengl. Also add support for bind buffer attributes. Add finalize method to convert any cached data into data for GPU. --- src/resources/map/maplayer.cpp | 3 ++- src/resources/map/maplayer.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/resources') diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp index 51e076e81..c1f1f2d7a 100644 --- a/src/resources/map/maplayer.cpp +++ b/src/resources/map/maplayer.cpp @@ -246,7 +246,7 @@ void MapLayer::updateSDL(const Graphics *const graphics, BLOCK_END("MapLayer::updateSDL") } -void MapLayer::updateOGL(const Graphics *const graphics, +void MapLayer::updateOGL(Graphics *const graphics, int startX, int startY, int endX, int endY, const int scrollX, const int scrollY, @@ -323,6 +323,7 @@ void MapLayer::updateOGL(const Graphics *const graphics, } } } + graphics->finalize(imgVert); BLOCK_END("MapLayer::updateOGL") } diff --git a/src/resources/map/maplayer.h b/src/resources/map/maplayer.h index fc1fe611d..e82aa5870 100644 --- a/src/resources/map/maplayer.h +++ b/src/resources/map/maplayer.h @@ -96,7 +96,7 @@ class MapLayer final: public ConfigListener #ifdef USE_OPENGL void drawOGL(Graphics *const graphics); - void updateOGL(const Graphics *const graphics, + void updateOGL(Graphics *const graphics, int startX, int startY, int endX, int endY, const int scrollX, const int scrollY, -- cgit v1.2.3-70-g09d2