diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-13 13:19:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-13 13:19:19 +0300 |
commit | d607fc8b853adb02827c10cef32d15f5f152a09d (patch) | |
tree | 7b565da0aa4c7a558a2abc14a78e07ffd9d00fa0 /src/test/testlauncher.cpp | |
parent | e66c54b5ba9469396ede6d9557688f4441c822a2 (diff) | |
download | mv-d607fc8b853adb02827c10cef32d15f5f152a09d.tar.gz mv-d607fc8b853adb02827c10cef32d15f5f152a09d.tar.bz2 mv-d607fc8b853adb02827c10cef32d15f5f152a09d.tar.xz mv-d607fc8b853adb02827c10cef32d15f5f152a09d.zip |
In modernopengl add support for draw cached tile vertexes.
Diffstat (limited to 'src/test/testlauncher.cpp')
-rw-r--r-- | src/test/testlauncher.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp index 86d2be370..d3bb5d571 100644 --- a/src/test/testlauncher.cpp +++ b/src/test/testlauncher.cpp @@ -370,10 +370,13 @@ int TestLauncher::testDye() int TestLauncher::testDraw() { - Image *img[2]; + Image *img[3]; img[0] = Theme::getImageFromTheme("graphics/sprites/arrow_left.png"); img[1] = Theme::getImageFromTheme("graphics/sprites/arrow_right.png"); + img[2] = Theme::getImageFromTheme("graphics/sprites/arrow_up.png"); ImageCollection *const col = new ImageCollection; + ImageVertexes *const vert = new ImageVertexes; + vert->image = img[2]; mainGraphics->pushClipArea(Rect(10, 20, 790, 580)); mainGraphics->setColor(Color(0xFFU, 0xFFU, 0x00U, 0xFFU)); @@ -384,6 +387,10 @@ int TestLauncher::testDraw() mainGraphics->drawImage(img[0], 190, 383); img[0]->setAlpha(1.0f); + mainGraphics->calcTileVertexes(vert, img[2], 10, 10); + mainGraphics->calcTileVertexes(vert, img[2], 40, 10); + mainGraphics->finalize(vert); + mainGraphics->setColor(Color(0x80U, 0x00U, 0xA0U, 0x90U)); mainGraphics->fillRectangle(Rect(200, 100, 300, 300)); mainGraphics->popClipArea(); @@ -398,6 +405,8 @@ int TestLauncher::testDraw() mainGraphics->calcPattern(col, img[1], 500, 400, 150, 100); mainGraphics->finalize(col); + mainGraphics->drawTileVertexes(vert); + mainGraphics->drawRescaledImage(img[0], 250, 350, 35, 90); mainGraphics->setColor(Color(0x00U, 0xFFU, 0x00U, 0x90U)); |