
- •Introduction
- •Formatting of Optional Features
- •What is the OpenGL Graphics System?
- •Our View
- •Companion Documents
- •OpenGL Operation
- •OpenGL Fundamentals
- •Floating-Point Computation
- •GL State
- •GL Command Syntax
- •Basic GL Operation
- •GL Errors
- •Begin/End Paradigm
- •Begin and End
- •Polygon Edges
- •GL Commands within Begin/End
- •Vertex Specification
- •Vertex Arrays
- •Buffer Objects
- •Vertex Arrays in Buffer Objects
- •Array Indices in Buffer Objects
- •Rectangles
- •Coordinate Transformations
- •Controlling the Viewport
- •Matrices
- •Normal Transformation
- •Generating Texture Coordinates
- •Clipping
- •Current Raster Position
- •Colors and Coloring
- •Lighting
- •ColorMaterial
- •Lighting State
- •Color Index Lighting
- •Clamping or Masking
- •Flatshading
- •Color and Associated Data Clipping
- •Final Color Processing
- •Vertex Shaders
- •Shader Objects
- •Program Objects
- •Shader Variables
- •Shader Execution
- •Required State
- •Rasterization
- •Invariance
- •Antialiasing
- •Multisampling
- •Points
- •Basic Point Rasterization
- •Point Rasterization State
- •Point Multisample Rasterization
- •Line Segments
- •Basic Line Segment Rasterization
- •Other Line Segment Features
- •Line Rasterization State
- •Line Multisample Rasterization
- •Polygons
- •Basic Polygon Rasterization
- •Stippling
- •Antialiasing
- •Options Controlling Polygon Rasterization
- •Depth Offset
- •Polygon Multisample Rasterization
- •Polygon Rasterization State
- •Pixel Rectangles
- •Pixel Storage Modes
- •The Imaging Subset
- •Pixel Transfer Modes
- •Rasterization of Pixel Rectangles
- •Pixel Transfer Operations
- •Pixel Rectangle Multisample Rasterization
- •Bitmaps
- •Texturing
- •Compressed Texture Images
- •Texture Parameters
- •Depth Component Textures
- •Cube Map Texture Selection
- •Texture Wrap Modes
- •Texture Completeness
- •Texture State and Proxy State
- •Texture Objects
- •Texture Environments and Texture Functions
- •Texture Comparison Modes
- •Texture Application
- •Color Sum
- •Fragment Shaders
- •Shader Variables
- •Shader Execution
- •Antialiasing Application
- •Multisample Point Fade
- •Per-Fragment Operations
- •Pixel Ownership Test
- •Scissor Test
- •Multisample Fragment Operations
- •Alpha Test
- •Stencil Test
- •Depth Buffer Test
- •Occlusion Queries
- •Blending
- •Dithering
- •Logical Operation
- •Additional Multisample Fragment Operations
- •Whole Framebuffer Operations
- •Selecting a Buffer for Writing
- •Fine Control of Buffer Updates
- •Clearing the Buffers
- •The Accumulation Buffer
- •Drawing, Reading, and Copying Pixels
- •Writing to the Stencil Buffer
- •Reading Pixels
- •Copying Pixels
- •Pixel Draw/Read State
- •Special Functions
- •Evaluators
- •Selection
- •Feedback
- •Display Lists
- •Flush and Finish
- •Hints
- •State and State Requests
- •Querying GL State
- •Simple Queries
- •Data Conversions
- •Enumerated Queries
- •Texture Queries
- •Stipple Query
- •Color Matrix Query
- •Color Table Query
- •Convolution Query
- •Histogram Query
- •Minmax Query
- •Pointer and String Queries
- •Occlusion Queries
- •Buffer Object Queries
- •Shader and Program Queries
- •Saving and Restoring State
- •State Tables
- •Invariance
- •Corollaries
- •Version 1.1
- •Version 1.2
- •Imaging Subset
- •Version 1.2.1
- •Version 1.3
- •Version 1.4
- •Fog Coordinate
- •Texture LOD Bias
- •Version 1.5
- •Version 2.0
- •ARB Extensions
- •Texture Mirrored Repeat
- •OpenGL Shading Language

4.2. WHOLE FRAMEBUFFER OPERATIONS |
217 |
operations described in the last section (4.2.2) are also effective. If a buffer is not present, then a Clear directed at that buffer has no effect.
The state required for clearing is a clear value for each of the color buffer, the depth buffer, the stencil buffer, and the accumulation buffer. Initially, the RGBA color clear value is (0,0,0,0), the clear color index is 0, and the stencil buffer and accumulation buffer clear values are all 0. The depth buffer clear value is initially 1.0.
Clearing the Multisample Buffer
The color samples of the multisample buffer are cleared when one or more color buffers are cleared, as specified by the Clear mask bit COLOR BUFFER BIT and the DrawBuffer mode. If the DrawBuffer mode is NONE, the color samples of the multisample buffer cannot be cleared.
If the Clear mask bits DEPTH BUFFER BIT or STENCIL BUFFER BIT are set, then the corresponding depth or stencil samples, respectively, are cleared.
4.2.4 The Accumulation Buffer
Each portion of a pixel in the accumulation buffer consists of four values: one for each of R, G, B, and A. The accumulation buffer is controlled exclusively through the use of
void Accum( enum op, float value );
(except for clearing it). op is a symbolic constant indicating an accumulation buffer operation, and value is a floating-point value to be used in that operation. The possible operations are ACCUM, LOAD, RETURN, MULT, and ADD.
When the scissor test is enabled (section 4.1.2), then only those pixels within the current scissor box are updated by any Accum operation; otherwise, all pixels in the window are updated. The accumulation buffer operations apply identically to every affected pixel, so we describe the effect of each operation on an individual pixel. Accumulation buffer values are taken to be signed values in the range [−1, 1]. Using ACCUM obtains R, G, B, and A components from the buffer currently selected for reading (section 4.3.2). Each component, considered as a fixed-point value in [0, 1]. (see section 2.14.9), is converted to floating-point. Each result is then multiplied by value. The results of this multiplication are then added to the corresponding color component currently in the accumulation buffer, and the resulting color value replaces the current accumulation buffer color value.
Version 2.0 - October 22, 2004