Files
BlueRoseNote/04-ComputerGraphics/Directx12/DirectX12学习笔记(2)——Direct3D初始化.md

47 lines
1.0 KiB
Markdown
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.

---
title: DirectX12学习笔记2——Direct3D初始化
date: 2023-03-01 19:39:43
excerpt:
tags:
rating: ⭐
---
# Com接口
需要包含头文件#include <wrl.h>
常用方法
- Get()取得Com接口对象。
- GetAdressof()取得Com接口指针地址。
- Rest():释放相关使用。
# 交换链
D3D使用IDXGISwapChain控制前后缓存交换。
- ResizeBuffers()
- Present():呈现缓冲区内容。
# 资源描述符号
1. 常量缓冲区视图CBV/SRV/UAV
2. 采样器Sample
3. 渲染目标视图RTV
4. 深度/模版视图DSV)
# 多重采样技术
解析resolve或者可以称之为降采样
## 利用D3D进行多重采样
首先填写DXGI_SAMPLE_DESC
```c++
typedef struct DXGI_SAMPLE_DESC
{
UINT Count;
UINT Quality;
} DXGI_SAMPLE_DESC;
```
之后使用ID3D12Device::CheckFeatureSupport查询到对应的质量级别
# DXGI
- DXGI_MODE_DESC 分辨率、逐行扫描、缩放方式。
- DXGI_MODE_SCANLINE_ORDER缩放优先级。
- DXGI_MODE_SCALING缩放方式。
# 功能支持检测
使用