| 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 | { |
no test coverage detected