コード例 #1
0
        public void RemoveVBO(Stack <VBOStorageInformation> vbos)
        {
            //only delete if its not the node farthes in the hierarchy
            if (leaf == null)
            {
                //if leaf not null remove the VBO that is at this level and delete it from GPU memory
                VBOStorageInformation thisLevelVBO = vbos.Pop();
                bool removed = serverBufferIds.Remove(thisLevelVBO);

                if (removed)
                {
                    VBOUtils.DeleteFromGPU(thisLevelVBO);
                }
            }

            if (ParentNodeID != null)
            {
                ParentNodeID.RemoveVBO(vbos);
            }
        }
コード例 #2
0
ファイル: QTreeLeaf.cs プロジェクト: polytronicgr/HydroLiDAR
        internal void SetInvisibleAndUnbuffered()
        {
            visible = false;

            if (ClearAllPoints())
            {
                numberOfLoadedPoints = 0;

                if (serverBufferId != null)
                {
                    VBOUtils.DeleteFromGPU(serverBufferId);
                    serverBufferId = null;

                    if (parentVBOs.Count > 0)
                    {
                        ParentNode.RemoveVBO(parentVBOs);
                    }
                }

                State = LoadedState.UNLOADED;
            }
        }