5 #ifndef MERCATOR_SURFACE_H
6 #define MERCATOR_SURFACE_H
8 #include <Mercator/Buffer.h>
16 typedef unsigned char ColorT;
18 static const ColorT colorMax = UCHAR_MAX;
19 static const ColorT colorMin = 0;
28 bool colors =
true,
bool alpha =
true);
37 #endif // MERCATOR_SURFACE_H
Surface(const Segment &segment, const Shader &shader, bool colors=true, bool alpha=true)
Constructor.
Definition: Surface.cpp:18
void populate()
Populate the data buffer using the correct shader.
Definition: Surface.cpp:30
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
Definition: Segment.h:36
Data store for terrain surface data.
Definition: Surface.h:22
void allocate()
Allocate the storage required by the buffer.
Definition: Buffer.h:78
const Shader & m_shader
The shader that populates this surface.
Definition: Surface.h:25
virtual void shade(Surface &) const =0
Populate a Surface with data.
bool isValid() const
Determine if this buffer has valid allocated storage.
Definition: Buffer.h:85
Template for managing buffers of data for a segment.
Definition: Buffer.h:14
Base class for Shader objects which create surface data for use when rendering terrain.
Definition: Shader.h:29