All Topics  
Direct3D

 

   Email Print
   Bookmark   Link






 

Direct3D



 
 
Direct3D is part of Microsoft
Microsoft

Microsoft Corporation is a multinational corporation computer technology corporation that develops, manufactures, licenses, and supports a wide range of computer software products for computing devices....
's DirectX
DirectX

Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms....
 API
Application programming interface

An application programming interface is a set of subroutine, data structures, class and/or Protocol provided by library and/or operating system Service s in order to support the building of applications....
. Direct3D is only available for Microsoft's various Windows
Microsoft Windows

Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces ....
 operating systems (Windows 95
Windows 95

Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Microsoft Windows products....
 and above) and is the base for the graphics API on the Xbox
Xbox

The Xbox is a History of video games video game console produced by Microsoft. It was Microsoft's first foray into the gaming console market, and competed with Sony's PlayStation 2 and Nintendo's GameCube....
 and Xbox 360
Xbox 360

The Xbox 360 is the second video game console produced by Microsoft, and the successor to the Xbox. The Xbox 360 competes with Sony's PlayStation 3 and Nintendo's Wii as part of the History of video game consoles of video game consoles....
 console systems. Direct3D is used to render three dimensional graphics
3D computer graphics

3D computer graphics are graphics that use a Cartesian coordinate system#Three-dimensional coordinate system representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images....
 in applications where performance is important, such as games. Direct3D also allows applications to run fullscreen instead of embedded in a window, though they can still run in a window if programmed for that feature.






Discussion
Ask a question about 'Direct3D'
Start a new discussion about 'Direct3D'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Direct3D is part of Microsoft
Microsoft

Microsoft Corporation is a multinational corporation computer technology corporation that develops, manufactures, licenses, and supports a wide range of computer software products for computing devices....
's DirectX
DirectX

Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms....
 API
Application programming interface

An application programming interface is a set of subroutine, data structures, class and/or Protocol provided by library and/or operating system Service s in order to support the building of applications....
. Direct3D is only available for Microsoft's various Windows
Microsoft Windows

Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces ....
 operating systems (Windows 95
Windows 95

Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Microsoft Windows products....
 and above) and is the base for the graphics API on the Xbox
Xbox

The Xbox is a History of video games video game console produced by Microsoft. It was Microsoft's first foray into the gaming console market, and competed with Sony's PlayStation 2 and Nintendo's GameCube....
 and Xbox 360
Xbox 360

The Xbox 360 is the second video game console produced by Microsoft, and the successor to the Xbox. The Xbox 360 competes with Sony's PlayStation 3 and Nintendo's Wii as part of the History of video game consoles of video game consoles....
 console systems. Direct3D is used to render three dimensional graphics
3D computer graphics

3D computer graphics are graphics that use a Cartesian coordinate system#Three-dimensional coordinate system representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images....
 in applications where performance is important, such as games. Direct3D also allows applications to run fullscreen instead of embedded in a window, though they can still run in a window if programmed for that feature. Direct3D uses hardware acceleration
Hardware acceleration

In computing, hardware acceleration is the use of hardware to perform some function faster than is possible in software running on the general purpose Central processing unit....
 if it is available on the graphics card, allowing for hardware acceleration of the entire 3D rendering pipeline or even only partial acceleration. Direct3D exposes the advanced graphics capabilities of 3D graphics hardware, including z-buffering
Z-buffering

In computer graphics, z-buffering is the management of image depth coordinates in three-dimensional graphics, usually done in hardware, sometimes in software....
, anti-aliasing
Anti-aliasing

In digital signal processing, anti-aliasing is the technique of minimizing the distortion artifacts known as aliasing when representing a high-resolution signal at a lower resolution....
, alpha blending
Alpha compositing

In computer graphics, alpha compositing is the process of combining an image with a background to create the appearance of partial transparency....
, mipmap
Mipmap

In 3D computer graphics texture filtering, MIP maps are pre-calculated, Optimization collections of images that accompany a main texture, intended to increase rendering speed and reduce aliasing artifacts....
ping, atmospheric effects, and perspective-correct texture mapping
Texture mapping

Texture mapping is a method for adding detail, surface texture, or colour to a computer-generated imagery or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D....
. Integration with other DirectX technologies enables Direct3D to deliver such features as video mapping, hardware 3D rendering in 2D overlay
Video overlay

Video overlay is any technique used to display a video window on a computer display while bypassing the chain of Central processing unit -> graphics card -> computer monitor....
 planes, and even sprites
Sprite (computer graphics)

In computer graphics, a sprite is a two-dimensional/three-dimensional or animation that is integrated into a larger scene.Sprites were originally invented as a method of quickly compositing several images together in two-dimensional video games using special hardware....
, providing the use of 2D and 3D graphics in interactive media titles.

Direct3D is a 3D
3D computer graphics

3D computer graphics are graphics that use a Cartesian coordinate system#Three-dimensional coordinate system representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images....
 API. That is, it contains many commands for 3D rendering, however since version 8 Direct3D has superseded the old DirectDraw
DirectDraw

DirectDraw is part of Microsoft's DirectX application programming interface. DirectDraw is used to render Computer graphics in applications where top performance is important....
 framework and also taken responsibility for the rendering of 2D graphics
2D computer graphics

2D computer graphics is the computer-based generation of digital images—mostly from two-dimensional models and by techniques specific to them....
. Microsoft strives to continually update Direct3D to support the latest technology available on 3D graphics cards. Direct3D offers full vertex software emulation but no pixel software emulation for features not available in hardware. For example, if software programmed using Direct3D requires pixel shaders
Shader

A shader in the field of computer graphics is a set of software instructions, which is used primarily to calculate Rendering effects on graphics hardware with a high degree of flexibility....
 and the video card
Video card

A video card, also known as a graphics accelerator card, display adapter, or graphics card, is an expansion card whose function is to generate and output images to a display....
 on the user's computer does not support that feature, Direct3D will not emulate it, although it will compute and render the polygons and textures of the 3D models, albeit at a usually degraded quality and performance compared to the hardware equivalent. The API does define a Reference Rasterizer (or REF device), which emulates a generic graphics card in software, although it is too slow for most real-time 3D applications and is typically only used for debugging.

Direct3D's main competitor is OpenGL
OpenGL

OpenGL is a standard specification defining a cross-language cross-platform Application programming interface for writing applications that produce 2D computer graphics and 3D computer graphics....
. There are numerous features and issues that proponents for either API disagree over, see comparison of Direct3D and OpenGL
Comparison of Direct3D and OpenGL

This article compares two computer graphics APIs:# Direct3D is a Proprietary software Application programming interface designed by Microsoft Corporation for hardware 3D acceleration on the Microsoft Windows platform...
 for a summary.

Architecture

Direct3D is a Microsoft DirectX
DirectX

Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms....
 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 GDI
Graphics Device Interface

The Graphics Device Interface is a Microsoft Windows application programming interface and core operating system component that is responsible for representing graphical objects and transmitting them to output devices such as computer display and computer printer....
 (see attached diagram). With a COM
Component Object Model

Component Object Model is an interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages....
 based architecture, the main difference between GDI and Direct3D is that Direct3D is directly connected to display drivers and gets better results at rendering than GDI.

Direct3D is an Immediate mode graphics API. It provides a low-level interface to every video card 3D function (transformations, clipping, lighting, materials, textures, depth buffering
Z-buffering

In computer graphics, z-buffering is the management of image depth coordinates in three-dimensional graphics, usually done in hardware, sometimes in software....
 and so on). It also had a higher level Retained mode component, that has now been officially discontinued.

Direct3D immediate mode presents three main abstractions: devices, resources and swap chains (see attached diagram). Devices are responsible for rendering the 3D scene. They provide an interface with different options of renderization. For example, mono
Monochrome

Monochrome comes from the Greek language ?????????? , meaning ?of one color?, which is a combination of ????? , meaning ?alone? or ?solitary?, and ????a , meaning ?color?....
 device provides white and black renderization and the RGB
RGB color model

The RGB color model is an additive color in which red, green, and blue light are added together in various ways to reproduce a broad array of colors....
 device uses colours to render. There are four types of devices:
  • HAL (hardware abstraction layer
    Hardware abstraction layer

    A hardware abstraction layer is an abstraction layer, implemented in software, between the physical Computer hardware of a computer and the Computer software that runs on that computer....
    ) device: if it supports hardware acceleration, the Direct3D code can run at hardware speeds.
  • Reference device: it is necessary to install previously the Direct3D SDK
    SDK

    SDK may refer to:* Slovak Democratic Coalition* Software development kit...
     to use this device type, as this allows it to simulate those new features that aren’t yet supported by the graphics hardware.
  • Null reference device: it does nothing but returns a black screen. This device is used when the SDK is not installed and a reference device is requested.
  • Pluggable software device: it is used to perform software rasterization. Previously, it was needed to provide the device through the RegisterSoftwareDevice method. This device type was not used until DirectX 9.0.


Every device contains at least one swap chain. A swap chain is made up of one or more back buffer
Buffer (computer science)

In computing, a buffer is a region of Memory used to temporarily hold data while it is being moved from one place to another. Typically, the data is stored in a buffer as it is retrieved from an input device or just before it is sent to an output device ....
 surfaces (rectangular collection of pixel
Pixel

In digital imaging, a pixel is the smallest item of information in an image. Pixels are normally arranged in a 2-dimensional grid, and are often represented using dots, squares, or rectangles....
 data and its attributes such as colour, depth/stencil, alpha or texture). In the back buffer
Double buffering

In computer science, double buffering is a widely used technique for minimizing the delay in input/output operations which use a buffer . Single buffering is affected by buffer underrun and buffer overflow....
 is where the render will occur.

Moreover, devices contain a collection of resources too. Resources are specific data used during rendering. Each resource has four attributes:
  • Type: it describes what kind of resource is: surface, volume, texture, cube texture, volume texture, surface texture, index buffer or vertex buffer.
  • Pool: it describes how the resource is managed by the runtime and where it is stored. Default pool means that the resource will exist only in device memory; managed pool means that the resource will be stored in system memory and will be sent to the device when required; system memory pool means that the resource will only exist in system memory, and scratch pool means the same as system memory pool, but, in this case, resources are not bound by hardware restrictions.
  • Format: it describes the layout of the resource’s data in memory, mainly pixel data. For example, D3DFMT_R8G8B8 format value means a 24 bits colour depth (8 bits for red, 8 bits for green and 8 bits for blue).
  • Usage: it describes, with a collection of flag
    Flag (computing)

    In computer programming, flag refers to one or more bits that are used to store a binary numeral system value or code that has an assigned meaning....
     bits, how the resource will be used by the application. These flags are used to know which resources are used in dynamic or in static access pattern. Static resource values don’t change after being loaded, whereas dynamic resource values are repeatedly modified.


Pipeline

The Microsoft Direct3D 10 API defines a process to convert a group of vertices, textures, buffers, and state into an image on the screen. This process is described as a rendering pipeline with several distinct stages. The different stages of the Direct3D 10 pipeline are:
  1. Input Assembler: Reads in vertex data from an application supplied vertex buffer and feeds them down the pipeline.
  2. Vertex Shader
    Vertex shader

    Vertex shader is a shader program, normally executed on the Graphics processing unit....
    : Performs operations on a single vertex at a time, such as transformations, skinning, or lighting.
  3. Geometry Shader
    Geometry shader

    A geometry shader is a shader program model introduced with Shader Model 4.0 of DirectX 10. NVIDIA GeForce 8800 Graphics processing unit were the first providing hardware support for Geometry Shaders....
    : Processes entire primitives such as triangles, points, or lines. Given a primitive, this stage discards it, or generates one or more new primitives.
  4. Stream Output: Can write out the previous stage's results to memory. This is useful to recirculate data back into the pipeline.
  5. Rasterizer: Converts primitives into pixels, feeding these pixels into the pixel shader. The Rasterizer may also perform other tasks such as clipping what is not visible, or interpolating vertex data into per-pixel data.
  6. Pixel Shader
    Pixel shader

    A pixel shader is a shader program, often executed on a graphics processing unit. It adds 3D shading and lighting effects to pixels in an image, for example those in video games....
    : Determines the final pixel colour to be written to the render target and can also calculate a depth value to be written to the depth buffer.
  7. Output Merger: Merges various types of output data (pixel shader
    Shader

    A shader in the field of computer graphics is a set of software instructions, which is used primarily to calculate Rendering effects on graphics hardware with a high degree of flexibility....
     values, alpha blending, depth/stencil...) to build the final result.


The pipeline stages illustrated with a round box are fully programmable. The application provides a shader program that describes the exact operations to be completed for that stage. Many stages are optional and can be disabled altogether.


Example

Drawing a triangle in Direct3D: // A 3-vertex polygon definition D3DLVERTEX v[3]; // Vertex established v[0]=D3DLVERTEX( D3DVECTOR(0.f, 5.f, 10.f), 0x00FF0000, 0, 0, 0 ); // Vertex established v[1]=D3DLVERTEX( D3DVECTOR(0.f, 5.f, 10.f), 0x0000FF00, 0, 0, 0 ); // Vertex established v[2]=D3DLVERTEX( D3DVECTOR(0.f, 5.f, 10.f), 0x000000FF, 0, 0, 0 ); // Function call to draw the triangle pDevice->DrawPrimitive( D3DPT_TRIANGLELIST, D3DFVF_LVERTEX, v, 3, 0 );

Drawing a triangle in Direct3D 9

struct Vertex ; Vertex triangle[] = ; // set Flexible Vertex Format pDevice->SetFVF(D3DFVF_XYZ | D3DFVF_DIFFUSE); // Draw - UP stands for 'user pointer', that is data // that is provided through a pointer and not through buffers pDevice->DrawPrimitiveUP(D3DPT_TRIANGLELIST, 1, triangle, sizeof(Vertex));

Display modes

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'.
  • Windowed mode: The result is shown inside the area of a window. Direct3D communicates with GDI
    Graphics Device Interface

    The Graphics Device Interface is a Microsoft Windows application programming interface and core operating system component that is responsible for representing graphical objects and transmitting them to output devices such as computer display and computer printer....
     to generate the graphical output in the display. Depending on driver support windowed mode can perform the same as full-screen.


History

In 1992, Servan Keondjian started a company named RenderMorphics, which developed a 3D graphics API named Reality Lab
Reality Lab

Reality Lab was a 3D API created by RenderMorphics to provide a standardized API for writing games. It was one of the main contenders in the realtime 3D middleware marketplace at the time, alongside Criterion Software's RenderWare and Argonaut Software's BRender....
, which was used in medical imaging and CAD software. Two versions of this API were released. Microsoft bought RenderMorphics in February 1995, bringing Keondjian on board to implement a 3D graphics engine for Windows 95
Windows 95

Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Microsoft Windows products....
. This resulted in the first version of Direct3D that shipped in DirectX 2.0 and DirectX 3.0.

Direct3D initially implemented "retained mode" and "immediate mode" 3D APIs. The retained mode was a COM
Component Object Model

Component Object Model is an interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages....
-based scene graph
Scene graph

A scene graph is a general data structure commonly used by vector graphics applications and modern computer games. Examples of such programs include AutoCAD, Adobe Illustrator, Acrobat 3D, OpenSceneGraph and CorelDRAW....
 API that attained little adoption. Game developers clamored for more direct control of the hardware's activities than the Direct3D retained mode could provide. Only one game that sold a significant volume, Lego Island
Lego Island

LEGO Island is a LEGO based Action-adventure game computer game developed by LEGO and Mindscape. Released for the Personal computer on October 2, 1997, the game is the first in the LEGO Island series, followed by Lego Island 2: The Brickster's Revenge, Island Xtreme Stunts, and Lego Island Xtreme Stunts Lego sets....
, was based on the Direct3D retained mode, so Microsoft did not update the retained mode after DirectX 3.0.

The first version of Direct3D immediate mode was based on an "execute buffer" programming model that Microsoft hoped hardware vendors would support directly. Execute buffers were intended to be allocated in hardware memory and parsed by the hardware in order to perform the 3D rendering. They were extremely awkward to program, however, hindering adoption of the new API and stimulating calls for Microsoft to adopt OpenGL as the official 3D rendering API for games as well as workstation applications. (see OpenGL vs. Direct3D
Comparison of Direct3D and OpenGL

This article compares two computer graphics APIs:# Direct3D is a Proprietary software Application programming interface designed by Microsoft Corporation for hardware 3D acceleration on the Microsoft Windows platform...
)

Rather than adopt OpenGL as a gaming API, Microsoft chose to continue improving Direct3D, not only to be competitive with OpenGL, but to compete more effectively with proprietary APIs such as 3dfx
3dfx

3dfx Interactive was a company that specialized in the manufacturing of 3D graphics graphics processing units and, later, graphics cards. It was a pioneer in the field for several years in the late 1990s until 2000 when it underwent one of the most high-profile demises in the history of the Personal computer industry....
's Glide
Glide API

File:Unreal-GlideVoodoo1flyby.jpgGlide was a proprietary 3D graphics application programming interface developed by 3dfx Interactive for their 3dfx Interactive graphics processing unit cards....
. A team in Redmond took over development of the Direct3D Immediate mode, while Servan's RenderMorphics team continued work on the Retained mode.

Direct3D 5.0 introduced the DrawPrimitive API that eliminated the need for applications to construct execute buffers.

Direct3D 6.0 introduced numerous features to cover contemporary hardware (such as multitexture
Texture mapping

Texture mapping is a method for adding detail, surface texture, or colour to a computer-generated imagery or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D....
  and stencil buffer
Stencil buffer

A stencil buffer is an extra Data buffer, in addition to the color buffer and depth buffer found on modern computer graphics hardware....
s) as well as optimized geometry pipelines for x87
X87

x87 is a math-related instruction subset of the x86 architecture of Central processing unit. It is so called because initially such instructions were processed by an coprocessor#Intel coprocessors chip 8087....
, SSE
Streaming SIMD Extensions

In computing, Streaming SIMD Extensions is a SIMD instruction set extension to the x86 architecture, designed by Intel and introduced in 1999 in their Pentium III series processors as a reply to AMD's 3DNow! ....
 and 3DNow!
3DNow!

3DNow! is the trade name of a multimedia extension created by AMD for its processors, starting with the K6-2 in 1998. It is an addition of SIMD instructions to the traditional x86 instruction set, designed to improve a central processing unit's ability to perform the vector processing requirements of many graphic-intensive applications....
 and optional texture management to simplify programming. Direct3D 6.0 also included support for features that had been licensed by Microsoft from specific hardware vendors for inclusion in the API, in exchange for the time-to-market advantage to the licensing vendor. S3 texture compression support was one such feature, renamed as DXTC for purposes of inclusion in the API. Another was TriTech's proprietary bump mapping
Bump mapping

Bump mapping is a computer graphics technique where at each pixel, a perturbation to the surface normal of the object being rendering is looked up in a heightmap and applied before the illumination calculation is done ....
 technique. By including these features in DirectX, Microsoft virtually guaranteed that all PC graphics hardware vendors would support the feature at their earliest opportunity, driving industry standardization in a way that was inconceivable under the auspices of the OpenGL Architectural Review Board.

Direct3D 7.0 introduced the .dds
DirectDraw Surface

The DirectDraw Surface file format, from Microsoft, is used for storing Texture and Cube mapping, both compressed and uncompressed. This makes the format useful for storing S3TC compressed data used in GPUs and consoles like the Playstation 3 and Xbox 360....
 texture format and support for transform and lighting hardware acceleration
Hardware acceleration

In computing, hardware acceleration is the use of hardware to perform some function faster than is possible in software running on the general purpose Central processing unit....
 (first available on PC hardware with NVIDIA's GeForce
GeForce 256

The GeForce 256 was the first of Nvidia's "GeForce" product-line. Released on August 31 1999, the GeForce 256 improved on its predecessor by increasing the number of fixed pixel pipelines, offloading host geometry calculations to a transform and lighting engine, and adding hardware motion compensation for MPEG-2 video....
), as well as the ability to allocate vertex buffers in hardware memory. Hardware vertex buffers represent the first substantive improvement over OpenGL in DirectX history. Direct3D 7.0 also augmented DirectX support for multitexturing hardware, and represents the pinnacle of fixed-function multitexture pipeline features: although powerful, it was so complicated to program that a new programming model was needed to expose the shading capabilities of graphics hardware.

Direct3D 8.0 introduced programmability in the form of vertex and pixel shader
Shader

A shader in the field of computer graphics is a set of software instructions, which is used primarily to calculate Rendering effects on graphics hardware with a high degree of flexibility....
s, enabling developers to write code without worrying about superfluous hardware state. The complexity of the shader programs depended on the complexity of the task, and the display driver
Device driver

In computing, a device driver or software driver is a computer program allowing higher-level computer programs to interact with a hardware device....
 compiled those shaders to instructions that could be understood by the hardware. Direct3D 8.0 and its programmable shading capabilities were the first major departure from an OpenGL-style fixed-function architecture, where drawing is controlled by a complicated state machine. Direct3D 8.0 also eliminated DirectDraw
DirectDraw

DirectDraw is part of Microsoft's DirectX application programming interface. DirectDraw is used to render Computer graphics in applications where top performance is important....
 as a separate API. Direct3D subsumed all remaining DirectDraw API calls still needed for application development, such as Present, the function used to display rendering results.

Direct3D was not considered to be user friendly, but as of DirectX version 8.1, many usability problems were resolved. Direct3D 8 contained many powerful 3D graphics features, such as vertex shaders, pixel shaders, fog
Distance fog

Distance fog is a technique used in 3D computer graphics to enhance the depth perception of distance by simulating fog.Because many of the shapes in graphical environments are relatively simple, and complex shadows are difficult to rendering , many graphics engines employ a "fog" gradient so objects further from the virtual camera are prog...
, bump mapping
Bump mapping

Bump mapping is a computer graphics technique where at each pixel, a perturbation to the surface normal of the object being rendering is looked up in a heightmap and applied before the illumination calculation is done ....
 and texture mapping
Texture mapping

Texture mapping is a method for adding detail, surface texture, or colour to a computer-generated imagery or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D....
.

Direct3D 9.0 added a new version of the High Level Shader Language
High Level Shader Language

The High Level Shader Language or High Level Shading Language is a proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API....
, support for floating-point texture formats, multiple render targets, and texture lookups in the vertex shader. An extension only available in Windows Vista, called Direct3D 9Ex (previously versioned 9.0L), allows the use of the advantages offered by Windows Vista's Windows Display Driver Model
Windows Display Driver Model

Windows Display Driver Model is the graphic driver architecture for video card device driver running Microsoft Windows versions beginning with Windows Vista....
 (WDDM) and is used for Windows Aero
Windows Aero

Windows Aero is the graphical user interface and the default theme in most editions of Windows Vista, an operating system released by Microsoft on 31 January 2007....
. D3D 9Ex, in conjunction with DirectX 9 class WDDM drivers allows graphics memory to be virtualized and paged out
Paging

In computer operating systems that have their main memory divided into page , paging is a transfer of pages between main memory and an auxiliary store, such as hard disk drive....
 to system memory, allows graphics operations to be interrupted and scheduled and allow DirectX surfaces to be shared across processes. DirectX 9.0Ex was previously known as version 1.0 of Windows Graphics Foundation (WGF).

Direct3D 10.0, was launched with and included in Windows Vista
Windows Vista

Windows Vista is one member in a family of operating systems developed by Microsoft for use on personal computers, including home and business Desktop computer, laptops, Tablet PCs, and media center PCs....
. Previously known as Windows Graphics Foundation (WGF) 2.0, D3D10 adds a number of capabilities including shader model 4.0, geometry shader
Geometry shader

A geometry shader is a shader program model introduced with Shader Model 4.0 of DirectX 10. NVIDIA GeForce 8800 Graphics processing unit were the first providing hardware support for Geometry Shaders....
s and optional interruptibility for shader programs. The DirectX 10 SDK became available in February 2007.

Direct3D 10


Windows Vista
Windows Vista

Windows Vista is one member in a family of operating systems developed by Microsoft for use on personal computers, including home and business Desktop computer, laptops, Tablet PCs, and media center PCs....
 includes a major update to the Direct3D API. Originally called WGF 2.0 (Windows Graphics Foundation 2.0), then DirectX 10 and DirectX Next, Direct3D 10 features an updated shader model, shader model 4.0. In this model shaders still consist of fixed stages as on previous versions, but all stages sport a nearly unified interface, as well as a unified access paradigm for resources such as textures and shader constants. The language itself has been extended to be more expressive, including integer operations, a greatly increased instruction count, and more C-like language constructs. In addition to the previously available vertex
Vertex shader

Vertex shader is a shader program, normally executed on the Graphics processing unit....
 and pixel shader
Pixel shader

A pixel shader is a shader program, often executed on a graphics processing unit. It adds 3D shading and lighting effects to pixels in an image, for example those in video games....
 stages, the API includes a geometry shader
Geometry shader

A geometry shader is a shader program model introduced with Shader Model 4.0 of DirectX 10. NVIDIA GeForce 8800 Graphics processing unit were the first providing hardware support for Geometry Shaders....
 stage that breaks the old model of one vertex in/one vertex out, to allow geometry to actually be generated from within a shader, allowing for complex geometry to be generated entirely on the graphics hardware.

Unlike prior versions of the API, Direct3D 10 no longer uses "capability bits" (or "caps") to indicate which features are supported on a given graphics device. Instead, it defines a minimum standard of hardware capabilities which must be supported for a display system to be "Direct3D 10 compatible". This is a significant departure, with the goal of streamlining application code by removing capability-checking code and special cases based on the presence or absence of fine-grain capabilities.

Because Direct3D 10 hardware was comparatively rare after the initial release of Windows Vista
Windows Vista

Windows Vista is one member in a family of operating systems developed by Microsoft for use on personal computers, including home and business Desktop computer, laptops, Tablet PCs, and media center PCs....
 and because of the massive installed base of non-Direct3D 10 compatible graphics cards, the first Direct3D 10-compatible games still provide Direct3D 9 render paths. Examples of such titles are games originally written for Direct3D 9 and ported to Direct3D 10 after their release, such as Company of Heroes
Company of Heroes

Company of Heroes is a real-time strategy Video game developed by Relic Entertainment. It was released on September 12, 2006, and was the first title to make use of the Games for Windows label....
, or games originally developed for Direct3D 9 with a Direct3D 10 path retrofitted later in development, such as Hellgate: London
Hellgate: London

Hellgate: London is a now-defunct dark fantasy-themed action role-playing game Software developer by Flagship Studios and released on October 31, 2007....
. No games have yet been announced that will natively and exclusively use Direct3D 10.

New features:
  • Fixed pipelines are being done away with in favor of fully programmable pipelines (often referred to as unified pipeline architecture), which can be programmed to emulate the same.
  • New state object to enable (mostly) the CPU to change states efficiently.
  • Shader model 4.0, enhances the programmability of the graphics pipeline
    Graphics pipeline

    In 3D computer graphics, the terms graphics pipeline or rendering pipeline most commonly refer to the current state of the art method of rasterization-based rendering as supported by commodity graphics hardware....
    . It adds instructions for integer and bitwise calculations.
  • Geometry shaders, which work on adjacent triangles which form a mesh
    Polygon mesh

    File:Dolphin triangle mesh.pngA polygon mesh or unstructured grid is a collection of vertices, edges and faces that defines the shape of a polyhedron object in 3D computer graphics and solid modeling....
    .
  • Texture
    Texture mapping

    Texture mapping is a method for adding detail, surface texture, or colour to a computer-generated imagery or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D....
     arrays enable swapping of textures in GPU without CPU intervention.
  • Predicated Rendering allows drawing calls to be ignored based on some other conditions. This enables rapid occlusion culling
    Hidden surface determination

    In 3D computer graphics, hidden surface determination is the process used to determine which surfaces and parts of surfaces are not visible from a certain viewpoint....
    , which prevents objects from being rendered if it is not visible or too far to be visible.
  • Instancing 2.0
    Geometry instancing

    In real-time computer graphics, geometry instancing refers to the practice of Rendering multiple copies of the same polygon mesh in a scene at once....
     support, allowing multiple instances of similar meshes, such as armies, or grass or trees, to be rendered in a single draw call, reducing the processing time needed for multiple similar objects to that of a single one.


Direct3D 10.1

Direct3D 10.1 was announced by Microsoft shortly after the release of Direct3D 10. It's a minor update to the Direct3D 10 interface, adding features that had to be left out of the initial specification. The Direct3D 10.1 API is now included with the Windows Vista
Windows Vista

Windows Vista is one member in a family of operating systems developed by Microsoft for use on personal computers, including home and business Desktop computer, laptops, Tablet PCs, and media center PCs....
 SP1
Windows Vista

Windows Vista is one member in a family of operating systems developed by Microsoft for use on personal computers, including home and business Desktop computer, laptops, Tablet PCs, and media center PCs....
, which is available since mid-March 2008.

Direct3D 10.1 sets a few more image quality standards for graphics vendors, and gives developers more control over image quality. Features include bigger control over antialiasing (both multisampling and supersampling with per sample shading and application control over sample position) and more flexibilities to some of the existing features (cubemap arrays and independent blending modes). Direct3D 10.1 level hardware must support the following features:
  • Mandatory 32-bit floating point
    Floating point

    In computing, floating point describes a system for numerical representation in which a String of digits represents a rational number.The term floating point refers to the fact that the radix point can "float": that is, it can be placed anywhere relative to the Significant figures of the number....
     filtering.
  • Mandatory support for 4x anti-aliasing
    Anti-aliasing

    In digital signal processing, anti-aliasing is the technique of minimizing the distortion artifacts known as aliasing when representing a high-resolution signal at a lower resolution....
  • Shader model
    High Level Shader Language

    The High Level Shader Language or High Level Shading Language is a proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API....
     4.1


Direct3D 10.1 runtime can run on Direct3D 10.0 hardware, unlike Direct3D 10 which strictly required Direct3D 10-class hardware and driver interfaces, but new features will be supported exclusively by new hardware.

Though this was made mandatory only with Direct3D 10.1, all Direct3D 10 parts out there support at least 4x multisampling and 32-bit floating point filtering, so this is not a new feature per se, just a change in wording of the specification.

The specification was finalized with the release of November 2007 DirectX SDK. Direct3D 10.1 will be backwards compatible
Backward compatibility

In technology, for example in telecommunications and computing, a device or technology is said to be backwards compatible if it allows input generated by older devices....
 with Direct3D 10.0 hardware, but the new features will not be available until 10.1 compliant hardware is released. The only available Direct3D 10.1 hardware as of June 2008 are the Radeon HD 3000 series
Radeon R600

The graphics processing unit codenamed R600 is the foundation of the Radeon HD 2000/3000 series and the FireGL 2007 series video cards developed by ATI Technologies....
 and Radeon HD 4000 series
Radeon R700

The Radeon R700 is the engineering codename for a Graphics Processing Unit series released by ATI Technologies, sold under the ATI Technologies brand....
 from ATI
Ati

As a word, Ati may refer to:* Ati, Chad, a town in Chad* Ati , a Negrito ethnic group in the Philippines** Ati-Atihan Festival, an annual celebration held in the Philippines...
 and the upcoming Chrome 430/440GT
S3 Chrome

S3 Graphics' Chrome series of graphics accelerators arrived in 2004 with the DeltaChrome line of chips. They are designed to be used as discrete, mobile, and integrated graphics solutions....
 GPUs from S3 Graphics
S3 Graphics

S3 Graphics, Ltd is a company specializing in graphics chipsets. Although they do not have the large market share that they once had, they still produce graphics accelerators for home computers under the "S3 Chrome" brand name....
. NVIDIA has not yet announced a hardware to fully support Direct3D 10.1, but has stated that they will support Direct3D 10.1 features that developers request on their existing hardware through extensions.

Direct3D 11

Direct3D 11 is currently under development. It was presented at Gamefest 2008 on July 22, 2008 and demonstrated at the NVISION 08
Nvision

NVISION is a stand alone event organized by NVIDIA to promote visual computing amongst enthusiasts and journalists.The event is mostly centered around NVIDIA's own products but offers activities usually found at other types of events: a demoscene event, scientific talks, and programming classes....
 technical conference on August 26, 2008. No exhaustive specification has been made publicly available by Microsoft, but the company has listed most of its features, including:
  • Tessellation
    Tessellation

    A tessellation or tiling of the plane is a collection of plane figures that fills the plane with no overlaps and no gaps. One may also speak of tessellations of the parts of the plane or of other surfaces....
     — to increase at runtime the number of visible polygons from a low detail polygonal model
  • Multithreaded rendering — to render to the same Direct3D device object from different threads for multi core CPUs
  • Compute shaders
    GPGPU

    General-purpose computing on graphics processing units is the technique of using a graphics processing unit, which typically handles computation only for computer graphics, to perform computation in applications traditionally handled by the central processing unit....
     — which exposes the shader pipeline for non-graphical tasks such as stream processing
    Stream processing

    Stream processing is a computer programming paradigm, related to SIMD, that allows some applications to more easily exploit a limited form of parallel computing....
     and physics acceleration, similar in spirit to what NVIDIA CUDA
    Cuda

    Cuda may refer to:* Plymouth Barracuda, a Chrysler automobile* CUDA, a computer processing technology* Cuda, a czechlosovakian last name...
     achieves, and HLSL Shader
    Shader

    A shader in the field of computer graphics is a set of software instructions, which is used primarily to calculate Rendering effects on graphics hardware with a high degree of flexibility....
     Model 5 among others..


Other notable features are the addition of two new texture compression algorithms for more efficient packing of high quality and HDR/alpha textures and an increased texture cache.

The Direct3D 11 runtime will be able to run on Direct3D 9 and 10.x-class hardware and drivers. This will allow Vista developers to unify the rendering pipeline and make use of API improvements such as better resource management and multithreading even on down-level cards, though advanced features such as new shader models and rendering stages will only be exposed on up-level hardware.

Tessellation
Tessellation

A tessellation or tiling of the plane is a collection of plane figures that fills the plane with no overlaps and no gaps. One may also speak of tessellations of the parts of the plane or of other surfaces....
 was earlier considered for Direct3D 10, but was later abandoned. GPUs such as Radeon R600
Radeon R600

The graphics processing unit codenamed R600 is the foundation of the Radeon HD 2000/3000 series and the FireGL 2007 series video cards developed by ATI Technologies....
 feature a tessellation engine that can be used with Direct3D 9/10 and OpenGL, but it's not compatible with Direct3D 11 (according to Microsoft). Older graphics hardware such as GeForce 3/4, Radeon 8xxx had support for another form of tesselation (RT patches, N patches) but those were never really used and their support was dropped from newer hardware as a result.

Microsoft has also hinted at other features such as order independent transparency
Order independent transparency

Order independent transparency or Order independent transparency in computer graphics denotes any technique that allows to render overlapping semi-transparent objects without having to sort them before they are being rendered....
, which was never exposed by the Direct3D API but supported almost transparently by early Direct3D hardware such as Videologic's PowerVR
PowerVR

PowerVR is a division of Imagination Technologies that develops hardware and software intellectual property for 2D and 3D rendering, and for video encoding, decoding, and associated image processing....
 line of chips.

The Direct3D 11 Technical Preview has been included in November 2008 release of DirectX SDK.

Related tools


D3DX


Direct3D comes with D3DX
D3dx

In computing, D3DX is a high level application programming interface library which is written to supplement Microsoft's Direct3D graphics API. The D3DX library was introduced in Direct3D#Version_history, and subsequently was improved in Direct3D#Version_history....
, a library of tools designed to perform common mathematical calculations on vector
Vector

Vector may refer to:...
s, matrices
Matrix (mathematics)

In mathematics, a matrix is a rectangular array of numbers, as shown at the right. In addition to a number of elementary, entrywise operations such as matrix addition a key notion is matrix multiplication....
 and colors, calculating look-at and projection
Projection

Projection can be any of:* The display of an image by devices such as:**Movie projector**Video projector**Overhead projector**Slide projector...
 matrices, spline interpolation
Spline interpolation

In the mathematics field of numerical analysis, spline interpolation is a form of interpolation where the interpolant is a special type of piecewise polynomial called a spline ....
s, and several more complicated tasks, such as compiling or assembling shaders used for 3D graphic programming, compressed skeletal animation
Skeletal animation

Skeletal animation, sometimes referred to as rigging, is a technique in computer animation, particularly in the animation of vertebrates, in which a character is represented in two parts: a surface representation used to draw the character and a hierarchical set of bones used for animation only ....
 storage and matrix stacks. There are several functions that provide complex operations over 3D mesh
Mesh

Mesh consists of semi-permeable barrier made of connected strands of metal, fiber, or other flexible/ductile material. Mesh is similar to spider web or Net in that it has many attached or woven strands....
es like tangent-space computation, mesh simplification, precomputed radiance transfer
Precomputed Radiance Transfer

Precomputed Radiance Transfer is a computer graphics technique used to render a scene in real time with complex light interactions being precomputed to save time....
, optimizing for vertex cache friendliness and stripification, and generators for 3D text meshes. 2D features include classes for drawing screen-space lines, text and sprite
Sprite (computer graphics)

In computer graphics, a sprite is a two-dimensional/three-dimensional or animation that is integrated into a larger scene.Sprites were originally invented as a method of quickly compositing several images together in two-dimensional video games using special hardware....
 based particle system
Particle system

The term particle system refers to a 3D computer graphics technique to simulate certain fuzzy phenomena, which are otherwise very hard to reproduce with conventional rendering techniques....
s. Spatial functions include various intersection routines, conversion from/to barycentric coordinates
Barycentric coordinates

Barycentric can refer to:In astronomy,* Barycentric coordinates are coordinates defined by the common center of mass of two or more bodies* Barycentric Dynamical Time was a time standard in the Solar system...
 and bounding box/sphere generators. D3DX
D3dx

In computing, D3DX is a high level application programming interface library which is written to supplement Microsoft's Direct3D graphics API. The D3DX library was introduced in Direct3D#Version_history, and subsequently was improved in Direct3D#Version_history....
 is provided as a dynamic link library (DLL).

DXUT

DXUT (also called the sample framework) is a layer built on top of the Direct3D API. The framework is designed to help the programmer spend less time with mundane tasks, such as creating a window, creating a device, processing Windows messages and handling device events. It is only usable for writing simple technology-oriented demos, tutorials and workshops.

Wine

The Wine
Wine (software)

Wine is a free software software application that aims to allow Unix-like computer operating systems on the x86 architecture or x86-64 architecture to execute programs written for Microsoft Windows....
 project has working implementations of the Direct3D 8 and 9 APIs (the implementations are, as of July 12 2008, 95% complete; work on implementing Direct3D 10 has begun in wine 1.1.7), using OpenGL running on X
X Window System

The X Window System is a computing software system and network protocol that provides a graphical user interface for networked computers. It implements the X Window System protocols and architecture and provides windowing system on raster graphics Visual display units and manages Keyboard and pointing device control functions....
 and Unix-like operating systems. It is currently under heavy development.

Direct3D and Windows Vista


Windows Vista and its updated driver model brings some new improvements and changes compared to the Windows XP model, and is expected to evolve even more as the hardware and the OS evolve (via future service packs or in the next version of Windows).

Windows Vista forces multithreading, via a theoretically unlimited number of execution contexts on the GPU. Multithreading was already supported in Windows XP as two applications or more could execute in different windows and be hardware accelerated. Windows Vista makes it a requirement to support an arbitrarily large number of execution contexts (or threads) in hardware or in software. Vista, in its basic scheduling incarnation (the current driver model), manages threads all by itself, allowing the hardware to switch from one thread to the other when appropriate. This is a departure from Windows XP, where the hardware could decide to switch threads on its own, as the OS had limited control about what the GPU could do. Also Windows Vista handles memory management and paging (to system memory and to disk), which is a necessity in order to support a large number of execution contexts with their own resources. Each execution context is presented with a resource view of the GPU that matches the maximum available (or exceeds it for aware applications). Most of the management is implemented on the OS side in order to be properly integrated into the OS-kernel memory management.

Execution contexts are protected from each other. Because of the user-mode implementation of the Vista driver, a rogue or badly written app can take control of the execution of the driver and could potentially access data from another process within GPU memory by sending modified commands. Though protected from access by another app, a well-written app still needs to protect itself against failures and device loss caused by other applications. The user-mode implementation can reduce the occurrence of BSODs caused by graphics drivers (which is a much more catastrophic event to a running app than a device-lost event).

Regularly Microsoft spokespeople talked about the necessity to have a finer grain context switching (referred to as "advanced scheduling") so as to be able to switch two execution threads at the shader-instruction level instead of the single-command level or even batch of commands. This is not a requirement of Vista, nor of Direct3D 10 compatibility. Direct3D10 apps can run, and are now running, on top of the basic scheduling implementation. This isn't typically a problem except for a potential app that would have very long execution of a single command/batch of commands (). Vista cannot enforce right now a finer-grained context switching, as it will require additional support from hardware vendors, but it may appear in the future.

See also

  • HLSL
    High Level Shader Language

    The High Level Shader Language or High Level Shading Language is a proprietary shading language developed by Microsoft for use with the Microsoft Direct3D API....
     - High Level Shader Language
  • DirectX
    DirectX

    Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms....
     - Collection of API's in which Direct3D is implemented
  • OpenGL
    OpenGL

    OpenGL is a standard specification defining a cross-language cross-platform Application programming interface for writing applications that produce 2D computer graphics and 3D computer graphics....
     - Main competitor to Direct3D
  • DirectDraw
    DirectDraw

    DirectDraw is part of Microsoft's DirectX application programming interface. DirectDraw is used to render Computer graphics in applications where top performance is important....
  • 3D computer graphics
    3D computer graphics

    3D computer graphics are graphics that use a Cartesian coordinate system#Three-dimensional coordinate system representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images....
  • Shader
    Shader

    A shader in the field of computer graphics is a set of software instructions, which is used primarily to calculate Rendering effects on graphics hardware with a high degree of flexibility....
  • Silverlight


External links

  • Technical article discussing the new features of DirectX 10 and their impact on computer games