void MapRenderer_DeleteChunk(struct ChunkInfo* info) { struct ChunkPartInfo* ptr; int i; info->Empty = false; info->AllAir = false; #ifdef OCCLUSION info.OcclusionFlags = 0; info.OccludedFlags = 0; #endif #ifndef CC_BUILD_GL11 Gfx_DeleteVb(&info->Vb); #endif if (info->NormalParts) { ptr = info->NormalParts; for (i = 0; i < MapRenderer_1DUsedCount; i++, ptr += MapRenderer_ChunksCount) { if (ptr->Offset < 0) continue; normPartsCount[i]--; #ifdef CC_BUILD_GL11 Gfx_DeleteVb(&ptr->Vb); #endif } info->NormalParts = NULL; } if (info->TranslucentParts) { ptr = info->TranslucentParts; for (i = 0; i < MapRenderer_1DUsedCount; i++, ptr += MapRenderer_ChunksCount) { if (ptr->Offset < 0) continue; tranPartsCount[i]--; #ifdef CC_BUILD_GL11 Gfx_DeleteVb(&ptr->Vb); #endif } info->TranslucentParts = NULL; } }
static void PickedPosRenderer_ContextLost(void* obj) { Gfx_DeleteVb(&pickedPos_vb); }
static void AxisLinesRenderer_ContextLost(void* obj) { Gfx_DeleteVb(&axisLines_vb); }
static void Particles_ContextLost(void* obj) { Gfx_DeleteVb(&Particles_VB); }