ID3D11Device::GetImmediateContext method

Gets an immediate context, which can play back command lists.


void GetImmediateContext(
  ID3D11DeviceContext **ppImmediateContext



Type: ID3D11DeviceContext**

Upon completion of the method, the passed pointer to an ID3D11DeviceContext interface pointer is initialized.

Return Value

This method does not return a value.


The GetImmediateContext method returns an ID3D11DeviceContext object that represents an immediate context which is used to perform rendering that you want immediately submitted to a device. For most applications, an immediate context is the primary object that is used to draw your scene.

The GetImmediateContext method increments the reference count of the immediate context by one. Therefore, you must call Release on the returned interface pointer when you are done with it to avoid a memory leak.


Target Platform Windows
Header d3d11.h
Library D3D11.lib

See Also