Introduction to 3D graphics API – DirectX

Graphics application programming interfaces (APIs) save game programmers a lot of core work that need not be repeated each time a game is developed. Predominantly this is mathematical work involved in generating standard engine features, such texture rendering, perspective, geometry, lighting and particle effects, physics, etc.

There is still a significant amount of work that a programmer has to go through to create something as simple as a three dimensional cube on a two dimensional screen with just a graphics API. When you consider this or spend some time learning about the process, you gain new respect for the teams that created marvels such as Skyrim’s expansive and detailed mountainous world.

These feats of talent are of course backed by tools built on top of tools: 3D modelling programs, such as Maya 3D, save you from describing a 3D model as thousands of vertices; 3D engines, such as the Unreal engine, save you from having to implement the logic for interacting with 3D objects.

This article is the first in a series looking at popular 3D graphics APIs, and we begin with DirectX. The API of interest is Direct3D, as it is the one that directly competes with the other graphics API’s, such as OpenGL and Mantle.

DirectX is a set of multimedia API’s that Microsoft has developed as its answer to unified multimedia and game programming on its Windows platforms. It has roots back to 1994 with the development of Windows 95, when Microsoft realised they needed go give game and multimedia developers a way to interface with a system’s hardware.

The ‘X’ in Xbox is derived from DirectX – the codename for the original Xbox was DirectXbox. Working in collaboration with Nvidia to develop the console version of the API, this move was part of Microsoft’s strategy to bridge the worlds of console and PC game development.

Microsoft wholly-owns DirectX and its process of evolution, giving them some quality assurance checks on hardware drivers that support the DirectX API’s. To be allowed to put the DirectX logo on the box, hardware manufacturers and device driver developers have had to undergo a number of driver certification tests, something which OpenGL only recently started to perform again, since OpenGL 2.0.

Although it may seem like something that a dictatorial empire would want to do, having quality and conformance tests actually saves a lot of headaches for programmers, as it irons out the small problems that could result in extended alpha and beta testing periods and angry customers post-launch.

Direct3D had tough beginnings. In the earlier days it always came second to OpenGL, but a tenacious Microsoft was able to mature the API to a point where it could eventually contend on even terms with OpenGL, and in certain cases even surpass it.

Of course Microsoft’s OS monopoly on desktop PC’s has given it the advantage with DirectX, with a wide user base actively gaming on Windows able to put the API through its paces.

Owning the platform on which DirectX runs obviously means that Microsoft would always have its own interests at heart first, and would be more open to supporting DirectX than OpenGL.

It can be seen as bullish, but business is business.

More gaming news

Man defies conflagration to save Xbox

Drakengard 3 announced and dated

Naughty Dog mulls The Last Of Us 2

Forum discussion

Join the conversation

Introduction to 3D graphics API – DirectX

Related posts