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/gui/widgets/scrollarea.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/widgets/scrollarea.cpp') diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index fc7ae91d5..028c2e7b1 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -320,6 +320,7 @@ void ScrollArea::draw(Graphics *graphics) { if (!mOpaque) updateCalcFlag(graphics); + // need add caching or remove calc calls. // if (mRedraw) { mVertexes->clear(); @@ -344,6 +345,7 @@ void ScrollArea::draw(Graphics *graphics) calcHBar(graphics); calcHMarker(graphics); } + graphics->finalize(mVertexes); } graphics->drawTileCollection(mVertexes); } @@ -436,6 +438,7 @@ void ScrollArea::drawFrame(Graphics *graphics) 0, 0, w, h, background); + graphics->finalize(mVertexes2); } graphics->drawTileCollection(mVertexes2); } -- cgit v1.2.3-60-g2f50