15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci SGI_complex 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_SGI_complex 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciVersion 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci $Date: 1996/10/01 21:31:49 $ $Revision: 1.4 $ 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNumber 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci 87 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciDependencies 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci EXT_abgr affects the definition of this extension 205bd8deadSopenharmony_ci EXT_texture3D affects the definition of this extension 215bd8deadSopenharmony_ci EXT_subtexture affects the definition of this extension 225bd8deadSopenharmony_ci EXT_histogram affects the definition of this extension 235bd8deadSopenharmony_ci EXT_convolution affects the definition of this extension 245bd8deadSopenharmony_ci SGI_color_table affects the definition of this extension 255bd8deadSopenharmony_ci SGIS_texture4D affects the definition of this extension 265bd8deadSopenharmony_ci EXT_cmyka affects the definition of this extension 275bd8deadSopenharmony_ci EXT_blend_minmax affects the definition of this extension 285bd8deadSopenharmony_ci EXT_blend_logicop affects the definition of this extension 295bd8deadSopenharmony_ci EXT_blend_subtract affects the definition of this extension 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciOverview 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci This extension extends the notion of color values to include 355bd8deadSopenharmony_ci complex color consisting of a real and imaginary parts or subcomponents 365bd8deadSopenharmony_ci for each color component. This extension defines the extended semantics 375bd8deadSopenharmony_ci for all operations that currently apply to color values. 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci The purpose of this extension is to provide the foundation for complex 405bd8deadSopenharmony_ci color processing. With this foundation in place further 415bd8deadSopenharmony_ci extensions can be added to define complex input formats, complex 425bd8deadSopenharmony_ci storage formats, and additional complex processing operations. 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ciIssues 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci * is there a better way? 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci * all multiplies of color*color become complex multiplies 495bd8deadSopenharmony_ci (texture environment, blending); is this overkill? 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci * scalar multiplies for fog and antialiasing coverage scale the 525bd8deadSopenharmony_ci real and imaginary components equally. is this okay? 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ciNew Procedures and Functions 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci None 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ciNew Tokens 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci None 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ciAdditions to Chapter 2 of the GL Specification (OpenGL Operation) 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci To Section 2.7 Vertex Specification 665bd8deadSopenharmony_ci 675bd8deadSopenharmony_ci Paragraph 3: 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ci Finally, there are several ways to set the current color. The GL stores 705bd8deadSopenharmony_ci both a current single-valued color index, and a current 4-valued complex 715bd8deadSopenharmony_ci RGBA color. One or the other of these is significant depending as the GL is 725bd8deadSopenharmony_ci in color index mode or RGBA mode. The mode selection is made when the GL is 735bd8deadSopenharmony_ci initialized. In RGBA mode state is maintained for both the real and 745bd8deadSopenharmony_ci imaginary parts of each component, but only the real part may be set. 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci Paragraph 5: 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci ... The initial RGBA color is (R, G, B, A) = ({1,0},{1,0},{1,0},{1,0}). 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci Section 2.12 Colors and Coloring 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci Paragraph 1: 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci Paragraph 2: 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci ... After lighting, both real and imaginary parts of RGBA colors are 885bd8deadSopenharmony_ci clamped to the range [0, 1]. 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci Section 2.12.1 Lighting 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci [ All colors expanded to complex ] 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci Section 2.12.6 Clamping or Masking 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci Paragraph 1: 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci ... After lighting, real and imaginary parts of RGBA colors are clamped 995bd8deadSopenharmony_ci to [0, 1]. ... 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci Section 2.12.8 Color and Texture Coordinate Clipping 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci [ are real and imaginary parts clipped independently? ] 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci Section 2.12.9 Final Color Processing 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci [ indicate the both real & imaginary components are converted and 1095bd8deadSopenharmony_ci stored as appropriate for the framebuffer ] 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ciAdditions to Chapter 3 of the GL Specification (Rasterization) 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci Section 3.2 Antialiasing 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci Paragraph 2: 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci In RGBA mode, the R, G, and B values of the rasterized fragment are 1195bd8deadSopenharmony_ci left unaffected, but the A value is multiplied by a floating-point real 1205bd8deadSopenharmony_ci value in the range [0, 1] that describes a fragment's screen coverage. 1215bd8deadSopenharmony_ci ... 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ci Section 3.6.3 Rasterization of Pixel Rectangles 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci Conversion to Complex (follows Conversion to floating point) 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci This step applies only to groups of components. It is no performed on 1285bd8deadSopenharmony_ci indices. Each element in a group is converted to a complex value by 1295bd8deadSopenharmony_ci setting the real part to the floating-point value computed in the 1305bd8deadSopenharmony_ci previous step and setting the imaginary part to zero. 1315bd8deadSopenharmony_ci 1325bd8deadSopenharmony_ci RGBA to RGBA Lookup 1335bd8deadSopenharmony_ci 1345bd8deadSopenharmony_ci ... First, each component is converted to a real value by discarding 1355bd8deadSopenharmony_ci the imaginary component and the real value is clamped to the range [0, 1]. 1365bd8deadSopenharmony_ci There is a table associated with each of the R, G, B, and A component 1375bd8deadSopenharmony_ci elements: PIXEL_MAP_R_TO_R for R, PIXEL_MAP_G_TO_G for G, PIXEL_MAP_B_TO_B 1385bd8deadSopenharmony_ci for B, and PIXEL_MAP_A_TO_A for A. Each element is multiplied by an integer 1395bd8deadSopenharmony_ci on less thanthe size of the corresponding table, and, for each element, 1405bd8deadSopenharmony_ci and address is found by rounding this value to the nearest integer. For 1415bd8deadSopenharmony_ci each element, the addressed value in the correspoding table replaces the 1425bd8deadSopenharmony_ci element. The real value is then converted to a complex value by assigning 1435bd8deadSopenharmony_ci zero to the imaginary part. 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ci Section 3.8 Texturing 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci Paragraph 2 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci ... The arguments width, height, format, type, and data correspond precisely 1505bd8deadSopenharmony_ci to the corresponding arguments to DrawPixels (refer to section 3.6.3); they 1515bd8deadSopenharmony_ci specify the image's width and height., a format of the image data, the type 1525bd8deadSopenharmony_ci of those data, and a pointer to the image data in memory. The image is taken 1535bd8deadSopenharmony_ci from memory exactly as if these arguments were passed to DrawPixels, but 1545bd8deadSopenharmony_ci the process stops just before final conversion. Both the real and imaginary 1555bd8deadSopenharmony_ci part of the complex R, G, B, and A value so extracted is clamped to [0, 1]. 1565bd8deadSopenharmony_ci ... 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci Section 3.8.3 Texture Environments and Texture Functions 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci Paragraph 1. 1615bd8deadSopenharmony_ci 1625bd8deadSopenharmony_ci ... TEXTURE_ENV_COLOR is set to a RGBA color by providing four 1635bd8deadSopenharmony_ci single-precision floating-point values in the range [0, 1]. (values 1645bd8deadSopenharmony_ci outside this range are clamped to it). The four values are assigned to 1655bd8deadSopenharmony_ci the real parts of the complex color; the imaginary parts are unchanged 1665bd8deadSopenharmony_ci from the default value of zero. If intergers are proivide for 1675bd8deadSopenharmony_ci TEXTURE_ENV_COLOR, then they are converted to floating-point as specified 1685bd8deadSopenharmony_ci in Table 2.4 for signed integers. 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ci Table 3.9 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci [ modify to show complex equations ] 1735bd8deadSopenharmony_ci 1745bd8deadSopenharmony_ci Paragraph 3. 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ci The state required for the current texture environment consists of the 1775bd8deadSopenharmony_ci three-valued integer indicating the texture function and four complex 1785bd8deadSopenharmony_ci floating-point TEXTURE_ENV_COLOR values. In the initial state, the 1795bd8deadSopenharmony_ci texture function is given by MODULATE and TEXTURE_ENV_COLOR is 1805bd8deadSopenharmony_ci ({0,0},{0,0},{0,0},{0,0}). 1815bd8deadSopenharmony_ci 1825bd8deadSopenharmony_ci Section 3.9 1835bd8deadSopenharmony_ci 1845bd8deadSopenharmony_ci Paragraph 5. 1855bd8deadSopenharmony_ci 1865bd8deadSopenharmony_ci ... The R, G, B, and A values of C sub f are specified by calling Fog 1875bd8deadSopenharmony_ci with <pname> equal to FOG_COLOR; in this case params points to four values 1885bd8deadSopenharmony_ci comprising the real part of C sub f. ... 1895bd8deadSopenharmony_ci 1905bd8deadSopenharmony_ci Paragraph 7. 1915bd8deadSopenharmony_ci 1925bd8deadSopenharmony_ci The state required for fog consists of a three valued integer to select 1935bd8deadSopenharmony_ci the fog equation, three floating-point values d, e, and s, and RGBA fog 1945bd8deadSopenharmony_ci color a fog color index, and a single bit to indicate whether or not fog 1955bd8deadSopenharmony_ci is enabled. In the initial state, fog is disabled, FOG_MODE is EXP, d = 1965bd8deadSopenharmony_ci 1.0, e = 1.0, and s = 0.0; C sub f = ({0,0},{0,0},{0,0},{0,0}) and i sub 1975bd8deadSopenharmony_ci f = 0. 1985bd8deadSopenharmony_ci 1995bd8deadSopenharmony_ci 2005bd8deadSopenharmony_ciAdditions to Chapter 4 of the GL Specification (Per-Fragment Operations 2015bd8deadSopenharmony_ciand the Framebuffer) 2025bd8deadSopenharmony_ci 2035bd8deadSopenharmony_ci Paragraph 3. 2045bd8deadSopenharmony_ci 2055bd8deadSopenharmony_ci Color buffers consist of either unsigned integer color indices or R, G, 2065bd8deadSopenharmony_ci B, and optionally A unsigned integer values storing the real parts of 2075bd8deadSopenharmony_ci pixel colors. 2085bd8deadSopenharmony_ci 2095bd8deadSopenharmony_ci 2105bd8deadSopenharmony_ci Section 4.1.3 Alpha test 2115bd8deadSopenharmony_ci 2125bd8deadSopenharmony_ci This step applies only in RGBA mode. In color index mode, proceed to the 2135bd8deadSopenharmony_ci next step. The alpha test discards a fragment conditional on the outcome 2145bd8deadSopenharmony_ci of a comparison between the incoming fragments's alpha real-part value 2155bd8deadSopenharmony_ci and a constant value. ... 2165bd8deadSopenharmony_ci 2175bd8deadSopenharmony_ci 2185bd8deadSopenharmony_ci Section 4.1.6 Blending 2195bd8deadSopenharmony_ci 2205bd8deadSopenharmony_ci [complex blending equations. the destination color imaginary subcomponent 2215bd8deadSopenharmony_ci is zero so the equations degenerate to the real equations, 2225bd8deadSopenharmony_ci GL_ONE is interpreted as {1,0} and GL_ZERO as {0,0} ] 2235bd8deadSopenharmony_ci 2245bd8deadSopenharmony_ci Section 4.3.2 Reading Pixels 2255bd8deadSopenharmony_ci 2265bd8deadSopenharmony_ci Conversion of RGBA values 2275bd8deadSopenharmony_ci 2285bd8deadSopenharmony_ci Paragraph 2. 2295bd8deadSopenharmony_ci 2305bd8deadSopenharmony_ci The R, G, and B (and possibly A) values form a group of elements. Each 2315bd8deadSopenharmony_ci element is taken to be a fixed-point value in [0,1] wiht m bits, where 2325bd8deadSopenharmony_ci m is the number of bits in the corresponding color component of the 2335bd8deadSopenharmony_ci selected buffer (see section 2.12.9). The corresponding color value 2345bd8deadSopenharmony_ci is assigned to the real-part of the resulting color. The imaginary 2355bd8deadSopenharmony_ci part is set to zero. 2365bd8deadSopenharmony_ci 2375bd8deadSopenharmony_ci Convolution 2385bd8deadSopenharmony_ci 2395bd8deadSopenharmony_ci [???] 2405bd8deadSopenharmony_ci 2415bd8deadSopenharmony_ci Color Tables 2425bd8deadSopenharmony_ci 2435bd8deadSopenharmony_ci [???] 2445bd8deadSopenharmony_ci 2455bd8deadSopenharmony_ci Histogram 2465bd8deadSopenharmony_ci 2475bd8deadSopenharmony_ci [???] 2485bd8deadSopenharmony_ci 2495bd8deadSopenharmony_ci Final Conversion 2505bd8deadSopenharmony_ci 2515bd8deadSopenharmony_ci For an index, if the type is not FLOAT, final conversion consists of 2525bd8deadSopenharmony_ci masking the index with the value given Table 4.6; if the type is FLOAT, 2535bd8deadSopenharmony_ci then the integer index is converted to a GL float data value. For a 2545bd8deadSopenharmony_ci component, each the real and imaginary parts are first clamped to [0,1] 2555bd8deadSopenharmony_ci Then the appropriate conversion formula from Table 4.7 is applied to the 2565bd8deadSopenharmony_ci both the real and imaginary parts of each component. 2575bd8deadSopenharmony_ci 2585bd8deadSopenharmony_ci 2595bd8deadSopenharmony_ciAdditions to Chapter 5 of the GL Specification (Special Functions) 2605bd8deadSopenharmony_ci 2615bd8deadSopenharmony_ci Section 5.1 Evaluators 2625bd8deadSopenharmony_ci 2635bd8deadSopenharmony_ci [ color maps evaluate to complex colors, by setting imaginary component to 2645bd8deadSopenharmony_ci zero ] 2655bd8deadSopenharmony_ci 2665bd8deadSopenharmony_ci Section 5.3 Feedback 2675bd8deadSopenharmony_ci 2685bd8deadSopenharmony_ci [ only real colors are returned. define new COLOR formats to get complex 2695bd8deadSopenharmony_ci colors ] 2705bd8deadSopenharmony_ci 2715bd8deadSopenharmony_ciAdditions to Chapter 6 of the GL Specification (State and State Requests) 2725bd8deadSopenharmony_ci 2735bd8deadSopenharmony_ci [ add GetComplexFloatv(enum value, float *data); redefined state tables ] 2745bd8deadSopenharmony_ci 2755bd8deadSopenharmony_ciAdditions to the GLX Specification 2765bd8deadSopenharmony_ci 2775bd8deadSopenharmony_ci None 2785bd8deadSopenharmony_ci 2795bd8deadSopenharmony_ciGLX Protocol 2805bd8deadSopenharmony_ci 2815bd8deadSopenharmony_ciErrors 2825bd8deadSopenharmony_ci 2835bd8deadSopenharmony_ci None 2845bd8deadSopenharmony_ci 2855bd8deadSopenharmony_ciNew State 2865bd8deadSopenharmony_ci 2875bd8deadSopenharmony_ci [ lots ? ] 2885bd8deadSopenharmony_ci 2895bd8deadSopenharmony_ciNew Implementation Dependent State 2905bd8deadSopenharmony_ci 2915bd8deadSopenharmony_ci None 292