OpenGL - Design

Design

The OpenGL specification describes an abstract API for drawing 2D and 3D graphics. Although it's possible for the API to be implemented entirely in software, it's designed to be implemented mostly or entirely in hardware. For example, the Microsoft Windows implementation of OpenGL will perform all of its rendering commands using a GPU, when one is available.

The API is defined as a number of functions which may be called by the client program, alongside a number of named integer constants (for example, the constant GL_TEXTURE_2D, which corresponds to the decimal number 3553). Although the function definitions are superficially similar to those of the C programming language, they are language-independent. As such, OpenGL has very many language bindings, some of the most noteworthy being the Javascript binding WebGL; the C bindings WGL, GLX and CGL; the C binding provided by iOS; and the Java and C bindings provided by Android.

As well as being language-independent, OpenGL is also platform-independent. The specification says nothing on the subject of obtaining, and managing, an OpenGL context, leaving this as a detail of the underlying windowing system. For the same reason, OpenGL is purely concerned with rendering - it provides no APIs related to input, audio or windowing. This is perhaps the greatest difference between OpenGL and its competitor, DirectX.

Read more about this topic:  OpenGL

Famous quotes containing the word design:

    To nourish children and raise them against odds is in any time, any place, more valuable than to fix bolts in cars or design nuclear weapons.
    Marilyn French (20th century)

    Joe ... you remember I said you wouldn’t be cheated?... Nobody is really. Eventually all things work out. There’s a design in everything.
    Sidney Buchman (1902–1975)

    I begin with a design for a hearse.
    For Christ’s sake not black—
    nor white either—and not polished!
    Let it be weathered—like a farm wagon—
    William Carlos Williams (1883–1963)