17 #ifndef TERRAINMESHRENDERER_H
18 #define TERRAINMESHRENDERER_H
22 #include "TerrainMaterialDef.h"
23 #include "renderer/RenderNode.h"
29 typedef std::shared_ptr<TerrainShader> TerrainShaderPtr;
135 TerrainShaderPtr createShader(
bool hasEdge,
bool hasBevel,
140 bool mInvalidated =
true;
147 TerrainShaderPtr mBaseShader;
148 TerrainShaderPtr mEdgeShader;
149 TerrainShaderPtr mBevelShader;
154 float mRenderRotation = 0.0f;
158 #endif // TERRAINMESHRENDERER_H
void setBevelMesh(PolygonMesh *value)
Sets the value of bevelMesh.
Header declaring and including types common to renderer classes such as Vector2. Also includes GL hea...
PolygonMesh * getBevelMesh() const
Returns the value of bevelMesh.
Definition: TerrainMeshRenderer.h:103
void baseMeshChanged()
Emitted when baseMesh changes.
Base class for visual elements which are part of the game scene, and are rendered through Renderer...
Definition: Graphic.h:34
InstancedShader which does a multi-texture blend between up to three Textures, to render terrain mesh...
Definition: TerrainShader.h:93
void setMaterial(const QString &value)
Sets the value of material.
float Matrix4[16]
4x4 float matrix, whose layout is compatible with GL.
Definition: RendererCommon.h:46
void setBaseMesh(PolygonMesh *value)
Sets the value of baseMesh.
QString material
Name of the TerrainMaterialDef to apply to this terrain mesh.
Definition: TerrainMeshRenderer.h:52
void setEdgeMesh(PolygonMesh *value)
Sets the value of edgeMesh.
Graphic which performs rendering of a terrain mesh.
Definition: TerrainMeshRenderer.h:43
Class storing a renderable mesh, instantiable from QML.
Definition: PolygonMesh.h:34
void materialChanged()
Emitted when material changes.
PolygonMesh * getBaseMesh() const
Returns the value of baseMesh.
Definition: TerrainMeshRenderer.h:85
virtual void synchronizeForRendering(RenderList *renderList) override
Synchronize this Graphic for rendering, adding any RenderNodes to renderList, and buffering any data ...
PolygonMesh bevelMesh
PolygonMesh containing vertex data for the bevel mesh.
Definition: TerrainMeshRenderer.h:64
BlendMode
Blend modes used to mix the bevel texture with the base texture.
Definition: TerrainMaterialDef.h:47
Node which queues a callback (RenderableInterface) or MeshInstance for rendering. ...
Definition: RenderNode.h:33
void bevelMeshChanged()
Emitted when bevelMesh changes.
std::shared_ptr< MeshInstance > MeshInstancePtr
Shared pointer typedef for MeshInstance.
Definition: PointerDeclarations.h:113
PolygonMesh baseMesh
PolygonMesh containing vertex data for the base mesh.
Definition: TerrainMeshRenderer.h:56
List of RenderNodes, sorted by z-depth for rendering.
Definition: RenderList.h:36
PolygonMesh * getEdgeMesh() const
Returns the value of edgeMesh.
Definition: TerrainMeshRenderer.h:94
const QString & getMaterial() const
Returns material.
Definition: TerrainMeshRenderer.h:76
void edgeMeshChanged()
Emitted when edgeMesh changes.
PolygonMesh edgeMesh
PolygonMesh containing vertex data for the edge mesh.
Definition: TerrainMeshRenderer.h:60