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

Function PushSetTextureAsyncState

engine/graphics/src/graphics.cpp:1713–1729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1711 }
1712
1713 uint16_t PushSetTextureAsyncState(SetTextureAsyncState& state, HTexture texture, TextureParams params, SetTextureAsyncCallback callback, void* user_data)
1714 {
1715 DM_MUTEX_SCOPED_LOCK(state.m_Mutex);
1716 if (state.m_Indices.Remaining() == 0)
1717 {
1718 state.m_Indices.SetCapacity(state.m_Indices.Capacity()+64);
1719 state.m_Params.SetCapacity(state.m_Indices.Capacity());
1720 state.m_Params.SetSize(state.m_Params.Capacity());
1721 }
1722 uint16_t param_array_index = state.m_Indices.Pop();
1723 SetTextureAsyncParams& ap = state.m_Params[param_array_index];
1724 ap.m_Texture = texture;
1725 ap.m_Params = params;
1726 ap.m_Callback = callback;
1727 ap.m_UserData = user_data;
1728 return param_array_index;
1729 }
1730
1731 void PushSetTextureAsyncDeleteTexture(SetTextureAsyncState& state, HTexture texture)
1732 {

Callers 3

NullSetTextureAsyncFunction · 0.85
OpenGLSetTextureAsyncFunction · 0.85
VulkanSetTextureAsyncFunction · 0.85

Calls 5

RemainingMethod · 0.45
SetCapacityMethod · 0.45
CapacityMethod · 0.45
SetSizeMethod · 0.45
PopMethod · 0.45

Tested by

no test coverage detected