File: TileShadertest.cpp

package info (click to toggle)
mercator 0.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,008 kB
  • sloc: sh: 10,433; cpp: 4,482; makefile: 115
file content (26 lines) | stat: -rw-r--r-- 968 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// This file may be redistributed and modified only under the terms of
// the GNU General Public License (See COPYING for details).
// Copyright (C) 2003 Alistair Riddoch

#include <Mercator/Segment.h>
#include <Mercator/Surface.h>
#include <Mercator/FillShader.h>
#include <Mercator/ThresholdShader.h>
#include <Mercator/DepthShader.h>
#include <Mercator/GrassShader.h>
#include <Mercator/TileShader.h>

int main()
{
    Mercator::Segment segment(0,0,Mercator::defaultResolution);
    segment.populate();

    Mercator::TileShader tileShader;
    tileShader.addShader(new Mercator::FillShader(), 0);
    tileShader.addShader(new Mercator::BandShader(-2.f, 1.5f), 1);
    tileShader.addShader(new Mercator::GrassShader(1.f, 80.f, .5f, 1.f), 2);
    tileShader.addShader(new Mercator::DepthShader(0.f, -10.f), 3);
    tileShader.addShader(new Mercator::HighShader(110.f), 4);
    Mercator::Surface * surface = tileShader.newSurface(segment);
    surface->populate();
}