Blender V2.61 - r43446
|
#include <BL_Texture.h>
Public Member Functions | |
BL_Texture () | |
~BL_Texture () | |
bool | Ok () |
int | GetUnit () |
void | SetUnit (int unit) |
unsigned int | GetTextureType () const |
void | DeleteTex () |
bool | InitFromImage (int unit, Image *img, bool mipmap) |
bool | InitCubeMap (int unit, EnvMap *cubemap) |
bool | IsValid () |
void | Validate () |
void | ActivateTexture () |
void | SetMapping (int mode) |
void | DisableUnit () |
void | setTexEnv (BL_Material *mat, bool modulate=false) |
unsigned int | swapTexture (unsigned int newTex) |
Static Public Member Functions | |
static void | ActivateFirst () |
static void | DisableAllTextures () |
static void | ActivateUnit (int unit) |
static int | GetMaxUnits () |
static int | GetPow2 (int x) |
static void | SplitEnvMap (EnvMap *map) |
Definition at line 25 of file BL_Texture.h.
BL_Texture::BL_Texture | ( | ) |
Definition at line 64 of file BL_Texture.cpp.
BL_Texture::~BL_Texture | ( | ) |
Definition at line 75 of file BL_Texture.cpp.
void BL_Texture::ActivateFirst | ( | ) | [static] |
Definition at line 357 of file BL_Texture.cpp.
void BL_Texture::ActivateTexture | ( | ) |
Definition at line 418 of file BL_Texture.cpp.
void BL_Texture::ActivateUnit | ( | int | unit | ) | [static] |
Definition at line 363 of file BL_Texture.cpp.
References MAXTEX.
Referenced by InitCubeMap(), and InitFromImage().
void BL_Texture::DeleteTex | ( | ) |
Definition at line 80 of file BL_Texture.cpp.
References g_textureManager.
void BL_Texture::DisableAllTextures | ( | ) | [static] |
Definition at line 396 of file BL_Texture.cpp.
void BL_Texture::DisableUnit | ( | ) |
Definition at line 371 of file BL_Texture.cpp.
int BL_Texture::GetMaxUnits | ( | ) | [static] |
Definition at line 345 of file BL_Texture.cpp.
References MAXTEX.
Referenced by KX_BlenderMaterial::Initialize().
int BL_Texture::GetPow2 | ( | int | x | ) | [static] |
Definition at line 613 of file BL_Texture.cpp.
References is_power_of_2_i(), and power_of_2_min_i().
unsigned int BL_Texture::GetTextureType | ( | ) | const |
Definition at line 340 of file BL_Texture.cpp.
int BL_Texture::GetUnit | ( | ) | [inline] |
Definition at line 43 of file BL_Texture.h.
bool BL_Texture::InitCubeMap | ( | int | unit, |
EnvMap * | cubemap | ||
) |
Definition at line 215 of file BL_Texture.cpp.
References ActivateUnit(), BKE_image_get_ibuf(), EnvMap::cube, g_textureManager, GL_CLAMP_TO_EDGE, BL_TextureObject::gl_texture, Image::id, EnvMap::ima, is_power_of_2_i(), IsValid(), my_envmap_split_ima(), my_free_envmapdata(), ID::name, NULL, Image::ok, BL_TextureObject::ref_buffer, SetCubeMapFace, spit, ImBuf::x, and ImBuf::y.
bool BL_Texture::InitFromImage | ( | int | unit, |
Image * | img, | ||
bool | mipmap | ||
) |
Definition at line 101 of file BL_Texture.cpp.
References ActivateUnit(), Image::bindcode, BKE_image_get_ibuf(), g_textureManager, BL_TextureObject::gl_texture, Image::id, IsValid(), ID::name, NULL, Image::ok, ImBuf::rect, BL_TextureObject::ref_buffer, Validate(), ImBuf::x, and ImBuf::y.
bool BL_Texture::IsValid | ( | ) |
Definition at line 322 of file BL_Texture.cpp.
Referenced by InitCubeMap(), InitFromImage(), and Validate().
bool BL_Texture::Ok | ( | ) |
Definition at line 334 of file BL_Texture.cpp.
void BL_Texture::SetMapping | ( | int | mode | ) |
Definition at line 437 of file BL_Texture.cpp.
References USEREFL.
void BL_Texture::setTexEnv | ( | BL_Material * | mat, |
bool | modulate = false |
||
) |
Definition at line 475 of file BL_Texture.cpp.
References BLEND_ADD, BLEND_MIX, BL_Material::blend_mode, BLEND_MUL, BLEND_SCR, BLEND_SUB, BL_Material::color_blend, BL_Material::flag, TEXALPHA, TEXNEG, USEALPHA, and USENEGALPHA.
void BL_Texture::SetUnit | ( | int | unit | ) | [inline] |
Definition at line 44 of file BL_Texture.h.
void BL_Texture::SplitEnvMap | ( | EnvMap * | map | ) | [static] |
Definition at line 621 of file BL_Texture.cpp.
References BKE_image_get_ibuf(), EnvMap::ima, my_envmap_split_ima(), NULL, and Image::ok.
Referenced by ConvertMaterial().
unsigned int BL_Texture::swapTexture | ( | unsigned int | newTex | ) | [inline] |
Definition at line 67 of file BL_Texture.h.
void BL_Texture::Validate | ( | ) |