Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Direct3D
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Architecture== {{Update|section|date=August 2014}} [[Image:D3D Abs.svg|thumb|right|190px|Abstract Layer]] Direct3D is a Microsoft [[DirectX]] API subsystem component. The aim of Direct3D is to abstract the communication between a graphics application and the graphics hardware drivers. It is presented like a thin abstract layer at a level comparable to [[Graphics Device Interface|GDI]] (see attached diagram). Direct3D contains numerous features that GDI lacks. Direct3D is an ''Immediate mode'' graphics API. It provides a low-level interface to every video card 3D function (''[[transform, clipping, and lighting|transformations, clipping, lighting]]'', ''materials'', ''textures'', ''[[Z-buffering|depth buffering]]'' and so on). It once had a higher level ''Retained mode'' component, now officially discontinued. Direct3D immediate mode presents three main abstractions: ''devices'', ''resources'' and ''[[Swap Chain]]s'' (see attached diagram). ''Devices'' are responsible for rendering the 3D scene. They provide an interface with different rendering capabilities. For example, the [[monochrome|mono]] device provides white and black rendering, while the [[RGB color model|RGB]] device renders in color. There are four types of devices: * '''HAL''' ([[hardware abstraction layer]]) device: For devices supporting hardware acceleration. [[Image:D3DDevice.svg|thumb|right|190px|Device]] * '''Reference''' device: Simulates new functions not yet available in hardware. It is necessary to install the Direct3D [[Software development kit|SDK]] to use this device type. * '''Null reference''' device: Does nothing. This device is used when the SDK is not installed and a reference device is requested. * '''Pluggable software''' device: Performs software rendering. This device was introduced with '''DirectX 9.0'''.<ref>{{cite web |url=http://www.microsoft.com/download/en/details.aspx?id=1839 |archive-url=https://archive.today/20120904042640/http://www.microsoft.com/download/en/details.aspx?id=1839 |url-status=dead |archive-date=2012-09-04 |title=Software Rasterizer for DirectX 9.0 SDK |date=2005-08-01 |publisher=Microsoft }}</ref> Every device contains at least one ''swap chain''. A ''swap chain'' is made up of one or more back [[Buffer (computer science)|buffer]] surfaces. Rendering occurs in the [[Double buffering|back buffer]]. Moreover, devices contain a collection of ''resources''; specific data used during rendering. Each resource has four attributes: * '''Type''': Determines the type of resource: surface, volume, texture, cube texture, volume texture, surface texture, index buffer or vertex buffer. * '''[[Memory pool|Pool]]''':<ref>{{cite web |url=http://www.toymaker.info/Games/html/d3d_resources.html#MemoryPool |title=Direct3D Resources β Memory pool |url-status=dead |archive-url=https://web.archive.org/web/20080509150221/http://www.toymaker.info/Games/html/d3d_resources.html#MemoryPool |archive-date=2008-05-09 }}</ref> Describes how the resource is managed by the runtime and where it is stored. In the '''Default''' pool the resource will exist only in device memory. Resources in the '''managed''' pool will be stored in system memory, and will be sent to the device when required. Resources in '''system memory''' pool will only exist in system memory. Finally, the '''scratch''' pool is basically the same as the system memory pool, but resources are not bound by hardware restrictions. * '''Format''': Describes the layout of the resource data in memory. For example, ''D3DFMT_R8G8B8'' format value means a 24 bits [[color depth]] (8 bits for red, 8 bits for green and 8 bits for blue). * '''Usage''': Describes, with a collection of [[Flag (computing)|flag]] bits, how the resource will be used by the application. These flags dictate which resources are used in dynamic or static access patterns. Static resource values don't change after being loaded, whereas dynamic resource values may be modified. Direct3D implements two display modes: * Fullscreen mode: The Direct3D application generates all of the graphical output for a display device. In this mode Direct3D automatically captures Alt-Tab and sets/restores screen resolution and pixel format without the programmer intervention. This also provides plenty of problems for debugging due to the 'Exclusive Cooperative Mode'.{{Citation needed|date=February 2011}} * Windowed mode: The result is shown inside the area of a window. Direct3D communicates with [[Graphics Device Interface|GDI]] to generate the graphical output in the display. Windowed mode can have the same level of performance as full-screen, depending on driver support.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)