1Name 2 3 EXT_shared_texture_palette 4 5Name Strings 6 7 GL_EXT_shared_texture_palette 8 9Contact 10 11 Jon Leech, SGI (ljp 'at' sgi.com) 12 Mark J. Kilgard, NVIDIA Corporation (mjk 'at' nvidia.com) 13 14Version 15 16 Last Modified Date: March 24, 2004 17 Revision: 1.4 18 19Number 20 21 141 22 23Support 24 25 Mesa. 26 27 Selected NVIDIA GPUs: NV1x (GeForce 256, GeForce2, GeForce4 MX, 28 GeForce4 Go, Quadro, Quadro2), NV2x (GeForce3, GeForce4 Ti, 29 Quadro DCC, Quadro4 XGL), and NV3x (GeForce FX 5xxxx, Quadro FX 30 1000/2000/3000). NV3 (Riva 128) and NV4 (TNT, TNT2) GPUs and NV4x 31 GPUs do NOT support this functionality (no hardware support). 32 Future NVIDIA GPU designs will no longer support paletted textures. 33 34 S3 ProSavage, Savage 2000. 35 36 3Dfx Voodoo3, Voodoo5. 37 38 3Dlabs GLINT. 39 40Dependencies 41 42 EXT_paletted_texture is required. 43 44Overview 45 46 EXT_shared_texture_palette defines a shared texture palette which may be 47 used in place of the texture object palettes provided by 48 EXT_paletted_texture. This is useful for rapidly changing a palette 49 common to many textures, rather than having to reload the new palette 50 for each texture. The extension acts as a switch, causing all lookups 51 that would normally be done on the texture's palette to instead use the 52 shared palette. 53 54IP Status 55 56 None. 57 58Issues 59 60 * Do we want to use a new <target> to ColorTable to specify the 61 shared palette, or can we just infer the new target from the 62 corresponding Enable? 63 64 * A future extension of larger scope might define a "texture palette 65 object" and bind these objects to texture objects dynamically, rather 66 than making palettes part of the texture object state as the current 67 EXT_paletted_texture spec does. 68 69 * Should there be separate shared palettes for 1D, 2D, and 3D 70 textures? 71 72 Probably not; palette lookups have nothing to do with the 73 dimensionality of the texture. If multiple shared palettes 74 are needed, we should define palette objects. 75 76 * There's no proxy mechanism for checking if a shared palette can 77 be defined with the requested parameters. Will it suffice to 78 assume that if a texture palette can be defined, so can a shared 79 palette with the same parameters? 80 81 * The changes to the spec are based on changes already made for 82 EXT_paletted_texture, which means that all three documents must 83 be referred to. This is quite difficult to read. 84 85 * The changes to section 3.8.6, defining how shared palettes are 86 enabled and disabled, might be better placed in section 3.8.1. 87 However, the underlying EXT_paletted_texture does not appear to 88 modify these sections to define exactly how palette lookups are 89 done, and it's not clear where to put the changes. 90 91 * How does the shared texture palette interact with multitexture 92 support? There is a single global shared texture palette that 93 all texture units utilize (as opposed to a shared texture palette 94 per texture unit). 95 96New Procedures and Functions 97 98 None 99 100New Tokens 101 102 Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, 103 GetFloatv, GetDoublev, IsEnabled, Enable, Disable, ColorTableEXT, 104 ColorSubTableEXT, GetColorTableEXT, GetColorTableParameterivEXT, and 105 GetColorTableParameterfd EXT: 106 107 SHARED_TEXTURE_PALETTE_EXT 0x81FB 108 109Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation) 110 111 None 112 113Additions to Chapter 3 of the 1.1 Specification (Rasterization) 114 115 Section 3.8, 'Texturing,' subsection 'Texture Image Specification' is 116 modified as follows: 117 118 In the Palette Specification Commands section, the sentence 119 beginning 'target specifies which texture is to' should be changed 120 to: 121 122 target specifies the texture palette or shared palette to be 123 changed, and may be one of TEXTURE_1D, TEXTURE_2D, 124 PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, TEXTURE_3D_EXT, 125 PROXY_TEXTURE_3D_EXT, or SHARED_TEXTURE_PALETTE_EXT. 126 127 In the 'Texture State and Proxy State' section, the sentence 128 beginning 'A texture's palette is initially...' should be changed 129 to: 130 131 There is also a shared palette not associated with any texture, 132 which may override a texture palette. (Even when multiple texture 133 units are available, there is still only a single shared texture 134 palette.) All palettes are initially... 135 136 Section 3.8.6, 'Texture Application' is modified by appending the 137 following: 138 139 Use of the shared texture palette is enabled or disabled using the 140 generic Enable or Disable commands, respectively, with the symbolic 141 constant SHARED_TEXTURE_PALETTE_EXT. 142 143 The required state is one bit indicating whether the shared palette is 144 enabled or disabled. In the initial state, the shared palettes is 145 disabled. 146 147Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations 148and the Frame buffer) 149 150Additions to Chapter 5 of the 1.1 Specification (Special Functions) 151 152Additions to Chapter 6 of the 1.1 Specification (State and State Requests) 153 154 In the section on GetTexImage, the sentence beginning 'If format is 155 not COLOR_INDEX...' should be changed to: 156 157 If format is not COLOR_INDEX, the texture's indices are passed 158 through the texture's palette, or the shared palette if one is 159 enabled, and the resulting components are assigned among R, G, B, 160 and A according to Table 6.1. 161 162 In the GetColorTable section, the first sentence of the second 163 paragraph should be changed to read: 164 165 GetColorTableEXT retrieves the texture palette or shared palette 166 given by target. 167 168 The first sentence of the third paragraph should be changed to read: 169 170 Palette parameters can be retrieved using 171 void GetColorTableParameterivEXT(enum target, enum pname, int *params); 172 void GetColorTableParameterfvEXT(enum target, enum pname, float *params); 173 target specifies the texture palette or shared palette being 174 queried and pname controls which parameter value is returned. 175 176Additions to the GLX Specification 177 178 None 179 180New State 181 182Get Value Type Get Command Initial Value Description Sec Attribute 183-------------------------- ---- --------------------------- ------------- -------------- ----- -------------- 184SHARED_TEXTURE_PALETTE_EXT B IsEnabled False shared texture 3.8.6 texture/enable 185 palette enable 186SHARED_TEXTURE_PALETTE_EXT I GetColorTableEXT empty shared texture 3.8 - 187 palette table 188COLOR_TABLE_FORMAT_EXT Zn GetColorTableParameterivEXT RGBA shared texture 3.8 - 189 palette format 190COLOR_TABLE_WIDTH_EXT Z+ GetColorTableParameteriv 0 shared texture 3.8 - 191 palette width 192COLOR_TABLE_x_SIZE_EXT 6xZ+ GetColorTableParameteriv 0 shared texture 3.8 - 193 palette 194 component sizes 195 196New Implementation Dependent State 197 198 None 199 200Revision History 201 202 September 4, 2002 - Add missing IP Status / Contact fields 203 (without bumping the revision) and incorporated Mark's changes 204 into the registry. (Jon Leech) 205 206 July 10, 2002 (version 1.3) - Added "New State" tables entries. 207 Clarify that there is a single global shared texture palette, 208 rather than a per-texture unit palette when multitexture is 209 available. (Mark Kilgard) 210 211 March 24, 2004 (version 1.4) - Document vendor support for this 212 extension; note that future NVIDIA GPU designs will not support this 213 extension. (Mark Kilgard) 214 215