feat: 实现 D3D12Sampler 采样器类
- 添加 D3D12Sampler.h/cpp - 支持采样器描述符 - 测试通过
This commit is contained in:
24
engine/src/RHI/D3D12Sampler.cpp
Normal file
24
engine/src/RHI/D3D12Sampler.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "XCEngine/RHI/D3D12/D3D12Sampler.h"
|
||||
|
||||
namespace XCEngine {
|
||||
namespace RHI {
|
||||
|
||||
D3D12Sampler::D3D12Sampler() {
|
||||
memset(&m_desc, 0, sizeof(D3D12_SAMPLER_DESC));
|
||||
}
|
||||
|
||||
D3D12Sampler::~D3D12Sampler() {
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
bool D3D12Sampler::Initialize(ID3D12Device* device, const D3D12_SAMPLER_DESC& desc) {
|
||||
m_desc = desc;
|
||||
return true;
|
||||
}
|
||||
|
||||
void D3D12Sampler::Shutdown() {
|
||||
memset(&m_desc, 0, sizeof(D3D12_SAMPLER_DESC));
|
||||
}
|
||||
|
||||
} // namespace RHI
|
||||
} // namespace XCEngine
|
||||
Reference in New Issue
Block a user