-1

I am currently trying to make a UI transparent in DirectX 11 for a university project, and am looking at blend states and other resources within the Microsoft docs. I keep coming across pd3dDevice and am truly lost on what it is. I have looked in so many places just to see people using it, but with no reference to what it is.

I first found it here: Configuring Blending Functionality: Create the Blend State, and I am trying to find a way to use it or access it in any way, but I can't find out what it is or what it references.

ID3D11BlendState1* g_pBlendStateNoBlend = NULL;

D3D11_BLEND_DESC1 BlendState;
ZeroMemory(&BlendState, sizeof(D3D11_BLEND_DESC1));
BlendState.RenderTarget[0].BlendEnable = FALSE;
BlendState.RenderTarget[0].RenderTargetWriteMask = 
D3D11_COLOR_WRITE_ENABLE_ALL;
pd3dDevice->CreateBlendState1(&BlendState, &g_pBlendStateNoBlend);
Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • First I have to ask What do you know about DirectX 11?? can you create a basic application? because if you can you wouldn't ask this question. To answer your question, I'd say learn the basics of DirectX before doing anything, so I'd recommend you to read "Introduction to 3D Game Programming with DirectX 11" by Frank Luna – ma1169 Dec 18 '21 at 13:10

1 Answers1

1

It's a ID3D11Device1*.

To find this, beyond the name where p stands for "pointer", just google on the method as it's often discriminant enough, for example, here CreateBlendState1 will lead you to ID3D11Device1::CreateBlendState1

Simon Mourier
  • 132,049
  • 21
  • 248
  • 298
  • This is *literally* stated in the document the OP linked to, right above the quoted code snippet: "*The blend state is a collection of states used to control blending. These states (defined in `D3D11_BLEND_DESC1`) are used to create the blend state object by calling **ID3D11Device1**::CreateBlendState1.*" – Remy Lebeau Dec 11 '21 at 17:41
  • @RemyLebeau - this maybe obvious for you (and for me), but apparently not for the OP who doesn't understand what pd3dDevice is, that's why I gave extra hints. – Simon Mourier Dec 11 '21 at 22:11