diff -Nauwr source/Irrlicht/CD3D8Texture.cpp source/Irrlicht/CD3D8Texture.cpp --- source/Irrlicht/CD3D8Texture.cpp 2005-08-20 22:20:34.000000000 +0200 +++ source/Irrlicht/CD3D8Texture.cpp 2005-09-24 08:32:00.000000000 +0200 @@ -139,7 +139,7 @@ format = D3DFMT_A1R5G5B5; hr = Device->CreateTexture(optSize.Width, optSize.Height, - (flags & ETCF_CREATE_MIP_MAPS) ? 0 : 1, // number of mipmaplevels (0 = automatic all) + mipmaps, // number of mipmaplevels (0 = automatic all) 0, D3DFMT_A1R5G5B5, D3DPOOL_MANAGED, &Texture); } diff -Nauwr source/Irrlicht/CD3D9MaterialRenderer.h source/Irrlicht/CD3D9MaterialRenderer.h --- source/Irrlicht/CD3D9MaterialRenderer.h 2005-08-20 22:17:50.000000000 +0200 +++ source/Irrlicht/CD3D9MaterialRenderer.h 2005-09-24 08:41:12.000000000 +0200 @@ -206,7 +206,7 @@ pID3DDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_DISABLE ); pID3DDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP, D3DTOP_DISABLE ); - pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); + pID3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); pID3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); pID3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA ); diff -Nauwr source/Irrlicht/CD3D9Texture.cpp source/Irrlicht/CD3D9Texture.cpp --- source/Irrlicht/CD3D9Texture.cpp 2005-08-20 22:20:48.000000000 +0200 +++ source/Irrlicht/CD3D9Texture.cpp 2005-09-25 19:16:14.000000000 +0200 @@ -77,7 +77,7 @@ // compiling with both D3D8 and 9, causing it not to work in the D3D9 device. // So mipmapgeneration is replaced with my own bad generation in d3d 8 when // compiling with both D3D 8 and 9. - HRESULT hr = D3DXFilterTexture(Texture, NULL, D3DX_DEFAULT, D3DX_DEFAULT); + HRESULT hr = D3DXFilterTexture(Texture, NULL, 0, D3DX_DEFAULT ); if (FAILED(hr)) os::Printer::log("Could not create direct3d mip map levels.", ELL_WARNING); else @@ -305,7 +307,7 @@ format = D3DFMT_A1R5G5B5; hr = Device->CreateTexture(optSize.Width, optSize.Height, - (flags & ETCF_CREATE_MIP_MAPS) ? 0 : 1, // number of mipmaplevels (0 = automatic all) + mipmaps, // number of mipmaplevels (0 = automatic all) 0, D3DFMT_A1R5G5B5, D3DPOOL_MANAGED, &Texture, NULL); } diff -Nauwr source/Irrlicht/COpenGLMaterialRenderer.h source/Irrlicht/COpenGLMaterialRenderer.h --- source/Irrlicht/COpenGLMaterialRenderer.h 2005-08-20 22:17:48.000000000 +0200 +++ source/Irrlicht/COpenGLMaterialRenderer.h 2005-09-26 16:29:24.000000000 +0200 @@ -175,6 +175,7 @@ glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); glDisable(GL_BLEND); + glDisable(GL_ALPHA_TEST); } //! Returns if the material is transparent. diff -Nauwr source/Irrlicht/CSceneManager.cpp source/Irrlicht/CSceneManager.cpp --- source/Irrlicht/CSceneManager.cpp 2005-08-24 18:01:14.000000000 +0200 +++ source/Irrlicht/CSceneManager.cpp 2005-09-27 15:50:08.000000000 +0200 @@ -713,13 +713,11 @@ if (!node->getAutomaticCulling()) return false; - ICameraSceneNode* cam = getActiveCamera(); - if (!cam) + if( !ActiveCamera ) return false; - core::aabbox3d tbox = node->getBoundingBox(); - node->getAbsoluteTransformation().transformBox(tbox); - return !(tbox.intersectsWithBox(cam->getViewFrustrum()->boundingBox)); + core::aabbox3d tbox = node->getTransformedBoundingBox(); + return !(tbox.intersectsWithBox(ActiveCameraFrustrumBBox)); // This is a slower but more exact version: // @@ -665,20 +732,25 @@ { case ESNRP_LIGHT_AND_CAMERA: LightAndCameraList.push_back(node); + + if( ActiveCamera ) + { + ActiveCameraFrustrumBBox = ActiveCamera->getViewFrustrum()->boundingBox; + } break; case ESNRP_SKY_BOX: SkyBoxList.push_back(node); break; case ESNRP_SOLID: - if (!isCulled(node)) + if (node->isVisible() && !isCulled(node)) SolidNodeList.push_back(node); break; case ESNRP_TRANSPARENT: - if (!isCulled(node)) + if (node->isVisible() && !isCulled(node)) TransparentNodeList.push_back(TransparentNodeEntry(node, camTransPos)); break; case ESNRP_AUTOMATIC: - if (!isCulled(node)) + if (node->isVisible() && !isCulled(node)) { s32 count = node->getMaterialCount(); @@ -700,7 +772,7 @@ } break; case ESNRP_SHADOW: - if (!isCulled(node)) + if (node->isVisible() && !isCulled(node)) ShadowNodeList.push_back(node); break; } diff -Nauwr source/Irrlicht/CSceneManager.h source/Irrlicht/CSceneManager.h --- source/Irrlicht/CSceneManager.h 2005-08-20 22:17:50.000000000 +0200 +++ source/Irrlicht/CSceneManager.h 2005-09-27 15:46:54.000000000 +0200 @@ -384,6 +411,7 @@ //! current active camera ICameraSceneNode* ActiveCamera; + core::aabbox3df ActiveCameraFrustrumBBox; core::vector3df camTransPos; // Position of camera for transparent nodes. video::SColor ShadowColor;