-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFrameResource.cpp
24 lines (18 loc) · 949 Bytes
/
FrameResource.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "FrameResource.h"
#include "stdafx.h"
FrameResource::FrameResource(ID3D12Device* device, UINT passCount, UINT objectCount, UINT materialCount, UINT waveVertCount)
{
ThrowIfFailed(device->CreateCommandAllocator(
D3D12_COMMAND_LIST_TYPE_DIRECT,
IID_PPV_ARGS(CmdListAlloc.GetAddressOf())));
// FrameCB = std::make_unique<UploadBuffer<FrameConstants>>(device, 1, true);
PassCB = std::make_unique<UploadBuffer<PassConstants>>(device, passCount, true);
MaterialCB = std::make_unique<UploadBuffer<MaterialConstants>>(device, materialCount, true);
ObjectCB = std::make_unique<UploadBuffer<ObjectConstants>>(device, objectCount, true);
WavesVB = std::make_unique<UploadBuffer<Vertex>>(device, waveVertCount, false);
ArrowsVB = std::make_unique<UploadBuffer<Vertex>>(device, 0x8000, false);
ArrowsIB = std::make_unique<UploadBuffer<std::uint16_t>>(device, 0x8000, false);
}
FrameResource::~FrameResource()
{
}