Cogs.Core
TerrainComponent.cpp
1#include "TerrainComponent.h"
2
3#include "Types.h"
4
5using namespace Cogs::Reflection;
6
7void Cogs::Core::TerrainComponent::registerType()
8{
9 Field fields[] = {
10 Field(Name("customTexture"), &TerrainComponent::customTexture),
13 Field(Name("depthMaterial"), &TerrainComponent::depthMaterial),
14 };
15
16 TypeDatabase::createType<TerrainComponent>().setBase<Component>().setFields(fields);
17}
Field definition describing a single data member of a data structure.
Definition: Field.h:68
Contains reflection support.
Definition: Component.h:11
TextureHandle customTexture
Handle to custom texture, made available in custom shaders as "customTexture".
MaterialInstanceHandle depthMaterial
The terrain material instance used for the depth buffer.
SamplerState::AddressMode addressMode
Address mode for custom texture.
MaterialInstanceHandle material
The terrain material instance.
Represents an unique name.
Definition: Name.h:70