forked from organicmaps/organicmaps
changed background color to "sandy".
This commit is contained in:
parent
9372f56027
commit
7466718420
5 changed files with 28 additions and 11 deletions
|
@ -108,6 +108,8 @@ class FrameWork
|
|||
vector<pair<string, m2::RectD> > m_benchmarks;
|
||||
unsigned m_currentBenchmark;
|
||||
|
||||
yg::Color m_bgColor;
|
||||
|
||||
RenderQueue m_renderQueue;
|
||||
shared_ptr<yg::ResourceManager> m_resourceManager;
|
||||
InformationDisplay m_informationDisplay;
|
||||
|
@ -165,12 +167,18 @@ public:
|
|||
m_isBenchmarking(GetPlatform().IsBenchmarking()),
|
||||
m_isBenchmarkInitialized(false),
|
||||
m_currentBenchmark(0),
|
||||
m_bgColor(0xEE, 0xEE, 0xDD, 0xFF),
|
||||
// m_bgColor(0xF4 / 17 * 17, 0xFC / 17 * 17, 0xE8 / 17 * 17, 0xFF),
|
||||
// m_bgColor(0xF2 / 17 * 17, 0xF2 / 17 * 17, 0xEE / 17 * 17, 0xFF),
|
||||
// m_bgColor(0xF1 / 17 * 17, 0xF2 / 17 * 17, 0xEB / 17 * 17, 0xFF),
|
||||
// m_bgColor(187, 187, 187, 255),
|
||||
m_renderQueue(GetPlatform().SkinName(),
|
||||
GetPlatform().IsMultiSampled(),
|
||||
GetPlatform().DoPeriodicalUpdate(),
|
||||
GetPlatform().PeriodicalUpdateInterval(),
|
||||
GetPlatform().IsBenchmarking(),
|
||||
GetPlatform().ScaleEtalonSize()),
|
||||
GetPlatform().ScaleEtalonSize(),
|
||||
m_bgColor),
|
||||
m_isRedrawEnabled(true),
|
||||
m_metresMinWidth(20),
|
||||
m_minRulerWidth(97),
|
||||
|
@ -423,7 +431,7 @@ public:
|
|||
if (m_benchmarks.empty())
|
||||
{
|
||||
e->drawer()->screen()->beginFrame();
|
||||
e->drawer()->screen()->clear();
|
||||
e->drawer()->screen()->clear(m_bgColor);
|
||||
m_informationDisplay.setDisplayRect(m2::RectI(0, 0, 100, 100));
|
||||
m_informationDisplay.enableRuler(false);
|
||||
m_informationDisplay.doDraw(e->drawer().get());
|
||||
|
@ -441,7 +449,7 @@ public:
|
|||
m_currentBenchmark++;
|
||||
|
||||
e->drawer()->screen()->beginFrame();
|
||||
e->drawer()->screen()->clear();
|
||||
e->drawer()->screen()->clear(m_bgColor);
|
||||
|
||||
m2::PointD ptShift = m_renderQueue.renderState().coordSystemShift(false);
|
||||
|
||||
|
|
|
@ -11,7 +11,9 @@ RenderQueue::RenderQueue(
|
|||
bool doPeriodicalUpdate,
|
||||
double updateInterval,
|
||||
bool isBenchmarking,
|
||||
unsigned scaleEtalonSize)
|
||||
unsigned scaleEtalonSize,
|
||||
yg::Color const & bgColor
|
||||
)
|
||||
: m_renderState(new yg::gl::RenderState())
|
||||
{
|
||||
m_renderState->m_surfaceWidth = 100;
|
||||
|
@ -27,7 +29,8 @@ RenderQueue::RenderQueue(
|
|||
doPeriodicalUpdate,
|
||||
updateInterval,
|
||||
isBenchmarking,
|
||||
scaleEtalonSize);
|
||||
scaleEtalonSize,
|
||||
bgColor);
|
||||
}
|
||||
|
||||
void RenderQueue::initializeGL(shared_ptr<yg::gl::RenderContext> const & primaryContext,
|
||||
|
|
|
@ -36,7 +36,8 @@ public:
|
|||
bool doPeriodicalUpdate,
|
||||
double updateInterval,
|
||||
bool isBenchmarking,
|
||||
unsigned scaleEtalonSize);
|
||||
unsigned scaleEtalonSize,
|
||||
yg::Color const & bgColor);
|
||||
/// destructor.
|
||||
~RenderQueue();
|
||||
/// set the primary context. it starts the rendering thread.
|
||||
|
|
|
@ -34,7 +34,8 @@ RenderQueueRoutine::RenderQueueRoutine(shared_ptr<yg::gl::RenderState> const & r
|
|||
bool doPeriodicalUpdate,
|
||||
double updateInterval,
|
||||
bool isBenchmarking,
|
||||
unsigned scaleEtalonSize)
|
||||
unsigned scaleEtalonSize,
|
||||
yg::Color const & bgColor)
|
||||
{
|
||||
m_skinName = skinName;
|
||||
m_visualScale = 0;
|
||||
|
@ -45,6 +46,7 @@ RenderQueueRoutine::RenderQueueRoutine(shared_ptr<yg::gl::RenderState> const & r
|
|||
m_updateInterval = updateInterval;
|
||||
m_isBenchmarking = isBenchmarking;
|
||||
m_scaleEtalonSize = scaleEtalonSize;
|
||||
m_bgColor = bgColor;
|
||||
}
|
||||
|
||||
void RenderQueueRoutine::Cancel()
|
||||
|
@ -83,7 +85,7 @@ void RenderQueueRoutine::processResize(ScreenBase const & frameScreen)
|
|||
m_auxScreen->onSize(texW, texH);
|
||||
m_auxScreen->setRenderTarget(m_renderState->m_actualTarget);
|
||||
m_auxScreen->beginFrame();
|
||||
m_auxScreen->clear();
|
||||
m_auxScreen->clear(m_bgColor);
|
||||
|
||||
if (oldActualTarget != 0)
|
||||
{
|
||||
|
@ -101,7 +103,7 @@ void RenderQueueRoutine::processResize(ScreenBase const & frameScreen)
|
|||
m_renderState->m_backBufferLayers[i] = m_resourceManager->createRenderTarget(texW, texH);
|
||||
m_auxScreen->setRenderTarget(m_renderState->m_backBufferLayers[i]);
|
||||
m_auxScreen->beginFrame();
|
||||
m_auxScreen->clear();
|
||||
m_auxScreen->clear(m_bgColor);
|
||||
|
||||
if (oldBackBuffer != 0)
|
||||
{
|
||||
|
@ -372,7 +374,7 @@ void RenderQueueRoutine::Do()
|
|||
|
||||
m_threadDrawer->screen()->enableClipRect(true);
|
||||
m_threadDrawer->screen()->setClipRect(textureRect);
|
||||
m_threadDrawer->clear();
|
||||
m_threadDrawer->clear(m_bgColor);
|
||||
|
||||
if ((isPanning) && (!doRedrawAll))
|
||||
{
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "../std/list.hpp"
|
||||
#include "../std/function.hpp"
|
||||
#include "../yg/thread_renderer.hpp"
|
||||
#include "../yg/color.hpp"
|
||||
|
||||
class DrawerYG;
|
||||
|
||||
|
@ -79,6 +80,7 @@ private:
|
|||
string m_skinName;
|
||||
bool m_isBenchmarking;
|
||||
unsigned m_scaleEtalonSize;
|
||||
yg::Color m_bgColor;
|
||||
|
||||
void waitForRenderCommand(list<shared_ptr<RenderModelCommand> > & cmdList,
|
||||
threads::ConditionGuard & guard);
|
||||
|
@ -90,7 +92,8 @@ public:
|
|||
bool doPeriodicalUpdate,
|
||||
double updateInterval,
|
||||
bool isBenchmarking,
|
||||
unsigned scaleEtalonSize);
|
||||
unsigned scaleEtalonSize,
|
||||
yg::Color const & bgColor);
|
||||
/// initialize GL rendering
|
||||
/// this function is called just before the thread starts.
|
||||
void initializeGL(shared_ptr<yg::gl::RenderContext> const & renderContext,
|
||||
|
|
Loading…
Add table
Reference in a new issue