我似乎偶然发现了有关DirectX 12.0编程的问题,到目前为止还没有研究能够深入了解这个问题.因此,除了似乎还没有一个切实可行的解决方案之外,我一直在寻找问题.
要告诉你,我现在用C(不是C++)和编程,因为很明显,提供了DirectX 12头文件做支持C,沿着C++,虽然我已经遇到的问题是奇怪的,因为它似乎是设计不良的C,可能由于没有多少人用这种语言编写复杂的(特别是面向对象的)应用程序.
这是我的问题:我在D3D12设备初始化过程中有以下代码块:
/* Get a handle to the memory location in the render target
view heap to identify where the render target views will be
located for the two back buffers */
hRTV = pThis->pRTVHeap->lpVtbl->GetCPUDescriptorHandleForHeapStart(pThis->pRTVHeap);
Run Code Online (Sandbox Code Playgroud)
凡HRTV代表" 处理,以渲染目标视图 "(D3D12_CPU_DESCRIPTOR_HANDLE)和pRTVHeap代表" 指针到渲染目标视图堆 "(ID3D12DescriptorHeap).
这是C++的等价物 - 这很好用:
/* Get a handle to the memory location in the render target
view heap to identify where the render target views will be
located …
Run Code Online (Sandbox Code Playgroud)