NAME

cgD3D11GetDevice - retrieves the current D3D11 device associated with a context

SYNOPSIS

  #include <Cg/cgD3D11.h>

  ID3D11Device * cgD3D11GetDevice( CGcontext context );

PARAMETERS

context

The context from which to get the current device.

RETURN VALUES

Returns the current D3D11 device associated with context.

DESCRIPTION

cgD3D11GetDevice retrieves the current D3D11 device associated with context. Note that the returned device pointer may be NULL.

EXAMPLES

  ID3D11Device* curDevice = cgD3D11GetDevice(ctx);
        

ERRORS

CG_INVALID_CONTEXT_HANDLE_ERROR is generated if context is not a valid context.

HISTORY

cgD3D11GetDevice was introduced in Cg 3.0.

SEE ALSO

cgD3D11SetDevice