The following code creates the basics for a graphics pipeline. In the projects main source file, start initializing the objects: void D3D12HelloTriangle::OnInit() class D3D12HelloTriangleįirst define the class in a header file, including a viewport, scissor rectangle and vertex buffer using the structures:Ĭlass D3D12HelloTriangle : public DXSampleĭ3D12HelloTriangle(UINT width, UINT height, std::wstring name) ĭ3D12_VERTEX_BUFFER_VIEW m_vertexBufferView The following expands the code flow above to include the code required for a basic sample. Refer to the Example Code in the D3D12 Reference.Refer to OnDestroy. If (FAILED(pDevice->CheckFeatureSupport(D3D12_FEATURE_FORMAT_INFO, &formatInfo, sizeof(formatInfo)))) inline UINT8 D3D12GetFormatPlaneCount(ĭ3D12_FEATURE_DATA_FORMAT_INFO formatInfo = Pipeline objects.Ĭhecking supported features. The D3D1211on12 sample uses ID3D12Device as follows: Use D3D12CreateDevice to create a device.įor Windows 10 Anniversary some additional functionality is available through ID3D12Device1. Opens a handle for shared resources, shared heaps, and shared fences, by using Name and Access.Ī development-time aid for certain types of profiling and experimental prototyping. Opens a handle for shared resources, shared heaps, and shared fences, by using HANDLE and REFIID. Gets info about how a tiled resource is broken into tiles. Gets the size and alignment of memory required for a collection of resources on this adapter. Reports the number of physical adapters (nodes) that are associated with this device. Gets the reason that the device was removed. This value is typically used to increment a handle into a descriptor array by the correct amount. Gets the size of the handle increment for the given type of descriptor heap. ID3D12Device::GetDescriptorHandleIncrementSize Helps the app fill-in D3D12_PLACED_SUBRESOURCE_FOOTPRINT and D3D12_SUBRESOURCE_FOOTPRINT when suballocating space in upload heaps.ĭivulges the equivalent custom heap properties that are used for non-custom heap types, based on the adapter's architectural properties. Gets a resource layout that can be copied. Gets a locally unique identifier for the current device (adapter). (ID3D12Device.CreateShaderResourceView)Ĭreates a shared handle to a heap, resource, or fence object.Įnables the page-out of data, which precludes GPU access of that data. (ID3D12Device.CreateRenderTargetView)Ĭreates a resource that is reserved, and not yet mapped to any pages in a heap.Ĭreate a sampler object that encapsulates sampling information for a texture.Ĭreates a shader-resource view for accessing data in a resource. A query heap contains an array of queries.Ĭreates a render-target view for accessing resource data. Placed resources are the lightest weight resource objects available, and are the fastest to create and destroy.Ĭreates a query heap. ID3D12Device::CreateGraphicsPipelineStateĬreates a graphics pipeline state object.Ĭreates a heap that can be used with placed resources and reserved resources.Ĭreates a resource that is placed in a specific heap. (ID3D12Device.CopyDescriptorsSimple)Ĭreates both a resource and an implicit heap, such that the heap is big enough to contain the entire resource, and the resource is mapped to the heap.Ĭreates a constant-buffer view for accessing resource data.Ĭreates a depth-stencil view for accessing resource data.Ĭreates a fence object. (ID3D12Device.CopyDescriptors)Ĭopies descriptors from a source to a destination. (ID3D12Device.CheckFeatureSupport)Ĭopies descriptors from a source to a destination. Gets information about the features that are supported by the current graphics driver. The ID3D12Device interface has these methods. ID3D12Device also has these types of members: Methods The ID3D12Device interface inherits from ID3D12Object.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |