1Name 2 3 SGIS_generate_mipmap 4 5Name Strings 6 7 GL_SGIS_generate_mipmap 8 9Version 10 11 $Date: 1997/02/26 03:36:30 $ $Revision: 1.6 $ 12 13Number 14 15 32 16 17Dependencies 18 19 EXT_texture is required 20 EXT_texture3D affects the definition of this extension 21 EXT_texture_object affects the definition of this extension 22 SGIS_texture_lod affects the definition of this extension 23 24Overview 25 26 This extension defines a mechanism by which OpenGL can derive the 27 entire set of mipmap arrays when provided with only the base level 28 array. Automatic mipmap generation is particularly useful when 29 texture images are being provided as a video stream. 30 31Issues 32 33 * How are edges handled? 34 35New Procedures and Functions 36 37 None 38 39New Tokens 40 41 Accepted by the <pname> parameter of TexParameteri, TexParameterf, 42 TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv: 43 44 GENERATE_MIPMAP_SGIS 0x8191 45 46 Accepted by the <target> parameter of Hint, and by the <pname> 47 parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: 48 49 GENERATE_MIPMAP_HINT_SGIS 0x8192 50 51Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 52 53 None 54 55Additions to Chapter 3 of the 1.0 Specification (Rasterization) 56 57 GL Specification Table 3.7 is updated as follows: 58 59 Name Type Legal Values 60 ---- ---- ------------ 61 TEXTURE_WRAP_S integer CLAMP, REPEAT 62 TEXTURE_WRAP_T integer CLAMP, REPEAT 63 TEXTURE_WRAP_R_EXT integer CLAMP, REPEAT 64 TEXTURE_MIN_FILTER integer NEAREST, LINEAR, 65 NEAREST_MIPMAP_NEAREST, 66 NEAREST_MIPMAP_LINEAR, 67 LINEAR_MIPMAP_NEAREST, 68 LINEAR_MIPMAP_LINEAR, 69 FILTER4_SGIS 70 TEXTURE_MAG_FILTER integer NEAREST, LINEAR, 71 FILTER4_SGIS, 72 LINEAR_DETAIL_SGIS, 73 LINEAR_DETAIL_ALPHA_SGIS, 74 LINEAR_DETAIL_COLOR_SGIS, 75 LINEAR_SHARPEN_SGIS, 76 LINEAR_SHARPEN_ALPHA_SGIS, 77 LINEAR_SHARPEN_COLOR_SGIS 78 TEXTURE_BORDER_COLOR 4 floats any 4 values in [0,1] 79 DETAIL_TEXTURE_LEVEL_SGIS integer any non-negative integer 80 DETAIL_TEXTURE_MODE_SGIS integer ADD, MODULATE 81 TEXTURE_MIN_LOD_SGIS float any value 82 TEXTURE_MAX_LOD_SGIS float any value 83 TEXTURE_BASE_LEVEL_SGIS integer any non-negative integer 84 TEXTURE_MAX_LEVEL_SGIS integer any non-negative integer 85 GENERATE_MIPMAP_SGIS boolean TRUE or FALSE 86 87 Table 3.7: Texture parameters and their values. 88 89 This extension introduces a side effect to the modification of the 90 base level mipmap array. The side effect is enabled on a per-texture 91 basis by calling TexParameteri, TexParameterf, TexParameteriv, or 92 TexParameterfv with <target> set to TEXTURE_1D, TEXTURE_2D, or 93 TEXTURE_3D_EXT, <pname> set to GENERATE_MIPMAP_SGIS, and <param> 94 set to TRUE (or <params> pointing to TRUE). It is disabled using the 95 same call, with <param> set to FALSE, or <params> pointing to FALSE. 96 If SGIS_texture_lod is supported, the base level array is the array 97 number TEXTURE_BASE_LEVEL_SGIS. Otherwise the base level array is 98 array zero. 99 100 If GENERATE_MIPMAP_SGIS is enabled, the side effect occurs whenever 101 any change is made to the interior or edge image values of the base 102 level texture array. The side effect is computation of a complete 103 set of mipmap arrays, all derived from the modified base level array. 104 Array levels BASE+1 through BASE+p are replaced with derived arrays, 105 regardless of their previous contents. All other texture arrays, 106 including the base array, are left unchanged by this mipmap computation. 107 108 The internal formats and border widths of the derived mipmap arrays 109 all match those of the base array, and the dimensions of the derived 110 arrays follow the requirements described in the Mipmapping section of 111 the GL Specification. The result is that the set of mipmap arrays is 112 complete as defined by the GL Specification. The contents of the 113 derived image arrays are computed by repeated, filtered reduction of 114 the base level image array. This specification does not require any 115 particular filter algorithm, though a simple 2x2 box filter is 116 recommended as the default filter. Hint variable 117 GENERATE_MIPMAP_HINT_SGIS can be changed from its default value of 118 DONT_CARE to either FASTEST or NICEST, indicating to the implementation 119 that either the fastest or highest quality filter operation is desired. 120 These operations are not defined by this specification, however. The 121 single hint value controls the filtering of all the textures, and is 122 evaluated when the filtering operation takes place. 123 124 Automatic mipmap generation is available for texture targets TEXTURE_1D, 125 TEXTURE_2D, and TEXTURE_3D_EXT only. 126 127Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 128and the Frame Buffer) 129 130 None 131 132Additions to Chapter 5 of the 1.0 Specification (Special Functions) 133 134 None 135 136Additions to Chapter 6 of the 1.0 Specification (State and State Requests) 137 138 None 139 140Additions to the GLX Specification 141 142 None 143 144Dependencies on EXT_texture 145 146 EXT_texture is required. 147 148Dependencies on EXT_texture3D 149 150 If EXT_texture3D is not supported, references to 3D texture mapping and 151 to TEXTURE_3D_EXT in this document are invalid and should be ignored. 152 153Dependencies on EXT_texture_object 154 155 If EXT_texture_object is implemented, the state value named 156 157 GENERATE_MIPMAP_SGIS 158 159 is added to the state vector of each texture object. When an attribute 160 set that includes texture information is popped, the bindings and 161 enables are first restored to their pushed values, then the bound 162 textures have their GENERATE_MIPMAP_SGIS parameters restored to their 163 pushed values. 164 165Dependencies on SGIS_texture_lod 166 167 If SGIS_texture_lod is not supported, the base array level is always 168 level zero. References in this document to TEXTURE_BASE_LEVEL_SGIS 169 should be ignored. 170 171Errors 172 173 None 174 175New State 176 177 Initial 178 Get Value Get Command Type Value Attrib 179 --------- ----------- ---- ------- ------ 180 GENERATE_MIPMAP_SGIS GetTexParameteriv B FALSE texture 181 GENERATE_MIPMAP_HINT_SGIS GetIntegerv Z3 DONT_CARE hint 182 183New Implementation Dependent State 184 185 None 186