Commit dba8960c authored by hybrid's avatar hybrid

Another change for the hasMipMaps fix which was not committed last time. Fix...

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
parent 13b7691b
......@@ -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;
......
......@@ -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;
}
......
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