Commit Graph

52 Commits

Author SHA1 Message Date
63d0271a5b Fix broken links in Math API docs
Fix 30+ broken cross-references in docs/api/math/:
- viewport: viewport-getaspectratio/getrect -> getaspectratio/getrect
- matrix4: ../color/operator-mul -> operator_mul, operator-index -> operator_index
- matrix4/get-*: gettranslation/getscale/getrotation -> get-translation/-scale/-rotation
- vector3 operator links: operator_*_assign -> operator-*-assign
- vector3 operator links: operator_sub/add -> operator-sub/add
- vector3 operator-eq/neq: swap mutual references to use hyphen naming
- vector4: ../plane/constructor-default -> constructor_default
- Linter fixes: aabb and rectint relative paths corrected
2026-03-26 01:43:14 +08:00
d34d040563 Fix broken links in Threading API docs
Fix 14 broken cross-references in docs/api/threading/:
- lambda-task path: lambdatask -> lambda-task (5 occurrences)
- task-system-config path: tasksystemconfig -> task-system-config (6 occurrences)
- read-write-lock self-ref: readwritelock -> read-write-lock (6 occurrences)
- task-system cross-method: createtaskgroup/destroytaskgroup -> create-task-group/destroy-task-group
- thread cross-method: getcurrentid/getid -> get-current-id/get-id

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 01:30:37 +08:00
1cf744b755 refactor(docs): RHI模块文档重构 - 修复18处链接错误并新增RHIFramebuffer/RHIRenderPass文档
- 修复opengl/下13个文件对overview.md的错误引用,改为opengl.md
- 修复opengl/shader/下2处get-native-handle.md的错误路径引用
- 修复rhi.md中rhifactory路径错误
- 修复opengl.md中对d3d12.md的错误引用
- 修复opengl/README.md中的overview.md引用
- 新增RHIFramebuffer完整文档(7个文件)
- 新增RHIRenderPass完整文档(7个文件)
- 更新rhi.md总览页,添加RHIFramebuffer和RHIRenderPass分类
2026-03-26 01:29:00 +08:00
f427699ac6 refactor: improve test infrastructure and fix OpenGL GLAD initialization
- Rename D3D12Enum.h to D3D12Enums.h for naming consistency
- Fix OpenGL unit test GLAD initialization by using gladLoadGL()
  instead of gladLoadGLLoader(wglGetProcAddress) for fallback support
- Migrate remaining tests to use gtest_discover_tests for granular
  test discovery (math, core, containers, memory, threading, debug,
  components, scene, resources, input, opengl)
- Remove obsolete TEST_RESOURCES_DIR and copy_directory commands
  from OpenGL unit test CMakeLists (minimal/Res doesn't exist)
- Update TEST_SPEC.md with performance metrics and per-module
  build/test commands for faster development workflow
- Update CMake path references to use lowercase paths
2026-03-23 00:43:02 +08:00
0f0ab8922a docs: fix naming conventions across threading, math, memory, core, and debug modules
threading/:
- Rename 19 camelCase method files to hyphenated names
- task-system: createtaskgroup→create-task-group, etc.
- tasksystemconfig: enabletaskprofiling→enable-task-profiling, etc.
- thread: getcurrentid→get-current-id, etc.
- task: addref→add-ref, getid→get-id, etc.

math/:
- Rename underscore operator files to hyphenated
- vector3: operator_add→operator-add, etc.
- matrix4: gettranslation→get-translation, etc.
- vector4: tovector3→to-vector3, constructor_vector3→constructor-vector3
- sphere: sphere_constructor→sphere-constructor, etc.

memory/:
- Remove duplicate memorymanager/ folder (kept manager/ which was correct)

core/:
- filewriter: Consolidate ctor-default.md and ctor-file.md into constructor.md
- Rename dtor.md→destructor.md

debug/:
- filelogsink: Rename construct.md→constructor.md, ~filelogsink.md→destructor.md

All overview pages updated with new file references.
2026-03-22 23:09:29 +08:00
6af872e9eb docs: fix Resources module API docs naming conventions and broken links
- Rename constructor/destructor files to follow template spec:
  - ctor.md → constructor.md, dtor.md → destructor.md (audioclip)
  - texture_constructor.md → constructor.md, texture_destructor.md → destructor.md (texture)
  - material-loader-constructor.md → constructor.md, material-loader-destructor.md → destructor.md

- Create missing constructor/destructor docs:
  - audio-loader: constructor.md, destructor.md
  - texture-loader: constructor.md, destructor.md

- Fix broken links to ResourceManager:
  - shader-loader/index.md
  - material-loader/index.md

- Remove duplicate folders (keep hyphenated versions):
  - Delete shaderloader/ (keep shader-loader/)
  - Delete resourcepackage/ (keep resource-package/)
  - Merge textureimportsettings/ into texture-import-settings/

- Rename audio-loader method files:
  - canload.md → can-load.md
  - getdefaultsettings.md → get-default-settings.md
  - getsupportedextensions.md → get-supported-extensions.md

- Update overview pages with proper method links and constructor/destructor entries
2026-03-22 14:42:27 +08:00
1797e7fe17 fix: encapsulate OpenGL types in VertexAttribute to eliminate raw GL API usage in tests
- Add VertexAttributeType and VertexAttributeNormalized enums in OpenGLVertexArray.h
- Add ToGLAttributeType() converter in OpenGLVertexArray.cpp
- Remove glActiveTexture() call from quad test (already handled by texture.Bind())
- Remove #include <glad/glad.h> from triangle test
- Update unit tests to use encapsulated enums

All three OpenGL integration tests (minimal, triangle, quad) pass with 0% pixel difference.
2026-03-22 14:33:57 +08:00
1f129ed20f docs: fix README.md project structure to match actual codebase
Engine modules:
- Audio: remove AudioSource/Listener components (they belong in Components/), add IAudioEffect.h
- Components: add AudioSourceComponent.h and AudioListenerComponent.h
- Math: remove non-existent OBB.h
- Resources: fix DependencyGraph.h -> ResourceDependencyGraph.h
- Threading: add TaskSystemConfig.h
- RHI: remove incorrect RHIDescriptor.h (already covered by RHIDescriptorPool.h)

Backend fixes:
- OpenGL: add OpenGLScreenshot.h
- D3D12: fix file order (D3D12Enum.h before D3D12Types.h)
2026-03-22 14:18:48 +08:00
7028027adc Fix Equalizer::ComputeCoefficients pointer arithmetic bug
The band index was incorrectly calculated using pointer arithmetic on a
local parameter address, which is meaningless. Now uses the band index
passed as a parameter instead.
2026-03-22 13:36:10 +08:00
750ac95951 docs: update README.md and fix components module docs
- Update README.md project structure docs/api section
  - Add missing audio/, components/, scene/ directories
  - Reorder alphabetically
- Update Components test count from 2+ to 3
- Expand documentation section with module listings
- Remove incomplete audio-source and audio-listener component docs
  from components.md (referenced 30+ and 16+ non-existent method docs)
2026-03-22 13:28:14 +08:00
a9d5a68dd6 docs: Add Component, GameObject, TransformComponent and Scene API documentation
- Add Component class documentation with lifecycle methods
- Add GameObject class documentation with component system
- Add TransformComponent documentation with transform methods
- Add Scene class documentation with GameObject management
- Add SceneManager singleton documentation with scene loading
- Update components.md overview with all component classes
- Update main.md navigation with Scene module
2026-03-22 03:33:55 +08:00
d83ed56177 fix(rhi): Fix RHI abstraction layer API docs per api-skill.md template
- Rename texture/dtor.md to destructor.md per template spec
- Remove duplicate non-hyphenated fence docs (getnativehandle.md, issignaled.md, getcompletedvalue.md)
- Fix template field issues:
  - swap-chain, command-queue: 类型 now uses 'class (abstract)'
  - sampler: 头文件 now uses full path 'XCEngine/RHI/RHISampler.h'
  - types: 类型 fixed from 'structs' to 'struct'
  - enums: 类型 fixed from 'enums' to 'enum class'
- Fix include paths in command-queue and pipeline-layout code examples
- Create missing constructor/destructor docs for 11 classes:
  buffer, texture, shader, device, command-list, command-queue,
  fence, sampler, swap-chain, pipeline-state, pipeline-layout
- Update class overview pages to include constructor/destructor entries
2026-03-22 03:07:41 +08:00
1358bb0a5a docs: 修复 D3D12 后端 API 文档问题
- 修复 texture/dtor.md 和 enums/enums.md 的错误链接
- 重命名 texture/ctor.md → constructor.md, texture/dtor.md → destructor.md
- 创建 command-list, fence, device, query-heap, sampler 的 constructor/destructor 文档
- 创建 D3D12Texture 缺失的 16 个方法文档
- 创建 D3D12CommandList 缺失的 12 个 internal 方法文档
- 补充 shader-resource-view 缺少的头文件和类型字段
2026-03-22 02:08:51 +08:00
161a0896d5 docs: 添加 Audio 模块和 Components 模块 API 文档
- 新增 Audio 模块文档 (54 个文件)
  - AudioSystem 单例类及 20 个方法页
  - AudioMixer 混音器类及 11 个方法页
  - IAudioBackend、IAudioEffect 接口
  - FFTFilter、Reverbation、Equalizer、HRTF 效果类
  - WASAPIBackend Windows 后端
  - AudioConfig、Audio3DParams 等结构体
  - 9 个枚举类型文档
- 新增 Components 模块文档 (3 个文件)
  - AudioSourceComponent 音频源组件
  - AudioListenerComponent 音频监听器组件
- 更新 docs/api/main.md 添加模块导航
2026-03-22 01:56:16 +08:00
629455df07 Update API documentation and remove obsolete plan files 2026-03-21 15:55:04 +08:00
5201638bb1 Docs: Add D3D12 swap chain and texture API docs 2026-03-20 19:43:46 +08:00
60d11f3109 Docs: Add D3D12 API documentation 2026-03-20 19:43:28 +08:00
26fe3cd835 D3D12: Add bounds check to GetBackBuffer and update unit tests
- Add assert() bounds check to GetBackBuffer() to catch invalid indices
- Include <cassert> in D3D12SwapChain.cpp
- Update test_swap_chain.cpp to use reference return type
- Mark InvalidIndex test as DISABLED (assert aborts on invalid index)
- Update get-back-buffer.md documentation
2026-03-20 18:35:00 +08:00
070b444f8f docs: update RHI API docs 2026-03-20 02:35:45 +08:00
ea756c0177 docs: update resources API docs 2026-03-20 02:35:35 +08:00
fd792b7df1 docs: update memory and threading API docs 2026-03-20 02:35:24 +08:00
c5b17239ca docs: update math API docs 2026-03-20 02:35:15 +08:00
e165dbea1c docs: update core and debug API docs 2026-03-20 02:35:07 +08:00
0c073db4e8 docs: update containers API docs 2026-03-20 02:35:01 +08:00
5257f3d75c docs: Fix SKILL.md规范 violations - Remove ## 方法列表 and flatten ### sub-headers in ## 公共方法 2026-03-19 02:01:18 +08:00
8e85fd98b8 docs: Remove sub-headers from 公共方法 sections to follow SKILL.md规范 2026-03-19 01:59:38 +08:00
b46d450429 Fix RHI documentation discrepancies
Fixed the following issues:
- command-list.md: Shutdown linked to threading/task-system instead of local shutdown.md
- fence.md: Wait linked to threading/task-group instead of local wait.md
- factory/create-rhi-device-string.md: Claimed Vulkan/Metal support but source doesn't support them
- opengl/buffer/buffer.md: GetType linked to command-queue/get-type (wrong type)
- d3d12/device/device.md: Initialize/Shutdown linked to threading/task-system
- d3d12/command-list/command-list.md: Initialize/Shutdown/Reset/Close/Clear linked to wrong docs
- d3d12/texture/texture.md: Initialize/Shutdown linked to threading/task-system
- opengl/command-list/command-list.md: Shutdown linked to threading/task-system
- opengl/device/device.md: GetNativeHandle incorrectly linked to get-window.md

All links validated with fix_links.py - no broken references remaining.
2026-03-19 01:23:10 +08:00
2076a484d4 Fix debug module documentation structure
- Create overview page for FileLogSink (filelogsink/filelogsink.md)
- Create constructor page for FileLogSink (filelogsink/construct.md)
- Create overview page for ConsoleLogSink (consolelogsink/overview.md)
- Fix self-referencing links in FileLogSink and ConsoleLogSink constructor pages

The constructor pages were incorrectly linking to themselves as 'overview' pages.
Created proper overview pages that list all public methods and link to their
individual documentation pages.
2026-03-19 01:22:11 +08:00
7e4c48d4f9 docs: Document stub/not-implemented methods in resources module
Fixed discrepancies between source code and documentation:
- AsyncLoader: Document Initialize() ignores workerThreadCount, Submit() doesn't do actual async loading, Update() is stub
- ResourceManager: Document UnloadUnused() and ReloadResource() are stubs
- ResourceCache: Document OnZeroRefCount() and Flush() are stubs
- ResourceDependencyGraph: Document TopologicalSort() returns empty (stub)
- ResourceFileSystem: Document GetResourceInfo() doesn't fill modifiedTime, EnumerateResources() is stub
- FileArchive: Document Enumerate() is stub
- ResourcePackageBuilder: Document AddDirectory() is stub
- ImportSettings: Document LoadFromJSON/SaveToJSON are stubs
- TextureImportSettings/MeshImportSettings: Document JSON methods are stubs
- TextureLoader/MeshLoader/MaterialLoader/ShaderLoader/AudioLoader: Document GetDefaultSettings() returns nullptr
- AudioLoader: Document ParseWAVData() is stub, Load() doesn't parse WAV headers
- ShaderLoader: Document DetectShaderType/ParseShaderSource are stubs
- MaterialLoader: Document ParseMaterialData() is stub
- Texture: Document Create() mipLevels=0 behavior, GenerateMipmaps() returns false
- Mesh: Document MeshLoader::Load() is example only
- IResourceLoader: Document GetDefaultSettings() returns nullptr for all loaders
2026-03-19 01:16:12 +08:00
8c719418d0 Add missing destructor documentation for PoolAllocator and ProxyAllocator
- Created docs/api/memory/pool-allocator/~pool-allocator.md documenting the destructor
- Created docs/api/memory/proxy-allocator/~proxy-allocator.md documenting the destructor
- Added ~ProxyAllocator entry to proxy-allocator.md overview table
- Verified link validation passes (no broken references)
2026-03-19 01:15:45 +08:00
94beec946b Fix documentation links and add missing destructor docs
- Add missing ~ProxyAllocator destructor entry to proxy-allocator.md
- Fix relative link paths in resources documentation
2026-03-19 01:14:36 +08:00
7332a2a592 Fix broken link in FileWriter documentation
- Removed broken [FileWriter](FileWriter.md) link from 方法列表 section since the constructor is already documented on the main page and FileWriter.md doesn't exist (file is named filewriter.md)

Also includes link fixes from fix_links.py:
- Fixed relative paths in containers documentation
2026-03-19 01:14:22 +08:00
12ae6f561a docs: Fix containers module documentation discrepancies
- Array::SetAllocator: Remove reference to non-existent PoolAllocator class
- HashMap::SetAllocator: Remove reference to non-existent GetDefaultAllocator()
- HashMap::Copy/Move: Fix move constructor complexity (O(m_bucketCount), not O(1))
- HashMap::iterator: Remove C++20 structured bindings example
- String: Add missing links for operator+ and operator==/!=
2026-03-19 01:14:20 +08:00
2141534995 docs: Fix RHI module documentation discrepancies
Fixed incorrect links in RHI documentation:
- Fixed OpenGL swap-chain docs with wrong references to threading/containers
- Fixed OpenGL texture docs with incorrect buffer/ texture links
- Fixed OpenGL vertex-array docs with wrong threading links
- Fixed OpenGL sampler docs with wrong threading links
- Fixed OpenGL device docs with incorrect swap-chain links
- Fixed fence docs with incorrect command-queue links
- Fixed command-list docs with missing shutdown link
- Fixed get-framebuffer-size.md title mismatch

Added missing documentation:
- Created fence/wait.md
- Created command-list/shutdown.md
- Created swap-chain/resize.md
- Created OpenGL sampler initialize.md, bind.md, unbind.md
2026-03-19 01:07:49 +08:00
452ccd4f8f docs: Add missing resources module documentation
Added documentation for undocumented classes:
- ResourcePath: Path manipulation and GUID conversion utilities
- FileArchive: Archive file reading support
- ResourcePackage/ResourcePackageBuilder: Resource packaging system

Updated resources.md overview to include new documentation modules
and added ImportSettings and ResourceFileSystem to core components.
2026-03-19 01:06:12 +08:00
f436280aa5 Fix math documentation discrepancies
- Vector4.md: Add index mapping (0=x, 1=y, 2=z, 3=w) to operator[] description
- Transform.md: Add proper '运算符' subsection header for operator* documentation

Found and fixed missing operator documentation:
- Vector4: operator[] index mapping was undocumented
- Transform: operator* was listed without proper section header
2026-03-19 01:05:17 +08:00
de4086dbfe docs: Fix core module documentation discrepancies
Fixed the following issues in XCEngine Core module documentation:
- Added 'using namespace XCEngine::Core;' to all code examples that use
  Core types (Event, FileWriter, etc.) without full namespace qualification
- Added missing '#include <XCEngine/Containers/String.h>' to FileWriter
  examples that use Containers::String
- Added '#include <string>' to Flush.md example using std::to_string

Affected files:
- core/core.md: Added using directive and Containers include
- event/*.md: Added using namespace to all 8 event doc files
- filewriter/*.md: Added using namespace and proper includes to all 6 files
2026-03-19 01:04:30 +08:00
3ac93ba2e8 Fix containers documentation discrepancies
- Remove Size() from String docs (does not exist in source, use Length())
- Remove broken links to operator+ and operator==/!= (inline functions)
- Fix string.md to correctly reference Length/Capacity/Empty instead of Size
- Add proper documentation for inline operators in string.md
2026-03-19 01:04:10 +08:00
7dd7858ef2 docs: fix threading module documentation discrepancies
- Fix SpinLock docs: clarify lock()/unlock()/try_lock() are non-const
  (matching source implementation in SpinLock.h)
- Add missing LambdaTask::Execute() method to inherited methods table
- Update TaskGroup::Wait() docs: clarify m_pendingCount never decrements
  causing indefinite block even after all tasks complete (not just
  unexecuted tasks)
- Update TaskGroup::IsComplete() docs: document same m_pendingCount
  issue causing incorrect return values
2026-03-19 01:03:14 +08:00
71413381af docs: fix debug module documentation discrepancies
- Changed include path in debug.md from Logger.h to Debug.h (umbrella header)
- Added XE_ASSERT example in debug.md usage section
- Added documentation for Profiler private types (ProfileNode, ProfileSample)
- Added documentation for Profiler member variables (m_profileStack, m_samples, m_frameStartTime, m_initialized)
- Verified MarkEvent, SetMarker, ExportChromeTracing are correctly marked as stubs
2026-03-19 01:02:15 +08:00
a669ec819d Fix RHI documentation discrepancies and add missing doc files
Fixed incorrect links in OpenGL documentation:
- Fixed wrong links to threading/task-system docs for Initialize/Shutdown methods
- Fixed wrong links to buffer docs for GetNativeHandle methods
- Fixed wrong links to shader docs for Bind/Unbind methods
- Fixed wrong links to command-list docs for Clear/Reset/Close methods
- Fixed wrong links to buffer/get-size.md for width/height methods

Added missing documentation files:
- OpenGL buffer: bind.md, unbind.md, get-type.md, initialize.md
- OpenGL fence: initialize.md, reset.md
- OpenGL swap-chain: get-size.md, initialize.md
- OpenGL render-target-view: initialize.md, shutdown.md, bind.md, unbind.md, clear.md, get-size.md
- OpenGL depth-stencil-view: initialize.md, shutdown.md, bind.md, unbind.md, get-size.md
- OpenGL command-list: clear.md

All links validated with fix_links.py - no broken references.
2026-03-19 00:54:54 +08:00
086eb877b5 docs: fix resources module documentation discrepancies
- Add missing MakeResourceGUID helper function to resourcetypes.md
- Add note about GetResourceType<T>() template specializations
- Merge duplicate '缓存控制' section into '内存管理' in resourcecache.md
- Verify all methods documented match source code implementations

Fixed documentation to match:
- ResourceTypes.h: MakeResourceGUID function now documented
- ResourceCache.h: OnZeroRefCount and Clear methods now properly listed
- AsyncLoader.md: Removed duplicate progress query section
2026-03-19 00:52:46 +08:00
bd530dc8b1 Fix Box documentation to accurately reflect AABB vs OBB behavior
- Updated box.md to clarify that Box uses OBB semantics for Contains
  but currently uses AABB for Intersects(Box)
- Updated intersects-box.md to document that it uses AABB algorithm
  instead of SAT, since the current implementation ignores transform
- Added notes explaining the current limitations of the Box implementation
2026-03-19 00:52:04 +08:00
6a952473ce docs: fix threading module documentation discrepancies
- Fix include paths: use #include "Threading/..." instead of <XCEngine/Threading/...>
- Document protected ITask constructors (ITask(), ITask(TaskPriority))
- Document Callback typedef in TaskGroup
- Clarify Mutex STL-compatible methods are const
- Note GetProgress() implementation limitation (returns 0.0f)
2026-03-19 00:49:08 +08:00
98c764bab9 docs: Fix memory module documentation discrepancies
- Add missing PoolAllocator class overview with methods table
- Add missing LinearAllocator class overview with methods table
- Add missing ProxyAllocator class overview with methods table
- Fix PoolAllocator::Allocate example code and comments
- Clarify ProxyAllocator::Free totalFreed calculation behavior
- Fix CreateLinearAllocator complexity from O(size) to O(1)
- Add note about Reallocate thread safety in ProxyAllocator
2026-03-19 00:48:44 +08:00
5fc18eac6f docs: Fix SmartPtr docs linking to Core Types instead of RHI Types 2026-03-19 00:47:57 +08:00
dae1a63a90 Fix debug module documentation discrepancies
- Fix XE_LOG macro parameter order in debug.md (category, level) was reversed
- Add 'Implementation Status' section to profiler.md listing stub methods
  (MarkEvent, SetMarker, ExportChromeTracing) that are not yet implemented
2026-03-19 00:47:29 +08:00
82cf147817 docs: 修正 API 文档准确性 (第四轮检查)
修复问题:
- containers: HashMap 实现描述修正
- debug: XE_LOG 宏参数顺序修正
- memory: ProxyAllocator 统计示例修正, PoolAllocator allocate size 检查描述
- resources: ResourceManager 缺失 UnloadGroup 方法
- rhi: D3D12 格式枚举名称修正, Texture Format 枚举补全, ResourceStates 补充
- threading: TaskGroup GetProgress/Wait/Cancel 实现限制说明
2026-03-19 00:43:16 +08:00
870cb3116e docs: 修正 API 文档准确性 (第三轮检查)
修复问题:
- containers: HashMap include 路径修复
- core: RefCounted 析构函数访问级别, Event::begin/end 返回值说明
- memory: LinearAllocator::GetMarker 返回偏移量非指针
- resources: LoadAsync 示例使用不存在的模板方法
- rhi: OpenGL 链接错误, ShaderType 枚举缺失8个类型, 链接修复
- threading: SpinLock STL 兼容方法说明, Mutex const 方法说明
2026-03-19 00:35:26 +08:00
a9f882f233 docs: 修正 API 文档准确性 (第二轮检查)
修复的问题:
- math: 修复 Quaternion::Normalize 链接错误
- containers: HashMap 迭代器示例使用不存在的 cbegin/cend,删除冗余构造函数声明
- core: RefCounted 析构函数访问级别修正 (protected)
- debug: LogLevelToString 示例返回值大小写修正
- memory: 修正 LinearAllocator::Reallocate 返回 nullptr,ProxyAllocator 统计描述,头文件路径 IAllocator.h -> Allocator.h
- resources: Texture::Create mipLevels 参数描述修正
- rhi: 修复多处链接错误,新增缺失的方法文档
- threading: TaskSystem 配置项未实现状态标注,Wait 方法空实现标注
2026-03-19 00:31:14 +08:00