예제 #1
0
 ObjectFactory::ObjectFactory(ID3D::Resource& resource)
 {
     ID3D::Device* deviceTemp = nullptr;
     resource.GetDevice(&deviceTemp);
     _device = moveptr(deviceTemp);
     _attachedData = InitAttachedData(_device.get());
 }
예제 #2
0
DepthStencilView::DepthStencilView(DeviceContext& context)
{
    // get the currently bound depth stencil view from the context
    ID3D::DepthStencilView* rawPtr = nullptr;
    context.GetUnderlying()->OMGetRenderTargets(0, nullptr, &rawPtr);
    _underlying = moveptr(rawPtr);
}
예제 #3
0
파일: Buffer.cpp 프로젝트: Clever-Boy/XLE
 IndexBuffer::IndexBuffer(DeviceContext& context)
 {
     ID3D::Buffer* rawPtr = nullptr;
     DXGI_FORMAT fmt = DXGI_FORMAT_UNKNOWN;
     unsigned offset = 0;
     context.GetUnderlying()->IAGetIndexBuffer(&rawPtr, &fmt, &offset);
     _underlying = moveptr(rawPtr);
 }
예제 #4
0
 intrusive_ptr<CommandList>     DeviceContext::ResolveCommandList()
 {
     ID3D::CommandList* commandListTemp = nullptr;
     HRESULT hresult = _underlying->FinishCommandList(FALSE, &commandListTemp);
     if (SUCCEEDED(hresult) && commandListTemp) {
         intrusive_ptr<ID3D::CommandList> underlyingCommandList = moveptr(commandListTemp);
         return make_intrusive<CommandList>(underlyingCommandList.get());
     }
     return intrusive_ptr<CommandList>();
 }