Files
XCSDD/docs/api/main.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
2026-03-19 12:44:08 +08:00

2.2 KiB

XCEngine API 文档总索引

描述: XCEngine 图形引擎的完整 API 文档索引。


模块导航

模块 文档目录 描述
RHI rhi/ 渲染硬件接口抽象层
D3D12 rhi/d3d12/ DirectX 12 后端实现
OpenGL rhi/opengl/ OpenGL 后端实现
Containers containers/ 容器数据结构
Memory memory/ 内存管理
Threading threading/ 多线程和任务系统
Core core/ 核心基础类型
Debug debug/ 调试和日志
Math math/ 数学库
Resources resources/ 资源管理系统

快速开始

创建渲染设备

#include <XCEngine/RHI/RHIFactory.h>
#include <XCEngine/RHI/RHIDevice.h>

// 创建 D3D12 设备
RHI::RHIDevice* device = RHI::RHIFactory::CreateRHIDevice(RHI::RHIType::D3D12);

// 初始化
RHI::RHIDeviceDesc desc;
desc.windowHandle = hwnd;
device->Initialize(desc);

使用资源管理器

#include <XCEngine/Resources/ResourceManager.h>

// 加载纹理
auto texture = Resources::ResourceManager::Get().Load<Resources::Texture>("textures/player.png");

// 加载网格
auto mesh = Resources::ResourceManager::Get().Load<Resources::Mesh>("models/player.fbx");

日志记录

#include <XCEngine/Debug/Logger.h>

// 记录日志
XE_LOG(Debug::LogCategory::Rendering, Debug::LogLevel::Info, "Render started");

数学运算

#include <XCEngine/Math/Matrix4.h>

// 创建变换矩阵
Math::Matrix4 transform = Math::Matrix4::TRS(position, rotation, scale);

文档统计

模块 文档数量
RHI 抽象层 17
D3D12 后端 24
OpenGL 后端 14
Math 17
Resources 17
Threading 10
Memory 6
Debug 9
Core 6
Containers 4
总计 124

相关文档