- Timestamp:
- 12/29/06 10:28:00 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/System/Depreciated/State/OSGTextureChunkBase.cpp
r439 r459 108 108 109 109 This chunk wraps glTexImage[123]D (OSG::TextureChunk::_sfImage, 110 OSG::TextureChunk::_sfInternalFormat, 111 OSG::TextureChunk::_sfExternalFormat), glTexParameter 112 (OSG::TextureChunk::_sfMinFilter, OSG::TextureChunk::_sfMagFilter, 113 OSG::TextureChunk::_sfWrapS, OSG::TextureChunk::_sfWrapT, 114 OSG::TextureChunk::_sfWrapR), glTexEnv (OSG::TextureChunk::_sfEnvMode, 115 OSG::TextureChunk::_sfEnvColor, OSG::TextureChunk::_sfPriority). The 116 ARB combine extension is also supported, where available 117 (OSG::TextureChunk::_sfEnvCombineRGB, 110 OSG::TextureChunk::_sfInternalFormat, OSG::TextureChunk::_sfExternalFormat), 111 glTexParameter (OSG::TextureChunk::_sfMinFilter, 112 OSG::TextureChunk::_sfMagFilter, OSG::TextureChunk::_sfWrapS, 113 OSG::TextureChunk::_sfWrapT, OSG::TextureChunk::_sfWrapR), glTexEnv 114 (OSG::TextureChunk::_sfEnvMode, OSG::TextureChunk::_sfEnvColor, 115 OSG::TextureChunk::_sfPriority). The ARB combine extension is also supported, 116 where available (OSG::TextureChunk::_sfEnvCombineRGB, 118 117 OSG::TextureChunk::_sfEnvScaleRGB, OSG::TextureChunk::_sfEnvSource0RGB, 119 OSG::TextureChunk::_sfEnvSource1RGB, 120 OSG::TextureChunk::_sfEnvSource2RGB, 121 OSG::TextureChunk::_sfEnvOperand0RGB, 122 OSG::TextureChunk::_sfEnvOperand1RGB, 118 OSG::TextureChunk::_sfEnvSource1RGB, OSG::TextureChunk::_sfEnvSource2RGB, 119 OSG::TextureChunk::_sfEnvOperand0RGB, OSG::TextureChunk::_sfEnvOperand1RGB, 123 120 OSG::TextureChunk::_sfEnvOperand2RGB, 124 OSG::TextureChunk::_sfEnvCombineAlpha, 125 OSG::TextureChunk::_sfEnvScaleAlpha, 126 OSG::TextureChunk::_sfEnvSource0Alpha, 127 OSG::TextureChunk::_sfEnvSource1Alpha, 128 OSG::TextureChunk::_sfEnvSource2Alpha, 129 OSG::TextureChunk::_sfEnvOperand0Alpha, 121 OSG::TextureChunk::_sfEnvCombineAlpha, OSG::TextureChunk::_sfEnvScaleAlpha, 122 OSG::TextureChunk::_sfEnvSource0Alpha, OSG::TextureChunk::_sfEnvSource1Alpha, 123 OSG::TextureChunk::_sfEnvSource2Alpha, OSG::TextureChunk::_sfEnvOperand0Alpha, 130 124 OSG::TextureChunk::_sfEnvOperand1Alpha, 131 OSG::TextureChunk::_sfEnvOperand2Alpha). It is possible to enable the 132 point sprite coordinate replacement133 (OSG::TextureChunk::_sfPointSprite), see \ref PageSystemPointChunk for134 details. The two parameters OSG::TextureChunk::_sfScale and135 OSG::TextureChunk::_sfFrame specify detailsabout the texture.125 OSG::TextureChunk::_sfEnvOperand2Alpha). It is possible to enable the point 126 sprite coordinate replacement (OSG::TextureChunk::_sfPointSprite), see \ref 127 PageSystemPointChunk for details. The two parameters 128 OSG::TextureChunk::_sfScale and OSG::TextureChunk::_sfFrame specify details 129 about the texture. 136 130 137 131 On hardware that supports it (i.e. NVidia boards) the texture shader … … 148 142 149 143 */ 144 150 145 /*! \var GLenum TextureChunkBase::_sfInternalFormat 151 146 The internal texture format. 152 147 */ 148 153 149 /*! \var GLenum TextureChunkBase::_sfExternalFormat 154 The external texture format - overwrites external format of image 155 when set to a value not equal to GL_NONE (which is the default). 156 */ 150 The external texture format - overwrites 151 external format of image when set to a value not equal to 152 GL_NONE (which is the default). 153 */ 154 157 155 /*! \var bool TextureChunkBase::_sfScale 158 156 Specifies whether the image should be scaled to the next power of two, … … 162 160 get around the scaling overhead. 163 161 */ 162 164 163 /*! \var UInt32 TextureChunkBase::_sfFrame 165 164 Select the frame of the image to be used. See OSG::Image about details 166 concerning multi-frame images. @hint For fast update use GL_LINEAR or 167 GL_NEAREST filters, as mipmap creation is slow right now. 168 */ 165 concerning multi-frame images. 166 @hint For fast update use GL_LINEAR or GL_NEAREST filters, as mipmap creation is slow right now. 167 */ 168 169 169 /*! \var GLenum TextureChunkBase::_sfMinFilter 170 170 The minimisation filter, default GL_LINEAR_MIPMAP_LINEAR. 171 171 */ 172 172 173 /*! \var GLenum TextureChunkBase::_sfMagFilter 173 174 The magnification filter, default GL_LINEAR. 174 175 */ 176 175 177 /*! \var GLenum TextureChunkBase::_sfWrapS 176 178 Texture coordinate S wrapping, default GL_REPEAT. 177 179 */ 180 178 181 /*! \var GLenum TextureChunkBase::_sfWrapT 179 182 Texture coordinate T wrapping, default GL_REPEAT. 180 183 */ 184 181 185 /*! \var GLenum TextureChunkBase::_sfWrapR 182 186 Texture coordinate R wrapping, default GL_REPEAT. 183 187 */ 188 184 189 /*! \var GLenum TextureChunkBase::_sfEnvMode 185 190 Texture environment mode, default GL_REPLACE 186 191 */ 192 187 193 /*! \var Color4f TextureChunkBase::_sfEnvColor 188 194 Texture environment color default transparent black. 189 195 */ 196 190 197 /*! \var GLenum TextureChunkBase::_sfEnvCombineRGB 191 198 Texture environment rgb combine mode, default GL_MODULATE 192 199 */ 200 193 201 /*! \var GLenum TextureChunkBase::_sfEnvCombineAlpha 194 202 Texture environment alpha combine mode, default GL_MODULATE 195 203 */ 204 196 205 /*! \var Real32 TextureChunkBase::_sfEnvScaleRGB 197 206 Texture environment combine rgb scale factor, default 1.f 198 207 */ 208 199 209 /*! \var Real32 TextureChunkBase::_sfEnvScaleAlpha 200 210 Texture environment combine alpha scale factor, default 1.f 201 211 */ 212 202 213 /*! \var GLenum TextureChunkBase::_sfEnvSource0RGB 203 214 Texture environment combine source 0 rgb, default GL_TEXTURE 204 215 */ 216 205 217 /*! \var GLenum TextureChunkBase::_sfEnvSource1RGB 206 218 Texture environment combine source 1 rgb, default GL_PREVIOUS_EXT 207 219 */ 220 208 221 /*! \var GLenum TextureChunkBase::_sfEnvSource2RGB 209 222 Texture environment combine source 2 rgb, default GL_CONSTANT_EXT 210 223 */ 224 211 225 /*! \var GLenum TextureChunkBase::_sfEnvSource0Alpha 212 226 Texture environment combine source 0 alpha, default GL_TEXTURE 213 227 */ 228 214 229 /*! \var GLenum TextureChunkBase::_sfEnvSource1Alpha 215 230 Texture environment combine source 1 alpha, default GL_PREVIOUS_EXT 216 231 */ 232 217 233 /*! \var GLenum TextureChunkBase::_sfEnvSource2Alpha 218 234 Texture environment combine source 2 alpha, default GL_CONSTANT_EXT 219 235 */ 236 220 237 /*! \var GLenum TextureChunkBase::_sfEnvOperand0RGB 221 238 Texture environment combine operand 0 rgb, default GL_SRC_COLOR 222 239 */ 240 223 241 /*! \var GLenum TextureChunkBase::_sfEnvOperand1RGB 224 242 Texture environment combine operand 1 rgb, default GL_SRC_COLOR 225 243 */ 244 226 245 /*! \var GLenum TextureChunkBase::_sfEnvOperand2RGB 227 246 Texture environment combine operand 2 rgb, default GL_SRC_ALPHA 228 247 */ 248 229 249 /*! \var GLenum TextureChunkBase::_sfEnvOperand0Alpha 230 250 Texture environment combine operand 0 alpha, default GL_SRC_ALPHA 231 251 */ 252 232 253 /*! \var GLenum TextureChunkBase::_sfEnvOperand1Alpha 233 254 Texture environment combine operand 1 alpha, default GL_SRC_ALPHA 234 255 */ 256 235 257 /*! \var GLenum TextureChunkBase::_sfEnvOperand2Alpha 236 258 Texture environment combine operand 2 alpha, default GL_SRC_ALPHA 237 259 */ 260 238 261 /*! \var GLenum TextureChunkBase::_sfGLId 239 262 The OpenGL texture id for this texture. 240 263 */ 264 241 265 /*! \var Int32 TextureChunkBase::_sfIgnoreGLForAspect 242 266 Don't do any GL calls for aspect of given id. 243 267 */ 268 244 269 /*! \var bool TextureChunkBase::_sfPointSprite 245 270 Flag to use this texture for Point Sprites. 246 271 */ 272 247 273 /*! \var Real32 TextureChunkBase::_sfPriority 248 274 Priority of this texture, between 0 and 1, the default is 0. 249 275 */ 276 250 277 /*! \var GLenum TextureChunkBase::_sfShaderOperation 251 278 Shader operation of this texture unit, default GL_NONE. If unit 0 uses 252 279 GL_NONE, shading is switched off. 253 280 */ 281 254 282 /*! \var GLenum TextureChunkBase::_sfShaderInput 255 283 Input texture unit for this shader's operation. 256 284 */ 285 257 286 /*! \var Real32 TextureChunkBase::_mfShaderOffsetMatrix 258 287 The 2x2 transformation matrix for offset textures. 259 288 */ 289 260 290 /*! \var Real32 TextureChunkBase::_sfShaderOffsetScale 261 291 The scaling factor for scaled offset textures. 262 292 */ 293 263 294 /*! \var Real32 TextureChunkBase::_sfShaderOffsetBias 264 295 The bias factor for scaled offset textures. 265 296 */ 297 266 298 /*! \var GLenum TextureChunkBase::_sfShaderRGBADotProduct 267 299 The RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV value. 268 300 */ 301 269 302 /*! \var UInt8 TextureChunkBase::_sfShaderCullModes 270 303 The CULL_MODES_NV value, coded into a single byte. The first 4 bits of 271 the byte are used to indicate the wnated cull modes, a value of 0 272 signifies GL_LESS, a value of 1 GL_GEQUAL. Bit 0 (mask 1) is used for 273 the S coordinate, bit 1 (mask 2) for T, bit 2 (mask 4) for R and bit 4 304 the byte are used to indicate the wnated cull modes, a value of 0 305 signifies GL_LESS, a value of 1 GL_GEQUAL. Bit 0 (mask 1) is used for 306 the S coordinate, bit 1 (mask 2) for T, bit 2 (mask 4) for R and bit 4 274 307 (mask 8) for Q. 275 308 */ 309 276 310 /*! \var Vec3f TextureChunkBase::_sfShaderConstEye 277 The CONST_EYE_NV value, i.e. the constant eye position used by the 311 The CONST_EYE_NV value, i.e. the constant eye position used by the 278 312 DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV shader. 279 313 */ 314 280 315 /*! \var Real32 TextureChunkBase::_sfLodBias 281 316 Bias of LOD calculation for texture access. 282 317 */ 318 283 319 /*! \var Int32 TextureChunkBase::_sfDirtyLeft 284 Left coordinate of the dirty rectangle to use for 285 imageContentChanged(). This doesn't make sense to be stored in files, 320 Left coordinate of the dirty rectangle to use for 321 imageContentChanged(). This doesn't make sense to be stored in files, 286 322 it does make sense on a cluster, though, that's why it's external. 287 323 */ 324 288 325 /*! \var Int32 TextureChunkBase::_sfDirtyMinX 289 Minimum X coordinate of the dirty rectangle to use for 290 imageContentChanged(). This doesn't make sense to be stored in files, 326 Minimum X coordinate of the dirty rectangle to use for 327 imageContentChanged(). This doesn't make sense to be stored in files, 291 328 it does make sense on a cluster, though, that's why it's external. 292 329 */ 330 293 331 /*! \var Int32 TextureChunkBase::_sfDirtyMaxX 294 Maximum X coordinate of the dirty rectangle to use for 295 imageContentChanged(). This doesn't make sense to be stored in files, 332 Maximum X coordinate of the dirty rectangle to use for 333 imageContentChanged(). This doesn't make sense to be stored in files, 296 334 it does make sense on a cluster, though, that's why it's external. 297 335 */ 336 298 337 /*! \var Int32 TextureChunkBase::_sfDirtyMinY 299 Minimum Y coordinate of the dirty rectangle to use for 300 imageContentChanged(). This doesn't make sense to be stored in files, 338 Minimum Y coordinate of the dirty rectangle to use for 339 imageContentChanged(). This doesn't make sense to be stored in files, 301 340 it does make sense on a cluster, though, that's why it's external. 302 341 */ 342 303 343 /*! \var Int32 TextureChunkBase::_sfDirtyMaxY 304 Maximum Y coordinate of the dirty rectangle to use for 305 imageContentChanged(). This doesn't make sense to be stored in files, 344 Maximum Y coordinate of the dirty rectangle to use for 345 imageContentChanged(). This doesn't make sense to be stored in files, 306 346 it does make sense on a cluster, though, that's why it's external. 307 347 */ 348 308 349 /*! \var Int32 TextureChunkBase::_sfDirtyMinZ 309 Minimum Z coordinate of the dirty rectangle to use for 310 imageContentChanged(). This doesn't make sense to be stored in files, 350 Minimum Z coordinate of the dirty rectangle to use for 351 imageContentChanged(). This doesn't make sense to be stored in files, 311 352 it does make sense on a cluster, though, that's why it's external. 312 353 */ 354 313 355 /*! \var Int32 TextureChunkBase::_sfDirtyMaxZ 314 Maximum Z coordinate of the dirty rectangle to use for 315 imageContentChanged(). This doesn't make sense to be stored in files, 356 Maximum Z coordinate of the dirty rectangle to use for 357 imageContentChanged(). This doesn't make sense to be stored in files, 316 358 it does make sense on a cluster, though, that's why it's external. 317 359 */ 360 318 361 /*! \var Real32 TextureChunkBase::_sfAnisotropy 319 362 Anisotropic filtering the default 1.0f means isotropic filtering. 320 363 */ 364 321 365 /*! \var Color4f TextureChunkBase::_sfBorderColor 322 366 Texture border color 323 367 */ 368 324 369 /*! \var GLenum TextureChunkBase::_sfCompareMode 325 370 326 371 */ 372 327 373 /*! \var GLenum TextureChunkBase::_sfCompareFunc 328 374 329 375 */ 376 330 377 /*! \var GLenum TextureChunkBase::_sfDepthMode 331 378 332 379 */ 380 333 381 334 382 void TextureChunkBase::classDescInserter(TypeObject &oType) … … 2159 2207 "</FieldContainer>\n", 2160 2208 "\\ingroup GrpSystemState\n" 2209 "\n" 2161 2210 "See \\ref PageSystemTextureChunk for a description.\n" 2211 "\n" 2162 2212 "This chunk wraps glTexImage[123]D (OSG::TextureChunk::_sfImage,\n" 2163 2213 "OSG::TextureChunk::_sfInternalFormat, OSG::TextureChunk::_sfExternalFormat),\n" … … 2181 2231 "OSG::TextureChunk::_sfScale and OSG::TextureChunk::_sfFrame specify details\n" 2182 2232 "about the texture.\n" 2233 "\n" 2183 2234 "On hardware that supports it (i.e. NVidia boards) the texture shader\n" 2184 2235 "extension(s) are also available.\n" 2236 "\n" 2185 2237 "\\deprecated Use OSG::TextureObjChunk instead.\n" 2186 2238 );
