0
\$\begingroup\$

According to this article, the Mclip matrix will be used, but I didn't find any function in Directx11 to set this matrix. How do I set it?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

The documentation link you've provided is not from Direct3D 11, it's from Direct3D 9.

That aside, in the code snippets and formulae around discussion of this matrix we see the following:

Cx, Cy - dvClipX, dvClipY from D3DVIEWPORT9
Cw, Ch - dvClipWidth, dvClipHeight from D3DVIEWPORT9
Zmin, Zmax - dvMinZ, dvMaxZ from D3DVIEWPORT9

The mention of "from D3DVIEWPORT9" is your answer: it comes from the viewport. In Direct3D 11 that's an ID3D11DeviceContext::RSSetViewports call.

\$\endgroup\$
4
  • \$\begingroup\$ Thanks for your reply.Do you know if there is a Directx11 version of Transformation Pipeline by MS? \$\endgroup\$
    – Mark Peter
    Dec 29, 2020 at 2:24
  • \$\begingroup\$ @MarkPeter - Direct3D 11 does not have a fixed-function transform pipeline, so there's no comparable documentation. You can familiarise yourself with the D3D 11 pipeline stages at docs.microsoft.com/en-us/windows/win32/direct3d11/… \$\endgroup\$ Dec 29, 2020 at 9:54
  • 1
    \$\begingroup\$ @MarkPeter - the line of questioning you're taking suggests to me that you have a specific problem in mind here. Maybe it would be more useful for you if you asked a separate question about that specific problem; right now it looks as though you're asking about how you're thinking of solving it, which comes across as an XY Problem. \$\endgroup\$ Dec 29, 2020 at 16:16
  • \$\begingroup\$ I don't have specific purpose of using that matrix,but came across it and curious about what it does.Stil,thanks for you suggestions. \$\endgroup\$
    – Mark Peter
    Dec 31, 2020 at 3:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .