Commit 3f17c5f0 authored by hybrid's avatar hybrid

New scene parameter to ignore b3d file mipmap flag. In case your b3d files...

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-e03cc46cb475
parent d7ff83c8
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 support for all available depth test functions.
......
......@@ -108,13 +108,22 @@ namespace scene
//! Flag to avoid loading group structures in .obj files
/** Use it like this:
\code
SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_GROUPS, true);
\code
SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_GROUPS, true);
\endcode
**/
**/
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
/** In this way special animators like deletion animators can be stopped from
deleting scene nodes for example */
......
......@@ -907,7 +907,8 @@ void CB3DMeshFileLoader::loadTextures(SB3dMaterial& material) const
SB3dTexture* B3dTexture = material.Textures[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() ));
if (material.Textures[i]->Flags & 0x10) // Clamp U
material.Material.TextureLayer[i].TextureWrap=video::ETC_CLAMP;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment