Mercator
|
Data store for terrain surface data. More...
#include <Surface.h>
Public Member Functions | |
Surface (const Segment &segment, const Shader &shader, bool colors=true, bool alpha=true) | |
Constructor. | |
void | populate () |
Populate the data buffer using the correct shader. | |
Public Attributes | |
const Shader & | m_shader |
The shader that populates this surface. |
Data store for terrain surface data.
Mercator::Surface::Surface | ( | const Segment & | seg, |
const Shader & | sh, | ||
bool | color = true , |
||
bool | alpha = true |
||
) | [explicit] |
Constructor.
seg | the terrain height segment this surface maps on to. |
sh | the shader used to generate the surface data. |
color | true if this shader contains color data. |
alpha | true if this shader contains alpha data. |
void Mercator::Surface::populate | ( | ) |
Populate the data buffer using the correct shader.
Call the shader to full this surface buffer with surface data.
References Mercator::Buffer< ColorT >::allocate(), Mercator::Buffer< ColorT >::isValid(), m_shader, and Mercator::Shader::shade().
Referenced by Mercator::TileShader::shade().