15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci EXT_cmyka 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_EXT_cmyka 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciVersion 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci $Date: 1997/02/26 03:36:26 $ $Revision: 1.17 $ 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNumber 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci 18 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 275bd8deadSopenharmony_ciOverview 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ci This extension provides a simple method for OpenGL to read and store 305bd8deadSopenharmony_ci images whose pixels have CMYK or CMYKA formats. The algorithms used to 315bd8deadSopenharmony_ci convert to RGBA from CMYKA and to convert back from RGBA to CMYKA are of 325bd8deadSopenharmony_ci the "black-box" nature, meaning that the application has little control 335bd8deadSopenharmony_ci over how the conversion is done. Also, this black-box mechanism is 345bd8deadSopenharmony_ci available only for transfers to or from memory, not for internal copies 355bd8deadSopenharmony_ci of pixel data (such as invoked by CopyPixels, CopyTexImage1D, etc.) 365bd8deadSopenharmony_ci However, the defined mechanism nicely handles 5-component CMYKA images, 375bd8deadSopenharmony_ci and it is very easy to use. 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci A more configurable and potentially higher quality color conversion can 405bd8deadSopenharmony_ci be implemented using the color tables, the color matrix, and possibly 3D 415bd8deadSopenharmony_ci and 4D texture lookup. Such a color conversion also applies to copied 425bd8deadSopenharmony_ci pixel data. 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ciNew Procedures and Functions 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci None 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ciNew Tokens 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci Accepted by the <format> parameter of DrawPixels, ReadPixels, 515bd8deadSopenharmony_ci TexImage1D, TexImage2D, TexImage3DEXT, TexImage4DSGIS, TexSubImage1DEXT, 525bd8deadSopenharmony_ci TexSubImage2DEXT, TexSubImage3DEXT, TexSubImage4DSGIS, GetTexImage, 535bd8deadSopenharmony_ci ColorTableSGI, GetColorTableSGI, ConvolutionFilter1DEXT, 545bd8deadSopenharmony_ci ConvolutionFilter2DEXT, ConvolutionFilter3DEXT, GetConvolutionFilterEXT, 555bd8deadSopenharmony_ci SeparableFilter2DEXT, SeparableFilter3DEXT, GetSeparableFilterEXT, 565bd8deadSopenharmony_ci GetHistogramEXT, and GetMinmaxEXT: 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ci CMYK_EXT 0x800C 595bd8deadSopenharmony_ci CMYKA_EXT 0x800D 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci Accepted by the <target> parameter of Hint, and by the <pname> 625bd8deadSopenharmony_ci parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ci PACK_CMYK_HINT_EXT 0x800E 655bd8deadSopenharmony_ci UNPACK_CMYK_HINT_EXT 0x800F 665bd8deadSopenharmony_ci 675bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ci None 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization) 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ci Two entries are added to table 3.5 (DrawPixels and ReadPixels formats). 745bd8deadSopenharmony_ci The new table is: 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci Target 775bd8deadSopenharmony_ci Name Type Elements Buffer 785bd8deadSopenharmony_ci ---- ---- -------- ------ 795bd8deadSopenharmony_ci COLOR_INDEX Index Color Index Color 805bd8deadSopenharmony_ci STENCIL_INDEX Index Stencil value Stencil 815bd8deadSopenharmony_ci DEPTH_COMPONENT Component Depth value Depth 825bd8deadSopenharmony_ci RED Component R Color 835bd8deadSopenharmony_ci GREEN Component G Color 845bd8deadSopenharmony_ci BLUE Component B Color 855bd8deadSopenharmony_ci ALPHA Component A Color 865bd8deadSopenharmony_ci RGB Component R, G, B Color 875bd8deadSopenharmony_ci RGBA Component R, G, B, A Color 885bd8deadSopenharmony_ci LUMINANCE Component Luminance value Color 895bd8deadSopenharmony_ci LUMINANCE_ALPHA Component Luminance value, A Color 905bd8deadSopenharmony_ci ABGR_EXT Component A, B, G, R Color 915bd8deadSopenharmony_ci CMYK_EXT Component Cyan value, Color 925bd8deadSopenharmony_ci Magenta value, 935bd8deadSopenharmony_ci Yellow value, 945bd8deadSopenharmony_ci Black value 955bd8deadSopenharmony_ci CMYKA_EXT Component Cyan value, Color 965bd8deadSopenharmony_ci Magenta value, 975bd8deadSopenharmony_ci Yellow value, 985bd8deadSopenharmony_ci Black value, A 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ci Table 3.5: DrawPixels and ReadPixels formats. The third column 1015bd8deadSopenharmony_ci gives a description of and the number and order of elements in a 1025bd8deadSopenharmony_ci group. 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ci The new formats CMYK_EXT and CMYKA_EXT are added to the discussion of 1055bd8deadSopenharmony_ci Conversion to RGB. If the format is either of these two values, then 1065bd8deadSopenharmony_ci the cyan, magenta, yellow, and black values in each group are converted 1075bd8deadSopenharmony_ci to R, G, and B values using an undefined algorithm. The value of 1085bd8deadSopenharmony_ci UNPACK_CMYK_HINT_EXT determines whether the implementation uses its 1095bd8deadSopenharmony_ci fastest, nicest, or favorite algorithm to accomplish this conversion. 1105bd8deadSopenharmony_ci The unpacking conversion hint is specified by calling Hint with 1115bd8deadSopenharmony_ci parameter <target> set to UNPACK_CMYK_HINT_EXT, and parameter <mode> set 1125bd8deadSopenharmony_ci to FASTEST, NICEST, or DONT_CARE. If the format is CMYKA_EXT, the alpha 1135bd8deadSopenharmony_ci value is copied directly to A. 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 1165bd8deadSopenharmony_ciand the Framebuffer) 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci The new formats are added to the discussion of Obtaining Pixels from the 1195bd8deadSopenharmony_ci Framebuffer. It should read "If the <format> is LUMINANCE, 1205bd8deadSopenharmony_ci LUMINANCE_ALPHA, CMYK_EXT, or CMYKA_EXT, then R, G, B, and A values are 1215bd8deadSopenharmony_ci obtained. If the <format> is one of RED, GREEN, BLUE, ALPHA, RGB, RGBA, 1225bd8deadSopenharmony_ci ABGR_EXT, LUMINANCE, LUMINANCE_ALPHA, CMYK_EXT, or CMYKA_EXT, and the GL 1235bd8deadSopenharmony_ci is in color index mode, then the color index is obtained." 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci The new formats are added to the discussion of Index Lookup. It should 1265bd8deadSopenharmony_ci read "If <format> is one of RED, GREEN, BLUE, ALPHA, RGB, RGBA, 1275bd8deadSopenharmony_ci ABGR_EXT, LUMINANCE, LUMINANCE_ALPHA, CMYK_EXT, or CMYKA_EXT, then the 1285bd8deadSopenharmony_ci index is used to reference 4 tables of color components: 1295bd8deadSopenharmony_ci PIXEL_MAP_I_TO_R, PIXEL_MAP_I_TO_G, PIXEL_MAP_I_TO_B, and 1305bd8deadSopenharmony_ci PIXEL_MAP_I_TO_A." 1315bd8deadSopenharmony_ci 1325bd8deadSopenharmony_ci A new section, "Conversion to CMYK," is added immediately following the 1335bd8deadSopenharmony_ci section "Conversion to L." It reads: 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci This step applies only to RGBA component groups, and only if the 1365bd8deadSopenharmony_ci <format> is either CMYK_EXT or CMYKA_EXT. Values for cyan, magenta, 1375bd8deadSopenharmony_ci yellow, and black are computed from the R, G, and B values of the 1385bd8deadSopenharmony_ci pixel group using an undefined algorithm. These cyan, magenta, 1395bd8deadSopenharmony_ci yellow, and black values replace the R, G, and B values in the 1405bd8deadSopenharmony_ci group. The value of PACK_CMYK_HINT_EXT determines whether the 1415bd8deadSopenharmony_ci implementation uses its fastest, nicest, or favorite algorithm to 1425bd8deadSopenharmony_ci accomplish this conversion. The packing conversion hint is 1435bd8deadSopenharmony_ci specified by calling Hint with parameter <target> set to 1445bd8deadSopenharmony_ci PACK_CMYK_HINT_EXT, and parameter <mode> set to FASTEST, NICEST, or 1455bd8deadSopenharmony_ci DONT_CARE. 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions) 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci None 1505bd8deadSopenharmony_ci 1515bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests) 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ci Although PACK_CMYK_HINT_EXT and UNPACK_CMYK_HINT_EXT are modified using 1545bd8deadSopenharmony_ci the Hint interface, they are not included in the hint attribute set. 1555bd8deadSopenharmony_ci Rather, they are part of pixel storage state, meaning that they are not 1565bd8deadSopenharmony_ci pushed and popped by PushAttributes and PopAttributes, and that they are 1575bd8deadSopenharmony_ci client state rather than server state. Also, like all other pixel 1585bd8deadSopenharmony_ci storage parameters, the CMYK hint modes in effect when a pixel command 1595bd8deadSopenharmony_ci (such as DrawPixels) is placed in a display list control the 1605bd8deadSopenharmony_ci interpretation of memory data. The CMYK hints in effect when a display 1615bd8deadSopenharmony_ci list is executed are not significant. 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ciAdditions to the GLX Specification 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci None 1665bd8deadSopenharmony_ci 1675bd8deadSopenharmony_ciGLX Protocol 1685bd8deadSopenharmony_ci 1695bd8deadSopenharmony_ci None 1705bd8deadSopenharmony_ci 1715bd8deadSopenharmony_ciDependencies on EXT_abgr 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ci If EXT_abgr is not implemented, then references to ABGR_EXT in this 1745bd8deadSopenharmony_ci specification are void. 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ciDependencies on EXT_texture3D 1775bd8deadSopenharmony_ci 1785bd8deadSopenharmony_ci If EXT_texture3D is not implemented, then references to TexImage3DEXT, 1795bd8deadSopenharmony_ci TexSubImage3DEXT, ConvolutionFilter3DEXT, and SeparableFilter3DEXT in 1805bd8deadSopenharmony_ci this specification are void. 1815bd8deadSopenharmony_ci 1825bd8deadSopenharmony_ciDependencies on EXT_subtexture 1835bd8deadSopenharmony_ci 1845bd8deadSopenharmony_ci If EXT_subtexture is not implemented, then references to 1855bd8deadSopenharmony_ci TexSubImage1DEXT, TexSubImage2DEXT, TexSubImage3DEXT, and 1865bd8deadSopenharmony_ci TexSubImage4DSGIS in this specification are void. 1875bd8deadSopenharmony_ci 1885bd8deadSopenharmony_ciDependencies on EXT_histogram 1895bd8deadSopenharmony_ci 1905bd8deadSopenharmony_ci If EXT_histogram is not implemented, then references to GetHistogramEXT 1915bd8deadSopenharmony_ci and GetMinmaxEXT in this extension are void. 1925bd8deadSopenharmony_ci 1935bd8deadSopenharmony_ciDependencies on EXT_convolution 1945bd8deadSopenharmony_ci 1955bd8deadSopenharmony_ci If EXT_convolution is not implemented, then references to 1965bd8deadSopenharmony_ci ConvolutionFilter1DEXT, ConvolutionFilter2DEXT, ConvolutionFilter3DEXT, 1975bd8deadSopenharmony_ci GetConvolutionFilterEXT, SeparableFilter2DEXT, SeparableFilter3DEXT, and 1985bd8deadSopenharmony_ci GetSeparableFilterEXT in this extension are void. 1995bd8deadSopenharmony_ci 2005bd8deadSopenharmony_ciDependencies on SGI_color_table 2015bd8deadSopenharmony_ci 2025bd8deadSopenharmony_ci If SGI_color_table is not implemented, then references to ColorTableSGI 2035bd8deadSopenharmony_ci and GetColorTableSGI in this extension are void. 2045bd8deadSopenharmony_ci 2055bd8deadSopenharmony_ciDependencies on SGIS_texture4D 2065bd8deadSopenharmony_ci 2075bd8deadSopenharmony_ci If SGIS_texture4D is not implemented, then references to TexImage4DSGIS 2085bd8deadSopenharmony_ci and TexSubImage4DSGIS in this extension are void. 2095bd8deadSopenharmony_ci 2105bd8deadSopenharmony_ciErrors 2115bd8deadSopenharmony_ci 2125bd8deadSopenharmony_ci None 2135bd8deadSopenharmony_ci 2145bd8deadSopenharmony_ciNew State 2155bd8deadSopenharmony_ci 2165bd8deadSopenharmony_ci Get Value Get Command Type Initial Value Attrib 2175bd8deadSopenharmony_ci --------- ----------- ---- ------------- ------ 2185bd8deadSopenharmony_ci PACK_CMYK_HINT_EXT GetIntegerv Z3 DONT_CARE client 2195bd8deadSopenharmony_ci UNPACK_CMYK_HINT_EXT GetIntegerv Z3 DONT_CARE client 2205bd8deadSopenharmony_ci 2215bd8deadSopenharmony_ciNew Implementation Dependent State 2225bd8deadSopenharmony_ci 2235bd8deadSopenharmony_ci None 224