New scene parameter to ignore b3d file mipmap flag. In case your b3d files load textures without mipmaps unintentionally you should set this flag to true.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2136 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
d7ff83c83f
commit
3f17c5f046
|
@ -1,5 +1,9 @@
|
||||||
Changes in version 1.6
|
Changes in version 1.6
|
||||||
|
|
||||||
|
- New scene parameter B3D_LOADER_IGNORE_MIPMAP_FLAG to ignore the often missing mipmap flag in b3d files. If this parameter is true, the old pre Irrlicht-1.5 behavior is restored.
|
||||||
|
|
||||||
|
- Added Mipmap LOD Bias attribute to MaterialLayer.
|
||||||
|
|
||||||
- Added ColorMask support to selectively disable color planes on rendering.
|
- Added ColorMask support to selectively disable color planes on rendering.
|
||||||
|
|
||||||
- Added support for all available depth test functions.
|
- Added support for all available depth test functions.
|
||||||
|
|
|
@ -108,13 +108,22 @@ namespace scene
|
||||||
|
|
||||||
//! Flag to avoid loading group structures in .obj files
|
//! Flag to avoid loading group structures in .obj files
|
||||||
/** Use it like this:
|
/** Use it like this:
|
||||||
\code
|
\code
|
||||||
SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_GROUPS, true);
|
SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_GROUPS, true);
|
||||||
\endcode
|
\endcode
|
||||||
**/
|
**/
|
||||||
const c8* const OBJ_LOADER_IGNORE_GROUPS = "OBJ_IgnoreGroups";
|
const c8* const OBJ_LOADER_IGNORE_GROUPS = "OBJ_IgnoreGroups";
|
||||||
|
|
||||||
|
|
||||||
|
//! Flag to ignore the b3d file's mipmapping flag
|
||||||
|
/** Instead Irrlicht's texture creation flag is used. Use it like this:
|
||||||
|
\code
|
||||||
|
SceneManager->getParameters()->setAttribute(scene::B3D_LOADER_IGNORE_MIPMAP_FLAG, true);
|
||||||
|
\endcode
|
||||||
|
**/
|
||||||
|
const c8* const B3D_LOADER_IGNORE_MIPMAP_FLAG = "B3D_IgnoreMipmapFlag";
|
||||||
|
|
||||||
|
|
||||||
//! Flag set as parameter when the scene manager is used as editor
|
//! Flag set as parameter when the scene manager is used as editor
|
||||||
/** In this way special animators like deletion animators can be stopped from
|
/** In this way special animators like deletion animators can be stopped from
|
||||||
deleting scene nodes for example */
|
deleting scene nodes for example */
|
||||||
|
|
|
@ -907,7 +907,8 @@ void CB3DMeshFileLoader::loadTextures(SB3dMaterial& material) const
|
||||||
SB3dTexture* B3dTexture = material.Textures[i];
|
SB3dTexture* B3dTexture = material.Textures[i];
|
||||||
if (B3dTexture && B3dTexture->TextureName.size() && !material.Material.getTexture(i))
|
if (B3dTexture && B3dTexture->TextureName.size() && !material.Material.getTexture(i))
|
||||||
{
|
{
|
||||||
SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, (B3dTexture->Flags & 0x8) ? true:false);
|
if (!SceneManager->getParameters()->getAttributeAsBool(B3D_LOADER_IGNORE_MIPMAP_FLAG))
|
||||||
|
SceneManager->getVideoDriver()->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, (B3dTexture->Flags & 0x8) ? true:false);
|
||||||
material.Material.setTexture(i, SceneManager->getVideoDriver()->getTexture( B3dTexture->TextureName.c_str() ));
|
material.Material.setTexture(i, SceneManager->getVideoDriver()->getTexture( B3dTexture->TextureName.c_str() ));
|
||||||
if (material.Textures[i]->Flags & 0x10) // Clamp U
|
if (material.Textures[i]->Flags & 0x10) // Clamp U
|
||||||
material.Material.TextureLayer[i].TextureWrap=video::ETC_CLAMP;
|
material.Material.TextureLayer[i].TextureWrap=video::ETC_CLAMP;
|
||||||
|
|
Loading…
Reference in New Issue