home *** CD-ROM | disk | FTP | other *** search
/ Introduction to 3D Game …ogramming with DirectX 12 / Introduction-to-3D-Game-Programming-with-DirectX-12.ISO / Code.Textures / Chapter 14 The Tessellation Stages / BezierPatch / FrameResource.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2016-03-02  |  683 b   |  18 lines

  1. #include "FrameResource.h"
  2.  
  3. FrameResource::FrameResource(ID3D12Device* device, UINT passCount, UINT objectCount, UINT materialCount)
  4. {
  5.     ThrowIfFailed(device->CreateCommandAllocator(
  6.         D3D12_COMMAND_LIST_TYPE_DIRECT,
  7.         IID_PPV_ARGS(CmdListAlloc.GetAddressOf())));
  8.  
  9.   //  FrameCB = std::make_unique<UploadBuffer<FrameConstants>>(device, 1, true);
  10.     PassCB = std::make_unique<UploadBuffer<PassConstants>>(device, passCount, true);
  11.     MaterialCB = std::make_unique<UploadBuffer<MaterialConstants>>(device, materialCount, true);
  12.     ObjectCB = std::make_unique<UploadBuffer<ObjectConstants>>(device, objectCount, true);
  13. }
  14.  
  15. FrameResource::~FrameResource()
  16. {
  17.  
  18. }