Files
XCEngine/docs/api/resources/texture-import-settings/settargetformat.md
ssdfasd 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

29 lines
666 B
Markdown

# TextureImportSettings::SetTargetFormat / GetTargetFormat
```cpp
void SetTargetFormat(TextureFormat format);
TextureFormat GetTargetFormat() const;
```
设置或获取目标纹理格式。
**参数:**
- `format` - 目标格式(参见 `TextureFormat` 枚举)
**返回:** `TextureFormat` / `void`
**线程安全:**
**示例:**
```cpp
TextureImportSettings settings;
settings.SetTargetFormat(TextureFormat::RGBA8);
TextureFormat format = settings.GetTargetFormat(); // TextureFormat::RGBA8
```
## 相关文档
- [TextureImportSettings 总览](textureimportsettings.md) - 返回类总览
- [Texture](../texture/texture.md) - 纹理格式定义