15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci SGIX_pixel_texture 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_SGIX_pixel_texture 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciVersion 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Last Modified Date: January 17, 2017 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNumber 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci 499 165bd8deadSopenharmony_ci (previously #15a, which collided with SGIS_pixel_texture) 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciDependencies 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci None 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciOverview 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci This extension allows the color components of pixel groups to be used as 255bd8deadSopenharmony_ci texture coordinates, effectively converting a color image into a texture 265bd8deadSopenharmony_ci coordinate image. Because texture mapping is essentially a 275bd8deadSopenharmony_ci multidimensional table lookup, this conversion supports multidimensional 285bd8deadSopenharmony_ci color lookups for images. Such multidimensional lookups can be used to 295bd8deadSopenharmony_ci implement very accurate color space conversions. 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ciIssues 325bd8deadSopenharmony_ci 335bd8deadSopenharmony_ci * Should LOD be supported? 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ciNew Procedures and Functions 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ci void PixelTexGenSGIX(enum mode); 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ciNew Tokens 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ci Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and 425bd8deadSopenharmony_ci by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and 435bd8deadSopenharmony_ci GetDoublev: 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ci PIXEL_TEX_GEN_SGIX = 0x8139 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, 485bd8deadSopenharmony_ci and GetDoublev: 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci PIXEL_TEX_GEN_MODE_SGIX = 0x832B 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci None 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization) 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ci This extension modifies the "Conversion to Fragments" subsection of 595bd8deadSopenharmony_ci section 3.6.3 (Rasterization of Pixel Rectangles) of the GL 605bd8deadSopenharmony_ci Specification. The paragraph beginning with "A fragment arising from a 615bd8deadSopenharmony_ci group consisting of color data ..." is replaced by the following: 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci A fragment arising from a group consisting of color index data takes on 645bd8deadSopenharmony_ci the color index of the group; the depth and texture coordinates are 655bd8deadSopenharmony_ci taken from the current raster positions associated data. Likewise, a 665bd8deadSopenharmony_ci fragment arising from a depth component takes the component's depth 675bd8deadSopenharmony_ci value; the color and texture coordinates are given by those associated 685bd8deadSopenharmony_ci with the current raster position. Groups arising from DrawPixels with a 695bd8deadSopenharmony_ci <format> of STENCIL_INDEX are treated specially and are described in 705bd8deadSopenharmony_ci section 4.3.1. 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci The treatment of fragments arising from groups consisting of RGBA color 735bd8deadSopenharmony_ci data is affected by pixel texgen, which is enabled and disabled by 745bd8deadSopenharmony_ci calling Enable and Disable with PIXEL_TEX_GEN_SGIX passed as the <cap> 755bd8deadSopenharmony_ci parameter. 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci When pixel texgen enabled, a fragment arising from a group consisting of 785bd8deadSopenharmony_ci RGBA color data takes its depth component from the current raster position 795bd8deadSopenharmony_ci depth, and the texture coordinates are assigned as follows: 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci Pixel group's red becomes the fragment S texture coordinate 825bd8deadSopenharmony_ci Pixel group's green becomes the fragment T texture coordinate 835bd8deadSopenharmony_ci Pixel group's blue becomes the fragment R texture coordinate 845bd8deadSopenharmony_ci Pixel group's alpha becomes the fragment Q texture coordinate 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci The assignment of the fragment color components is determined by value of 875bd8deadSopenharmony_ci PIXEL_TEX_GEN_MODE_SGIX as defined as defined by the following table: 885bd8deadSopenharmony_ci 895bd8deadSopenharmony_ci PIXEL_TEX_GEN_MODE_SGIX Fragment's color component value 905bd8deadSopenharmony_ci value R G B A 915bd8deadSopenharmony_ci ----------------------- ------- ------- ------- ------- 925bd8deadSopenharmony_ci NONE PG's R PG's G PG's B PG's A 935bd8deadSopenharmony_ci ALPHA PG's R PG's G PG's B CRP's A 945bd8deadSopenharmony_ci RGB CRP's R CRP's G CRP's B PG's A 955bd8deadSopenharmony_ci RGBA CRP's R CRP's G CRP's B CRP's A 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci Assignment of pixel group and current raster position color data to a 985bd8deadSopenharmony_ci fragment arising from an RGBA color pixel group when pixel texgen is 995bd8deadSopenharmony_ci enabled. The value of PIXEL_TEX_GEN_MODE_SGIX in the first column 1005bd8deadSopenharmony_ci controls the assignment of fragment color components in second thru the 1015bd8deadSopenharmony_ci fifth columns. PG, CRP, R, G, B, A are abbreviations of "current raster 1025bd8deadSopenharmony_ci position", "pixel group", "red", "green", "blue", and "alpha" 1035bd8deadSopenharmony_ci respectively. 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ci The <mode> parameter of PixelTexGenSGIX is used to set the value of 1065bd8deadSopenharmony_ci PIXEL_TEX_GEN_MODE_SGIX. (It is NONE by default.) 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 1095bd8deadSopenharmony_ciand the Frame Buffer) 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci The operation of pixel texgen during pixel copy operations is 1125bd8deadSopenharmony_ci identical to the operation during pixel drawing. Because PixelTexGenSGIX 1135bd8deadSopenharmony_ci defines the rasterization of pixel groups, it has no effect on texture 1145bd8deadSopenharmony_ci definitions or on pixel query (ReadPixels) operations. 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions) 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci None 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests) 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci None 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ciAdditions to the GLX Specification 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci None 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ciErrors 1295bd8deadSopenharmony_ci 1305bd8deadSopenharmony_ci INVALID_ENUM is generated if PixelTexGenSGIX parameter <mode> is not NONE, 1315bd8deadSopenharmony_ci ALPHA, RGB, or RGBA. 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci INVALID_OPERATION is generated if PixelTexGenSGIX is called between 1345bd8deadSopenharmony_ci execution of Begin and the execution of the corresponding End. 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ciNew State 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci Get Value Get Command Type Initial Value Attrib 1395bd8deadSopenharmony_ci --------- ----------- ---- ------------- ------ 1405bd8deadSopenharmony_ci PIXEL_TEX_GEN_SGIX IsEnabled B FALSE pixel 1415bd8deadSopenharmony_ci PIXEL_TEX_GEN_MODE_SGIX GetIntegerv Z4 NONE pixel 1425bd8deadSopenharmony_ci 1435bd8deadSopenharmony_ciNew Implementation Dependent State 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ci None 146