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

Function GetNumTextureHandles

engine/graphics/src/graphics.cpp:2016–2026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2014 return flags;
2015 }
2016 uint8_t GetNumTextureHandles(HContext context, HTexture texture)
2017 {
2018 GraphicsContext* gc = (GraphicsContext*)context;
2019 DM_MUTEX_OPTIONAL_SCOPED_LOCK(gc->m_AssetHandleContainerMutex);
2020 const Texture* t = GetAssetFromContainer<Texture>(gc->m_AssetHandleContainer, texture);
2021 if (!t)
2022 {
2023 return 0;
2024 }
2025 return (uint8_t)dmMath::Min<uint32_t>(255u, (uint32_t)t->m_NumTextureIds);
2026 }
2027 uint32_t GetTextureUsageHintFlags(HContext context, HTexture texture)
2028 {
2029 GraphicsContext* gc = (GraphicsContext*)context;

Callers 4

GetCanBindTextureFunction · 0.85
DispatchComputeFunction · 0.85
DrawFunction · 0.85
CheckTextureMethod · 0.85

Calls

no outgoing calls

Tested by 1

CheckTextureMethod · 0.68