Skip to main content
GameDev.net gamedev.net
🔒 Locked

APIs

Started by thnbgr Aug 27, 2006 at 10:34 PM 4 replies 650+ views
Original Post
thnbgr
thnbgr
I have a basic idea about APIs but could someone explain it better, as in what it is and stuff? Thanks
smitty1276
smitty1276
Application Programming Interface. It is a library of specialized functions and datatypes that you can use to write programs.

Do you have a specific question?
JohnBolton
JohnBolton
An API is the interface for a library -- the types, functions, and data that the library provides. Sometimes people might also use "API" to mean the library itself.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
PhilMorton
PhilMorton
Adding to what has been said, common APIs include -
Direct3D - a graphics API
OpenAL - a sound API

But anything can be an API... If you wrote a collection of useful functions, you could give it to people to use, and call it an API.

The main reason people call them APIs and not just "code libraries" is because usually you only have access to an 'interface' to use the code.

E.g. Direct X gives you the header files, and libraries/DLLs that you can link to (and example source code), but they dont actually give you the source code that was used to make Direct X. This means you can use their headers/libs to call their functions, but you cant edit their code. Hence its an interface that an application programmer can use.
Allways question authority......unless you're on GameDev.net, then it will hurt your rating very badly so just shut the fuck up.
Tachikoma
Tachikoma
A better way to think what APIs are, they actually serve as an abstraction layer for something more complex. For example, OpenGL is a general purpose (and standardised) library that allows you to utilise graphics hardware without being concerned about the low-level technical details of each graphics hardware.
thnbgr
thnbgr
Alright! Thanks!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.