コード例 #1
0
ファイル: DeviceContext.cpp プロジェクト: ldh9451/XLE
 ObjectFactory::ObjectFactory(ID3D::Resource& resource)
 {
     ID3D::Device* deviceTemp = nullptr;
     resource.GetDevice(&deviceTemp);
     _device = moveptr(deviceTemp);
     _attachedData = InitAttachedData(_device.get());
 }
コード例 #2
0
ファイル: RenderTargetView.cpp プロジェクト: coreafive/XLE
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
ファイル: DeviceContext.cpp プロジェクト: ldh9451/XLE
 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>();
 }