我正在尝试在我的项目中打开抗锯齿功能。先看d3d9界面:
HRESULT CreateRenderTarget(
[in] UINT Width,
[in] UINT Height,
[in] D3DFORMAT Format,
[in] D3DMULTISAMPLE_TYPE MultiSample,
[in] DWORD MultisampleQuality,
[in] BOOL Lockable,
[out, retval] IDirect3DSurface9 **ppSurface,
[in] HANDLE *pSharedHandle
);
typedef enum D3DMULTISAMPLE_TYPE {
D3DMULTISAMPLE_NONE = 0,
D3DMULTISAMPLE_NONMASKABLE = 1,
D3DMULTISAMPLE_2_SAMPLES = 2,
D3DMULTISAMPLE_3_SAMPLES = 3,
D3DMULTISAMPLE_4_SAMPLES = 4,
D3DMULTISAMPLE_5_SAMPLES = 5,
D3DMULTISAMPLE_6_SAMPLES = 6,
D3DMULTISAMPLE_7_SAMPLES = 7,
D3DMULTISAMPLE_8_SAMPLES = 8,
D3DMULTISAMPLE_9_SAMPLES = 9,
D3DMULTISAMPLE_10_SAMPLES = 10,
D3DMULTISAMPLE_11_SAMPLES = 11,
D3DMULTISAMPLE_12_SAMPLES = 12,
D3DMULTISAMPLE_13_SAMPLES = 13,
D3DMULTISAMPLE_14_SAMPLES = 14,
D3DMULTISAMPLE_15_SAMPLES = 15,
D3DMULTISAMPLE_16_SAMPLES = 16,
D3DMULTISAMPLE_FORCE_DWORD = 0xffffffff
} D3DMULTISAMPLE_TYPE, *LPD3DMULTISAMPLE_TYPE;
我不确定如何给出参数MultiSample
和MultisampleQuality
. non-maskable multisampling
和有什么区别maskable
?
2x 抗锯齿映射到什么?
4x 抗锯齿映射到什么?
D3DMULTISAMPLE_2_SAMPLES + 2q == D3DMULTISAMPLE_4_SAMPLES + 1q?