Another change for the hasMipMaps fix which was not committed last time. Fix for CsphereNode texture coords which now range from 0 to 1 on both axes.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@649 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2007-05-22 08:16:29 +00:00
parent 13b7691b7a
commit dba8960c43
2 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ CSoftwareTexture2::CSoftwareTexture2(IImage* image, const char* name, bool gener
: ITexture(name), MipMapLOD(0), HasMipMaps(generateMipLevels)
{
#ifndef SOFTWARE_DRIVER_2_MIPMAPPING
HasMipMaps = 0;
HasMipMaps = false;
#endif
memset32 ( MipMap, 0, sizeof ( MipMap ) );
@ -89,7 +89,7 @@ inline s32 CSoftwareTexture2::getTextureSizeFromSurfaceSize(s32 size)
//! modifying the texture
void CSoftwareTexture2::regenerateMipMapLevels()
{
if ( 0 == HasMipMaps )
if ( !HasMipMaps )
return;
s32 i;

View File

@ -158,8 +158,8 @@ void CSphereSceneNode::setSizeAndPolys()
Buffer.Vertices[i] = video::S3DVertex(pos.X, pos.Y, pos.Z,
normal.X, normal.Y, normal.Z,
clr,
(f32)(asin(normal.X)/core::PI*2) + 0.5f,
(f32)(acos(normal.Y)/core::PI*2) + 0.5f);
(f32)(asin(normal.X)/core::PI) + 0.5f,
(f32)(acos(normal.Y)/core::PI));
++i;
}