19 :
Buffer<ColorT>(seg.getSize(), (color ? 3 : 0) + (alpha ? 1 : 0)), m_shader(sh), m_segment(seg)
Template for managing buffers of data for a segment.
void populate()
Populate the data buffer using the correct shader.
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
virtual void shade(Surface &) const =0
Populate a Surface with data.
Base class for Shader objects which create surface data for use when rendering terrain.
void allocate()
Allocate the storage required by the buffer.
bool isValid() const
Determine if this buffer has valid allocated storage.
const Shader & m_shader
The shader that populates this surface.
Surface(const Segment &segment, const Shader &shader, bool colors=true, bool alpha=true)
Constructor.