summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-12 23:23:00 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-13 12:41:35 +0300
commitbe74509b31b26e714c6b380e17ed3935ec0b6cf0 (patch)
tree7f575c73694e0cb3673c5b648e7b5e48bc97100f /src/gui
parentbcb340f51ca2d69fd062d6548ef283303d43d9ac (diff)
downloadplus-be74509b31b26e714c6b380e17ed3935ec0b6cf0.tar.gz
plus-be74509b31b26e714c6b380e17ed3935ec0b6cf0.tar.bz2
plus-be74509b31b26e714c6b380e17ed3935ec0b6cf0.tar.xz
plus-be74509b31b26e714c6b380e17ed3935ec0b6cf0.zip
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.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/avatarlistbox.cpp1
-rw-r--r--src/gui/widgets/button.cpp1
-rw-r--r--src/gui/widgets/emotepage.cpp1
-rw-r--r--src/gui/widgets/popup.cpp3
-rw-r--r--src/gui/widgets/progressbar.cpp1
-rw-r--r--src/gui/widgets/scrollarea.cpp3
-rw-r--r--src/gui/widgets/shortcutcontainer.cpp1
-rw-r--r--src/gui/widgets/slider.cpp1
-rw-r--r--src/gui/widgets/tabs/tab.cpp1
-rw-r--r--src/gui/widgets/window.cpp1
-rw-r--r--src/gui/windows/equipmentwindow.cpp1
11 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 9a7ed36dc..07115640b 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -139,6 +139,7 @@ void AvatarListBox::draw(Graphics *graphics)
{
graphics->calcTileCollection(&vertexes, icon,
mImagePadding, y + mPadding);
+ graphics->finalize(&vertexes);
}
else
{
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 54d15391b..de2bd0c8b 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -586,6 +586,7 @@ void Button::draw(Graphics *graphics)
imageX, imageY);
}
}
+ graphics->finalize(mVertexes2);
}
graphics->drawTileCollection(mVertexes2);
}
diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp
index 68d508a5a..2c20cf438 100644
--- a/src/gui/widgets/emotepage.cpp
+++ b/src/gui/widgets/emotepage.cpp
@@ -92,6 +92,7 @@ void EmotePage::draw(Graphics *graphics)
}
}
}
+ graphics->finalize(mVertexes);
}
graphics->drawTileCollection(mVertexes);
}
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index ff6296d75..506b0f050 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -106,7 +106,8 @@ void Popup::draw(Graphics *graphics)
mDimension.width, mDimension.height,
mSkin->getBorder());
}
-
+ // need cache or remove calc call.
+ graphics->finalize(mVertexes);
graphics->drawTileCollection(mVertexes);
}
else
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index 9a10eedb7..8368ce71b 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -226,6 +226,7 @@ void ProgressBar::render(Graphics *graphics)
width, mDimension.height - pad, mFillRect);
}
}
+ graphics->finalize(mVertexes);
}
graphics->drawTileCollection(mVertexes);
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);
}
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index 313e37262..eeca4dacd 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -134,6 +134,7 @@ void ShortcutContainer::drawBackground(Graphics *g)
(i % mGridWidth) * mBoxWidth,
(i / mGridWidth) * mBoxHeight);
}
+ g->finalize(mVertexes);
}
g->drawTileCollection(mVertexes);
}
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index 6c2224150..e36c24b2c 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -282,6 +282,7 @@ void Slider::draw(Graphics *graphics)
(mDimension.height - img->getHeight()) / 2);
}
}
+ graphics->finalize(mVertexes);
}
graphics->drawTileCollection(mVertexes);
}
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index 16018e5c3..465a901c9 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -278,6 +278,7 @@ void Tab::draw(Graphics *graphics)
padding);
}
}
+ graphics->finalize(mVertexes);
}
graphics->drawTileCollection(mVertexes);
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 74c6d1cfc..caf7dae91 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -313,6 +313,7 @@ void Window::draw(Graphics *graphics)
mGripRect.x,
mGripRect.y);
}
+ graphics->finalize(mVertexes);
}
else
{
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 22d7a8567..7ec505160 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -196,6 +196,7 @@ void EquipmentWindow::draw(Graphics *graphics)
}
i ++;
}
+ graphics->finalize(mVertexes);
}
graphics->drawTileCollection(mVertexes);
}