15-06-2012, 02:23 PM
OpenGL graphics system
gl technologicssssss.docx (Size: 742 KB / Downloads: 33)
INTRODUCTION OPENGL :
This document describes the OpenGL graphics system: what it is, how it acts, and what is required to implement it. We assume that the reader has at least a rudi¬mentary understanding of computer graphics. This means familiarity with the es¬sentials of computer graphics algorithms as well as familiarity with basic graphics hardware and associated terms.
Formatting of Optional Features :
Starting with version 1.2 of OpenGL, some features in the specification are consid-ered optional; an OpenGL implementation may or may not choose to provide them Portions of the specification which are optional are so described where the optional features are first defined . State table entries which are optional are typeset against a gray background.
What is the OpenGL Graphics System?
OpenGL (for “Open Graphics Library”) is a software interface to graphics hard-ware. The interface consists of a set of several hundred procedures and functions that allow a programmer to specify the objects and operations involved in produc¬ing high-quality graphical images, specifically color images of three-dimensional objects.
Most of OpenGL requires that the graphics hardware contain a framebuffer. Many OpenGL calls pertain to drawing objects such as points, lines, polygons, and bitmaps, but the way that some of this drawing occurs (such as when antialiasing or texturing is enabled) relies on the existence of a framebuffer. Further, some of OpenGL is specifically concerned with framebuffer manipulation.
Programmer’s View of OpenGL :
To the programmer, OpenGL is a set of commands that allow the specification of geometric objects in two or three dimensions, together with commands that control how these objects are rendered into the framebuffer. For the most part, OpenGL provides an immediate-mode interface, meaning that specifying an object causes it to be drawn.
A typical program that uses OpenGL begins with calls to open a window into the framebuffer into which the program will draw. Then, calls are made to allocate a GL context and associate it with the window. Once a GL context is allocated, the programmer is free to issue OpenGL commands. Some calls are used to draw simple geometric objects (i.e. points, line segments, and polygons), while others affect the rendering of these primitives including how they are lit or colored and how they are mapped from the user’s two- or three-dimensional model space to the two-dimensional screen. There are also calls to effect direct control of the framebuffer, such as reading and writing pixels.
Implementor’s View of OpenGL :
To the implementor, OpenGL is a set of commands that affect the operation of graphics hardware. If the hardware consists only of an addressable framebuffer, then OpenGL must be implemented almost entirely on the host CPU. More typi¬cally, the graphics hardware may comprise varying degrees of graphics accelera¬tion, from a raster subsystem capable of rendering two-dimensional lines
and poly¬gons to sophisticated floating-point processors capable of transforming and com¬puting on geometric data. The OpenGL implementor’s task is to provide the CPU software interface while dividing the work for each OpenGL command between the CPU and the graphics hardware. This division must be tailored to the available graphics hardware to obtain optimum performance in carrying out OpenGL calls.
OpenGL maintains a considerable amount of state information. This state con¬trols how objects are drawn into the framebuffer. Some of this state is directly available to the user: he or she can make calls to obtain its value. Some of it, how-ever, is visible only by the effect it has on what is drawn. One of the main goals of this specification is to make OpenGL state information explicit, to elucidate how it changes, and to indicate what its effects are.