Files
DX12/Engine/Content/ContentLoader.h
2026-03-19 18:27:49 +08:00

36 lines
1.0 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* @file ContentLoader.h
* @brief 编辑器/测试构建下的关卡内容加载入口声明。
* @details
* 本文件定义内容系统对外暴露的高层加载接口,负责:
* - 从磁盘加载测试关卡与实体描述;
* - 卸载已创建的实体与运行时资源;
* - 读取并返回引擎着色器二进制数据供渲染模块初始化。
*/
#pragma once
#include "CommonHeader.h"
#if !defined(SHIPPING)
namespace XEngine::content {
/**
* @brief 加载测试游戏内容并创建对应运行时对象。
* @return 加载成功返回 true否则返回 false。
*/
bool load_games();
/**
* @brief 卸载由 load_games 创建的内容与对象。
*/
void unload_game();
/**
* @brief 从内容目录读取引擎着色器二进制文件。
* @param shader 输出的字节缓冲区。
* @param size 输出的缓冲区大小(字节)。
* @return 读取成功返回 true否则返回 false。
*/
bool load_engine_shaders(std::unique_ptr<u8[]>&shader, u64 size);
}
#endif //!defined(SHIPPING)