Graphics Reference
In-Depth Information
Downloading the example code
You can download the example code iles for all Packt topics you have
purchased from your account at http://www.packtpub.com . If you
purchased this topic elsewhere, you can visit http://www.packtpub.
com/support and register to have the files e-mailed directly to you.
Further, a number of the managed classes use overloaded constructors and methods
that only support valid parameter combinations, relying less on a programmer's deep
understanding of the Direct3D API.
With Direct3D 11, Microsoft introduced Direct3D feature levels to manage the differences
between video cards. The feature levels define a matrix of Direct3D features that are
mandatory or optional for hardware devices to implement in order to meet the requirements
for a specific feature level. The minimum feature level required for an application can be
specified when creating a device instance, and the maximum feature level supported by the
hardware device is available on the Device.FeatureLevel property. More information
on feature levels and the features available at each level can be found at http://msdn.
microsoft.com/en-us/library/windows/desktop/ff476876(v=vs.85).aspx .
Device context
The device context encapsulates all rendering functions. These include setting the pipeline
state and generating rendering commands with resources created on the device.
Two types of device context exist in Direct3D 11, the immediate context and deferred context.
These implement immediate rendering and deferred rendering respectively.
The interfaces/classes for both context types are:
F Managed: Direct3D11.DeviceContext , Direct3D11.DeviceContext1 ,
and Direct3D11.DeviceContext2
F Unmanaged: ID3D11DeviceContext , ID3D11DeviceContext1 , and
ID3D11DeviceContext2
Immediate context
The immediate context provides access to data on the GPU and the ability to execute/playback
command lists immediately against the device. Each device has a single immediate context
and only one thread may access the context at the same time; however, multiple threads can
interact with the immediate context provided appropriate thread synchronization is in place.
All commands to the underlying device eventually must pass through the immediate context
if they are to be executed.
 
Search WWH ::




Custom Search