mercator
0.4.0
A terrain generation library for the Worldforge system.
Shader.cpp
1
// This file may be redistributed and modified only under the terms of
2
// the GNU General Public License (See COPYING for details).
3
// Copyright (C) 2003 Alistair Riddoch
4
5
#include "Shader.h"
6
7
#include "Segment.h"
8
#include "Surface.h"
9
10
namespace
Mercator {
11
16
Shader::Shader
(
bool
color,
bool
alpha) : m_color(color), m_alpha(alpha)
17
{
18
}
19
21
Shader::~Shader
() =
default
;
22
27
std::unique_ptr<Surface>
Shader::newSurface
(
const
Segment
& segment)
const
28
{
29
return
std::make_unique<Surface>(segment, *
this
, m_color, m_alpha);
30
}
31
32
}
// namespace Mercator
Mercator::Shader::newSurface
std::unique_ptr< Surface > newSurface(const Segment &) const
Create a new Surface which matches the requirements of this shader.
Definition:
Shader.cpp:27
Mercator::Segment
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
Definition:
Segment.h:37
Mercator::Shader::~Shader
virtual ~Shader()
Destructor does nothing interesting.
Mercator::Shader::Shader
Shader(bool color=false, bool alpha=true)
Protected constructor for classes which inherit from this one.
Definition:
Shader.cpp:16
src
Mercator
Shader.cpp
Generated by
1.8.18