3D APIs

3D APIs

This is a smart resource. Use a QR reader or the Aurasma app to access additional content.

What is an API?

An API, or application programming interface, is a set of definitions that determines how one set of software communicates with another set of software. In games this relates to the low level software, known as machine code, which is the code that is understood by hardware such as processors and graphics cards and high level software such as C or Java which might be used in the coding of games. Games need to use the advanced features of the hardware in order to create the high end graphics we have come to expect and so it is the graphics APIs that work to convert the instructions from the high level programming languages to the low level languages that the hardware understands.


Here’s an abstract example;

Imagine a man with no arms. Let's call him Hans. Hans speaks German. He represents our game written in one of the high level programming languages and he wants to draw a picture. Now imagine a second man. He’s called Pierre and he speaks French. He has arms as well as an easel, canvas and some lovely arty materials. He’s very capable of drawing something but lacks the creativity to do so. He’d like someone to tell him what to draw. Pierre and his arty materials represent the hardware and the low level machine code.  Hans tries to tell Pierre what he’d like to draw but as they don’t speak the language it just doesn’t work.

That’s where Geoff comes in. Geoff speaks both German and French and so can interpret for Hans so that he can now effectively communicate to Pierre the beautiful image that he’d like to create. Geoff is our API and he had made this beautiful image possible.









So now that we’ve covered what graphics APIs are we need to cover the two main APIs used in the gaming sector. These are Direct3D, part of the DirectX API and OpenGL.


DirectX

DirectX is a collection of technologies first developed by Microsoft in the mid 1990s and was released with windows 95. It has also been included in every version of Windows since. This set of technologies included several APIs designed for use in game development as well as other multimedia applications. This API allowed these games and application to talk to the hardware. DIrectX is composed of a range of APIs covering 3D and 2D graphics, input, sound and networking but we’re only really interested in the 3D graphics API known as Direct3D. Direct3D is used for PC gaming on machines running Windows as well as on the Xbox, Xbox 360 and Xbox One. This is actually how the original Xbox got its name. During development of the console, Microsoft internally referred to it as the DirectXbox. By the time the console was released the direct part has been dropped from the name and the Xbox brand as we now know it had been born. DirectX is currently up to version 11 but Microsoft has announced that DirectX 12 is targeted for holiday 2015 games and the upgrade will also be applied to Xbox One.


OpenGL

OpenGL, which stands for Open Graphics Library, is an alternative to DirectX and generally offers the same functions to game developers as it also offers access to the low level functions of graphics hardware. One of the main advantages of this API is that it runs on many different platforms. It is used on Windows, Mac OS and Linux as well as on portable devices such as iPhones, iPads and Android powered phones and tablets. These portable devices use a cut down version known as OpenGL ES. Tweaked versions of OpenGL have also powered all of the playstation consoles. OpenGL was originally developed by Silicon Graphics, Inc but from 1992 the development has been overseen by  the OpenGL Architecture Review Board (ARC) which is made up of major graphics vendors and other industry leaders such as ATI, Intel and Nvidia. in 2006 control of OpenGL was passed to the Khronos group which is made of of the same companies as the ARC. The current release of OpenGL is version 4.4.


What do graphics APIs do?

The reason that APIs such as Direct3D and openGL are used is that they make the advanced capabilities of graphics cards available to the developers. This includes features such as z-buffering, mipmapping and atmospheric effects. Developers can take advantage of these features without having to program them from scratch as they are made available in the common libraries of the APIs. This saves a lot of time but also ensures that these features will work with a variety of graphics hardware as graphics cards supporting Direct3D or OpenGL must adhere to the standards set out by the companies responsible for maintaining the APIs.



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值