XLE  v0.02.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RenderCore::Device Class Reference
Inheritance diagram for RenderCore::Device:
Inheritance graph
[legend]

Public Member Functions

std::unique_ptr< IPresentationChainCreatePresentationChain (const void *platformValue, unsigned width, unsigned height)
 Initialised a window for rendering More...
 
void BeginFrame (IPresentationChain *presentationChain)
 Begins rendering of a new frame More...
 
std::pair< const char *, const char * > GetVersionInformation ()
 Returns version information for this device More...
 
std::shared_ptr< IThreadContextGetImmediateContext ()
 
std::unique_ptr< IThreadContextCreateDeferredContext ()
 
- Public Member Functions inherited from RenderCore::IDevice
virtual virtual void * QueryInterface (const GUID &guid)=0
 Looks for compatibility with another interface More...
 

Protected Member Functions

intrusive_ptr< IDXGI::Factory > GetDXGIFactory ()
 

Protected Attributes

intrusive_ptr< ID3D::Device > _underlying
 
intrusive_ptr< ID3D::DeviceContext > _immediateContext
 
D3D_FEATURE_LEVEL _featureLevel
 
std::shared_ptr< ThreadContextDX11_immediateThreadContext
 

Member Function Documentation

void RenderCore::Device::BeginFrame ( IPresentationChain presentationChain)
virtual

Begins rendering of a new frame

Starts rendering of a new frame. The frame is ended with a call to RenderCore::IPresentationChain::Present(); You must pass a presentationChain. This defines how the frame will be presented to the user. Note that rendering to offscreen surfaces can happen outside of the BeginFrame/Present boundaries.

See also
RenderCore::IPresentationChain::Present

Implements RenderCore::IDevice.

std::unique_ptr< IPresentationChain > RenderCore::Device::CreatePresentationChain ( const void *  platformWindowHandle,
unsigned  width,
unsigned  height 
)
virtual

Initialised a window for rendering

To render to a window, we first need to create a presentation chain. This creates the buffers necessary to render to that window.

Parameters
platformWindowHandleA platform specific value representing a window. On windows, this is would be a HWND value
widthWidth of the presentation chain. RenderCore can't call GetClientRect() on the window directly, because that would require adding a linker reference to windows dlls. But normally, with and height are the same size as the window client area. If a different size is used, the behaviour might be different on different platforms (but on windows, the output is stretched.
heightsee width

Implements RenderCore::IDevice.

std::pair< const char *, const char * > RenderCore::Device::GetVersionInformation ( )
virtual

Returns version information for this device

Queries build number and build date information. The build number is in a format such as:

vX.Y.Z-[commits]-[commit marker]-[configuration]

Here, X, Y, Z are major, minor and patch version.

  • [commits] is the number of extra commits past the version tag in git.
  • [commit marker] is the short name of the latest commit to git.
  • [configuration] is the build configuration

The build date format is determined by the OS and locale at compilation time.

Returns
The first returned string is the build number, the second is the build date

Implements RenderCore::IDevice.


The documentation for this class was generated from the following files: