1Name 2 3 IMG_texture_env_enhanced_fixed_function 4 5Name Strings 6 7 GL_IMG_texture_env_enhanced_fixed_function 8 9Notice 10 11 Copyright Imagination Technologies Limited, 2005. 12 13Contact 14 15 Graham Connor, Imagination Technologies (graham 'dot' connor 'at' 16 imgtec 'dot' com) 17 18Status 19 20 Complete 21 22Version 23 24 1.0, 11 May 2009 25 26Number 27 28 OpenGL ES Extension #58 29 30Dependencies 31 32 None 33 34 This extension is written against the OpenGL 1.3 Specification. The intention 35 is that this extension is only exposed, within a OpenGL-ES 1.0 impementation 36 and the reader should be aware of the restrictions of OpenGL-ES 1.0 with respect 37 to this OpenGL 1.3 extension. 38 39Overview 40 41 This extension adds new texture environment functions to allow use of 42 of blend modes supported in some early MBX-lite devices, including dot3 functionality. 43 It is superceded by OpenGL-ES 1.1 which includes tex_env_combine. 44 45 New functions may be specified by calling TexEnv with the following tokens: 46 MODULATE_COLOR_IMG, RECIP_ADD_SIGNED_ALPHA_IMG, TEXTURE_ALPHA_MODULATE_IMG, 47 FACTOR_ALPHA_MODULATE_IMG, FRAGMENT_ALPHA_MODULATE_IMG, ADD_BLEND_IMG, DOT3_RGBA. 48 49New Procedures and Functions 50 51 None 52 53New Tokens 54 55 Accepted by the <params> parameter of TexEnvf, TexEnvi, TexEnvfv, and 56 TexEnvfi when the <pname> parameter value is GL_TEXTURE_ENV_MODE 57 58 MODULATE_COLOR_IMG 0x8C04 59 RECIP_ADD_SIGNED_ALPHA_IMG 0x8C05 60 TEXTURE_ALPHA_MODULATE_IMG 0x8C06 61 FACTOR_ALPHA_MODULATE_IMG 0x8C07 62 FRAGMENT_ALPHA_MODULATE_IMG 0x8C08 63 ADD_BLEND_IMG 0x8C09 64 DOT3_RGBA_IMG 0x86AF 65 66Additions to Chapter 2 of the GL Specification (OpenGL Operation) 67 68 None 69 70Additions to Chapter 3 of the GL Specification (Rasterization) 71 72 The description of TEXTURE_ENV_MODE in the first paragraph of 73 section 3.8.12 should be modified as follows: 74 75 TEXTURE_ENV_MODE may be set to one of REPLACE, MODULATE, DECAL, 76 BLEND, ADD, MODULATE_COLOR_IMG, RECIP_ADD_SIGNED_ALPHA_IMG, 77 TEXTURE_ALPHA_MODULATE_IMG, FACTOR_ALPHA_MODULATE_IMG, 78 FRAGMENT_ALPHA_MODULATE_IMG, ADD_BLEND_IMG, DOT3_RGBA_IMG, or COMBINE; 79 80 Table 3.24 is added as follows: 81 82 Base MODULATE_COLOR_IMG RECIP_ADD_SIGNED_ALPHA_IMG 83 Internal Format tex func tex func 84 --------------- ------------------ -------------------------- 85 86 ALPHA Cv = Cf Cv = Cf 87 Av = As Av = (1-As) + Af - 0.5 88 89 LUMINANCE Cv = CfCs Cv = Cf 90 (or 1) Av = Af Av = Af - 0.5 91 92 LUMINANCE_ALPHA Cv = CfCs Cv = Cf 93 (or 2) Av = As Av = (1-As) + Af - 0.5 94 95 INTENSITY Cv = CfCs Cv = Cf 96 Av = As Av = (1-As) + Af - 0.5 97 98 RGB Cv = CfCs Cv = Cf 99 (or 3) Av = Af Av = Af - 0.5 100 101 RGBA Cv = CfCs Cv = Cf 102 (or 4) Av = As Av = (1-As) + Af - 0.5 103 104 105 Base TEXTURE_ALPHA_MODULATE_IMG FACTOR_ALPHA_MODULATE_IMG 106 Internal Format tex func tex func 107 --------------- -------------------------- ------------------------- 108 109 ALPHA Cv = ZERO Cv = ZERO 110 Av = As Av = Ac 111 112 LUMINANCE Cv = Cs Cv = AcCs 113 (or 1) Av = ONE Av = Ac 114 115 LUMINANCE_ALPHA Cv = AsCs Cv = AcCs 116 (or 2) Av = As Av = Ac 117 118 INTENSITY Cv = AsCs Cv = AcCs 119 Av = As Av = Ac 120 121 RGB Cv = Cs Cv = AcCs 122 (or 3) Av = ONE Av = Ac 123 124 RGBA Cv = AsCs Cv = AcCs 125 (or 4) Av = As Av = Ac 126 127 128 Base FRAGMENT_ALPHA_MODULATE_IMG ADD_BLEND_IMG 129 Internal Format tex func tex func 130 --------------- ----------------------- ------------- 131 132 ALPHA Cv = ZERO Cv = Cf 133 Av = Af Av = AfAs 134 135 LUMINANCE Cv = AfCs Cv = Cf + (1 - Af)Cs 136 (or 1) Av = Af Av = Af 137 138 LUMINANCE_ALPHA Cv = AfCs Cv = Cf + (1 - Af)Cs 139 (or 2) Av = Af Av = AfAs 140 141 INTENSITY Cv = AfCs Cv = Cf + (1 - Af)Cs 142 Av = Af Av = AfAs 143 144 RGB Cv = AfCs Cv = Cf + (1 - Af)Cs 145 (or 3) Av = Af Av = Af 146 147 RGBA Cv = AfCs Cv = Cf + (1 - Af)Cs 148 (or 4) Av = Af Av = AfAs 149 150 151 Base DOT3_RGBA_IMG 152 Internal Format tex func 153 --------------- --------- 154 155 ALPHA Undefined 156 Undefined 157 158 LUMINANCE Undefined 159 (or 1) Undefined 160 161 LUMINANCE_ALPHA Undefined 162 (or 2) Undefined 163 164 INTENSITY Undefined 165 Undefined 166 167 RGB Cv = Dot3(Cf,Cs) 168 (or 3) Av = Dot3(Cf,Cs) 169 170 RGBA Cv = Dot3(Cf,Cs) 171 (or 4) Av = Dot3(Cf, Cs) 172 173 174 where Dot3(Cf,Cs) evaluates to: 175 176 4((Cfr - 0.5)*(Csr - 0.5) + 177 (Cfg - 0.5)*(Csg - 0.5) + 178 (Cfb - 0.5)*(Csb - 0.5)) 179 180 181 Table 3.24: Extended Fixed Function Texturing Modes 182 183 184Additions to Chapter 4 of the GL Specification (Per-Fragment Operations 185and the Framebuffer) 186 187 None 188 189Additions to Chapter 5 of the GL Specification (Special Functions) 190 191 None 192 193Additions to Chapter 6 of the GL Specification (State and State Requests) 194 195 The Type of TEXTURE_ENV_MODE in Table 6.17 should be changed to 196 197 2* x Z13 198 199Additions to the GLX / WGL / AGL Specifications 200 201 None 202 203GLX Protocol 204 205 None 206 207Errors 208 209 None 210 211New State 212 213 The Type of TEXTURE_ENV_MODE in Table 6.17 should be changed to 214 215 2* x Z13 216 217New Implementation Dependent State 218 219 None 220 221Revision History 222 223 0.1, 18/12/2003 gdc: First draft. 224 0.2, 13/01/2004 gdc: Formatting changes. 225 0.3, 25/01/2005 nt: Updated copyright date. 226 1.0, 11/05/2009 bcb: Final tidy up for publish. 227 228