Detailed Description

An interface providing access to some of the graphics API specific internals of the scenegraph.

Renderer interfaces allow accessing graphics API specific functionality in the scenegraph. Such internals are not typically exposed. However, when integrating custom rendering via QSGRenderNode for example, it may become necessary to query certain values, for instance the graphics device (e.g. the Direct3D or Vulkan device) that is used by the scenegraph.

Engine-specific accessors, like getResource(), are however available only after the scenegraph is initialized. Additionally, there may be backend-specific limitations on when such functions can be called. The only way that is guaranteed to succeed is calling them when the rendering of a node (i.e. the preparation of the command list for the next frame) is active. In practice this typically means QSGRenderNode::render().

[virtual] QSGRendererInterface::~QSGRendererInterface()

Queries a graphics resource in window. Returns null when the resource in question is not supported or not available.

When successful, the returned pointer is either a direct pointer to an interface (and can be cast, for example, to ID3D12Device *) or a pointer to an opaque handle that needs to be dereferenced first (for example, VkDevice dev = *static_cast<VkDevice *>(result)). The latter is necessary since such handles may have sizes different from a pointer.

Note: The ownership of the returned pointer is never transferred to the caller.