Real-Time Shading

Chapter 18: APIs

Overview

A shading API (application programming interface) is the interface an application uses to specify and control the shading programs run by a graphics accelerator. A detailed survey of graphics APIs is beyond the scope of this book. We will, however, present three representative and complementary examples of research-level APIs, or at least their shading subsystems. We will assume the reader is already familiar with OpenGL and DX8/9 and the various shading extensions supported by hardware vendors. The purpose of this chapter is not to act as a reference to existing APIs, but to illuminate some design choices that may influence the development of future APIs.

Two of the examples we will present support high-level shading programs written in a specialized external shading language. This is in contrast to the current machine-instruction-level OpenGL extensions used by NVIDIA and ATI to control their vertex shaders, register combiners, and fragment shaders [11, 12, 128]. Our discussion of these two APIs will focus on the integration of the shaders with the existing OpenGL API, rather than the languages themselves. The third example also starts with a low-level interface, similar in fact to that now used by ATI to specify shaders. In contrast to the use of a separate shading language with programs stored in strings or files, this API specifies instructions one function call at a time, thus avoiding the use of a parser, while making metaprogramming easier. This style of interface can make it easier to add a hierarchy of higher-level API...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Bus Analysis Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.