MCPcopy Create free account
hub / github.com/defold/defold / NullDeleteTexture

Function NullDeleteTexture

engine/graphics/src/null/graphics_null.cpp:1587–1608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1585 }
1586
1587 static void NullDeleteTexture(HContext _context, HTexture texture)
1588 {
1589 NullContext* context = (NullContext*)_context;
1590 if (g_NullContext->m_AsyncProcessingSupport && g_NullContext->m_UseAsyncTextureLoad)
1591 {
1592 // If they're not uploaded yet, we cannot delete them
1593 if(dmGraphics::GetTextureStatusFlags(_context, texture) & dmGraphics::TEXTURE_STATUS_DATA_PENDING)
1594 {
1595 PushSetTextureAsyncDeleteTexture(g_NullContext->m_SetTextureAsyncState, texture);
1596 }
1597 else
1598 {
1599 NullDeleteTextureAsync(g_NullContext, texture);
1600 }
1601 }
1602 else
1603 {
1604 void* htexture = (void*) texture;
1605 DoDeleteTexture(context->m_JobContext, 0, g_NullContext, htexture);
1606 DoDeleteTextureComplete(context->m_JobContext, 0, JOBSYSTEM_STATUS_FINISHED, g_NullContext, htexture, 0);
1607 }
1608 }
1609
1610 static HandleResult NullGetTextureHandle(HTexture texture, void** out_handle)
1611 {

Callers

nothing calls this directly

Calls 5

GetTextureStatusFlagsFunction · 0.85
NullDeleteTextureAsyncFunction · 0.85
DoDeleteTextureCompleteFunction · 0.85
DoDeleteTextureFunction · 0.70

Tested by

no test coverage detected