| 2131 | } |
| 2132 | |
| 2133 | void CGraphics_Threaded::DeleteBufferContainer(int &ContainerIndex, bool DestroyAllBO) |
| 2134 | { |
| 2135 | if(ContainerIndex == -1) |
| 2136 | return; |
| 2137 | |
| 2138 | CCommandBuffer::SCommand_DeleteBufferContainer Cmd; |
| 2139 | Cmd.m_BufferContainerIndex = ContainerIndex; |
| 2140 | Cmd.m_DestroyAllBO = DestroyAllBO; |
| 2141 | AddCmd(Cmd); |
| 2142 | |
| 2143 | if(DestroyAllBO) |
| 2144 | { |
| 2145 | // delete all associated references |
| 2146 | int BufferObjectIndex = m_vVertexArrayInfo[ContainerIndex].m_AssociatedBufferObjectIndex; |
| 2147 | if(BufferObjectIndex != -1) |
| 2148 | { |
| 2149 | // clear the buffer object index |
| 2150 | m_vBufferObjectIndices[BufferObjectIndex] = m_FirstFreeBufferObjectIndex; |
| 2151 | m_FirstFreeBufferObjectIndex = BufferObjectIndex; |
| 2152 | } |
| 2153 | } |
| 2154 | m_vVertexArrayInfo[ContainerIndex].m_AssociatedBufferObjectIndex = -1; |
| 2155 | |
| 2156 | // also clear the buffer object index |
| 2157 | m_vVertexArrayInfo[ContainerIndex].m_FreeIndex = m_FirstFreeVertexArrayInfo; |
| 2158 | m_FirstFreeVertexArrayInfo = ContainerIndex; |
| 2159 | ContainerIndex = -1; |
| 2160 | } |
| 2161 | |
| 2162 | void CGraphics_Threaded::UpdateBufferContainerInternal(int ContainerIndex, SBufferContainerInfo *pContainerInfo) |
| 2163 | { |
no outgoing calls
no test coverage detected