Computer Graphics

Utah Teapot (1975)

Computer graphics, as the name suggests, involves the creation of images on computers. Thanks to technological advances and decades of refinement, graphic programming has come a long way. Today, computer graphics are used in a variety of sectors, including games, movies, art, etc. Thus, many devices, such as smartphones, game consoles, and personal computers, use computer graphics as a core technology.

An API is an application programming interface, and a graphics API is an interface that allows us (the programmers) to send instructions to the graphics card. Some of the most popular graphics APIs include:

  • OpenGL
  • Vulkan
  • DirectX (Microsoft)
  • Metal (Apple)


Which one do I choose?

Due to the popularity of the Windows operating system, DirectX is arguably the most popular API of the ones listed and has decent documentation. However, many graphics programmers opt to use OpenGL and Vulkan due to their cross-platform capabilities. OpenGL and Vulkan are free and open-source, allowing hardware manufacturers to support these APIs on many devices.

It is worth noting that OpenGL is no longer being updated (OpenGL 4.6 was released on 31 July 2017). Khronos Group, the developers of OpenGL, are invested in developing the Vulkan API and have dropped active development of OpenGL. Despite this, OpenGL remains popular due to its relative ease of use, maturity, and availability of documentation and guides. Conversely, Vulkan is a newer API that acts as a spiritual successor to OpenGL. Vulkan has been in development since 2016; therefore, its documentation lacks the maturity of other graphics APIs. The largest difference between Vulkan and OpenGL is verbosity. Vulkan is very explicit compared to OpenGL, requiring more code to do the same task as OpenGL. This verbosity is beneficial, as the programmer has more control over the program.

TL;DR

Cross-platform? Use Vulkan or OpenGL.

Microsoft platforms? Use DirectX.

Apple platforms? Use Metal.

There are hundreds of topics in computer graphics. It would be impossible to make articles of them all. Here are some topics in computer graphics that have stood out to me: