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.
bool isValid() const
Determine if this buffer has valid allocated storage.
void allocate()
Allocate the storage required by the buffer.
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
Base class for Shader objects which create surface data for use when rendering terrain.
virtual void shade(Surface &) const =0
Populate a Surface with data.
Surface(const Segment &segment, const Shader &shader, bool colors=true, bool alpha=true)
Constructor.
void populate()
Populate the data buffer using the correct shader.
const Shader & m_shader
The shader that populates this surface.