docs: 修正 API 文档准确性 (第三轮检查)
修复问题: - containers: HashMap include 路径修复 - core: RefCounted 析构函数访问级别, Event::begin/end 返回值说明 - memory: LinearAllocator::GetMarker 返回偏移量非指针 - resources: LoadAsync 示例使用不存在的模板方法 - rhi: OpenGL 链接错误, ShaderType 枚举缺失8个类型, 链接修复 - threading: SpinLock STL 兼容方法说明, Mutex const 方法说明
This commit is contained in:
@@ -67,9 +67,12 @@ ResourceHandle<Mesh> mesh = ResourceManager::Get().Load<Mesh>("models/player.fbx
|
||||
ResourceHandle<Material> mat = ResourceManager::Get().Load<Material>("materials/player.mat");
|
||||
|
||||
// 异步加载
|
||||
ResourceManager::Get().LoadAsync<Texture>("textures/terrain.png",
|
||||
[](ResourceHandle<Texture> tex) {
|
||||
// 加载完成回调
|
||||
ResourceManager::Get().LoadAsync("textures/terrain.png", ResourceType::Texture,
|
||||
[](LoadResult result) {
|
||||
if (result.success) {
|
||||
ResourceHandle<Texture> tex(result.resource);
|
||||
// 加载完成回调
|
||||
}
|
||||
});
|
||||
|
||||
// 释放资源
|
||||
|
||||
Reference in New Issue
Block a user