#pragma once #include "CommonHeader.h" #include "..\Platform\Window.h" namespace XEngine::graphics { /** * @brief 表面类 * @details 定义了渲染表面的属性与操作 */ class surface { }; /** * @brief 渲染表面结构体 * @details 定义了渲染表面的窗口与表面对象 */ struct render_surface { platform::window window{}; surface surface{}; }; /** * @brief 图形渲染平台枚举 * @details 定义了支持的图形渲染平台类型 */ enum class graphics_platform : u32 { direct3d12 = 0, vulkan = 1, opengl = 2, }; /** * @brief 初始化图形渲染平台 * @details 调用设置平台接口函数,初始化指定的图形渲染平台 * @param platform 图形渲染平台类型 * @return true 如果初始化成功,否则返回 false */ bool initialize(graphics_platform platform); /** * @brief 关闭图形渲染平台 * @details 调用关闭函数指针,关闭指定的图形渲染平台 */ void shutdown(); /** * @brief 渲染调用接口 * @details 调用渲染函数指针,渲染当前渲染表面 */ void render(); }