MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / Unbind

Method Unbind

GTE/Graphics/GraphicsEngine.cpp:287–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287bool GraphicsEngine::Unbind(GraphicsObject const* object)
288{
289 mGOMapMutex.lock();
290 bool success = false;
291 auto iter = mGOMap.find(object);
292 if (iter != mGOMap.end())
293 {
294 uint32_t type = object->GetType();
295 if (type == GT_VERTEX_BUFFER)
296 {
297 mILMap->Unbind(static_cast<VertexBuffer const*>(object));
298 }
299 else if (type == GT_VERTEX_SHADER)
300 {
301 mILMap->Unbind(static_cast<Shader const*>(object));
302 }
303
304 mGOMap.erase(iter);
305 success = true;
306 }
307 mGOMapMutex.unlock();
308 return success;
309}
310
311bool GraphicsEngine::Unbind(DrawTarget const* target)
312{

Callers 1

OnDestroyMethod · 0.45

Calls 2

endMethod · 0.80
GetTypeMethod · 0.45

Tested by

no test coverage detected