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
MeshDataPoolMasterManagerThe master mesh data pool manager
frustumCuller
FrustumCullingthe Frustum Culler for the Pool
capi
ICoreClientAPIThe Client API
defaultVertexPoolSize
intSize allocated for the Vertices.
defaultIndexPoolSize
intSize allocated for the Indices
maxPartsPerPool
intThe maximum number of parts for this pool.
customFloats
CustomMeshDataPartFloatAdditional float data
customShorts
CustomMeshDataPartShortcustomBytes
CustomMeshDataPartByteAdditional byte data
customInts
CustomMeshDataPartIntadditional 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
MeshDataThe model data
modelOrigin
Vec3iThe origin point of the Model
dimension
intfrustumCullSphere
SphereThe 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
longThe amount of memory used by this pool.
renderedTris
longThe number of Tris rendered by this pool.
allocatedTris
longThe 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
Vec3dThe position of the Player
originUniformName
stringfrustumCullMode
EnumFrustumCullModeThe culling mode. Default is CulHideDelay.