Discovering what is an alpha texture from a material list?
by Fenrir Wolf · in Torque Game Engine · 09/21/2003 (1:52 pm) · 0 replies
Hmm, I'm taking a look at TextureObject and TextureHandle. I want to know if the texture that I'm looking at from a MaterialList contains alpha transparency or not.
However, the Gbitmap structure associated with the texture is freed once the texture is uploaded to the rendering hardware -- which makes sense. However, I no longer have access to the format data contained in the GBitmap class.
My question is this: Is there a way to tell if a material contains an alpha channel or not just by looking at the gTexManager's classes? I suppose one could ask OpenGL what the texture format is via the material's GLname, but I'm not sure if the texture query will be emulated in the OGL->D3D layer.
SceneGraph obviously knows what's transparent or not, as I'm pretty sure it will depth-sort alpha transparent polygons. I'm curious as to the "correct" way to access this information in Torque. (I've got my code working by using another method, but I feel I'm just duplicating what's already been done.)
Any ideas? I bow before those who have more advanced Torque knowledge. :)
However, the Gbitmap structure associated with the texture is freed once the texture is uploaded to the rendering hardware -- which makes sense. However, I no longer have access to the format data contained in the GBitmap class.
My question is this: Is there a way to tell if a material contains an alpha channel or not just by looking at the gTexManager's classes? I suppose one could ask OpenGL what the texture format is via the material's GLname, but I'm not sure if the texture query will be emulated in the OGL->D3D layer.
SceneGraph obviously knows what's transparent or not, as I'm pretty sure it will depth-sort alpha transparent polygons. I'm curious as to the "correct" way to access this information in Torque. (I've got my code working by using another method, but I feel I'm just duplicating what's already been done.)
Any ideas? I bow before those who have more advanced Torque knowledge. :)