Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / What EXACTLY Is An API?

Author
Message
Dark Java Dude 64
Community Leader
14
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 4th Aug 2011 02:16 Edited at: 4th Aug 2011 02:17
So i know this probably sounds like a stupid question, but API's are defined so incredibly broadly that it's rather hard to figure out exactly what they do. For example, i know Direct 3D is an API. If i were to make a 3D object in a program, would D3D tell the program how to communicate with the program that communicates with the graphics card, or would it be an interface directly to the card? Im guessing the first, and im also guessing that that program would be the device management part of the OS? Answers appreciated! Thanks!

BlackFox
FPSC Master
17
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 4th Aug 2011 02:32
Definition:

"API stands for "Application Program Interface," though it is sometimes referred to as an "Application Programming Interface."

An API is a set of commands, functions, and protocols which programmers can use when building software for a specific operating system. The API allows programmers to use predefined functions to interact with the operating system, instead of writing them from scratch."

All computer operating systems, such as Windows, Unix, and the Mac OS, provide an application program interface for programmers. APIs are also used by video game consoles and other hardware devices that can run software programs. While the API makes the programmer's job easier, it also benefits the end user, since it ensures all programs using the same API will have a similar user interface.

- BlackFox
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 4th Aug 2011 02:34
I consider an API to be any set of include files and library files (or just source files). More broadly... it's any group of functions that interface with your program.


Why does blue text appear every time you are near?
Dark Java Dude 64
Community Leader
14
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 4th Aug 2011 02:40
I see... But when i make a 3D object, is my program communicating with another program or the graphics card directly? But yes, those are good ways to think of API's! Thanks!

Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 4th Aug 2011 02:53
Everything sits behind abstractions layers.. So your program communicates with the device through a common interface, be it D3D/ GL whatever floats your boat.

So Program -> Interface (D3D/Gl) -> Driver -> Hardware

Dark Java Dude 64
Community Leader
14
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 4th Aug 2011 02:55
Ahh, now THAT answered my question well! Thanks! I can see why you are a valued member.

Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 6th Aug 2011 13:20 Edited at: 6th Aug 2011 13:42
It's actually his body popping skills that made him a valued member. Video here ...
http://www.youtube.com/watch?v=UYFDYX4i2EY

Honest!

Dark Java Dude 64
Community Leader
14
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 8th Aug 2011 03:20
Haha is that really Kevin?

Login to post a reply

Server time is: 2025-05-20 21:05:37
Your offset time is: 2025-05-20 21:05:37