Table of Contents

Class MeshDataPoolManager

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

Holds a collection of pools, usually for 1 render pass

public class MeshDataPoolManager
Inheritance
MeshDataPoolManager
Inherited Members
Extension Methods

Constructors

MeshDataPoolManager(MeshDataPoolMasterManager, FrustumCulling, ICoreClientAPI, int, int, int, CustomMeshDataPartFloat, CustomMeshDataPartShort, CustomMeshDataPartByte, CustomMeshDataPartInt)

Creates a new Mesh Data Pool

public MeshDataPoolManager(MeshDataPoolMasterManager masterPool, FrustumCulling frustumCuller, ICoreClientAPI capi, int defaultVertexPoolSize, int defaultIndexPoolSize, int maxPartsPerPool, CustomMeshDataPartFloat customFloats = null, CustomMeshDataPartShort customShorts = null, CustomMeshDataPartByte customBytes = null, CustomMeshDataPartInt customInts = null)

Parameters

masterPool MeshDataPoolMasterManager

The master mesh data pool manager

frustumCuller FrustumCulling

the Frustum Culler for the Pool

capi ICoreClientAPI

The Client API

defaultVertexPoolSize int

Size allocated for the Vertices.

defaultIndexPoolSize int

Size allocated for the Indices

maxPartsPerPool int

The maximum number of parts for this pool.

customFloats CustomMeshDataPartFloat

Additional float data

customShorts CustomMeshDataPartShort
customBytes CustomMeshDataPartByte

Additional byte data

customInts CustomMeshDataPartInt

additional int data

Methods

AddModel(MeshData, Vec3i, int, Sphere)

Adds a model to the mesh pool.

public ModelDataPoolLocation AddModel(MeshData modeldata, Vec3i modelOrigin, int dimension, Sphere frustumCullSphere)

Parameters

modeldata MeshData

The model data

modelOrigin Vec3i

The origin point of the Model

dimension int
frustumCullSphere Sphere

The culling sphere.

Returns

ModelDataPoolLocation

The location identifier for the pooled model.

GetStats(ref long, ref long, ref long)

Gets the stats of the model.

public void GetStats(ref long usedVideoMemory, ref long renderedTris, ref long allocatedTris)

Parameters

usedVideoMemory long

The amount of memory used by this pool.

renderedTris long

The number of Tris rendered by this pool.

allocatedTris long

The number of tris allocated by this pool.

Render(Vec3d, string, EnumFrustumCullMode)

Renders the chunk models to the GPU. One of the most important methods in the entire game!

public void Render(Vec3d playerpos, string originUniformName, EnumFrustumCullMode frustumCullMode = EnumFrustumCullMode.CullNormal)

Parameters

playerpos Vec3d

The position of the Player

originUniformName string
frustumCullMode EnumFrustumCullMode

The culling mode. Default is CulHideDelay.