Commit fb1d24d2 authored by hybrid's avatar hybrid

More compiler warning fixes. Switched automatic culling without camera off as...

More compiler warning fixes. Switched automatic culling without camera off as suggested on the forum.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@918 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 5a4c66cd
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
#include <math.h> #include <math.h>
#if defined(_IRR_SOLARIS_PLATFORM_) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) #if defined(_IRR_SOLARIS_PLATFORM_) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
#define sqrtf(X) sqrt(X) #define sqrtf(X) (f32)sqrt(X)
#define sinf(X) sin(X) #define sinf(X) (f32)sin(X)
#define cosf(X) cos(X) #define cosf(X) (f32)cos(X)
#define ceilf(X) ceil(X) #define ceilf(X) (f32)ceil(X)
#define floorf(X) floor(X) #define floorf(X) (f32)floor(X)
#define powf(X,Y) pow(X,Y) #define powf(X,Y) (f32)pow(X,Y)
#define fmodf(X,Y) fmod(X,Y) #define fmodf(X,Y) (f32)fmod(X,Y)
#endif #endif
namespace irr namespace irr
...@@ -234,7 +234,7 @@ namespace core ...@@ -234,7 +234,7 @@ namespace core
inline f32 round_( f32 x ) inline f32 round_( f32 x )
{ {
return (f32)floor( x + 0.5f ); return floorf( x + 0.5f );
} }
REALINLINE void clearFPUException () REALINLINE void clearFPUException ()
......
...@@ -1007,10 +1007,10 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader, ...@@ -1007,10 +1007,10 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader,
uriToId(materialName); uriToId(materialName);
video::SMaterial mat; video::SMaterial mat;
for (u32 i=0; i<Materials.size(); ++i) for (u32 matnum=0; matnum<Materials.size(); ++matnum)
if (materialName == Materials[i].Id) if (materialName == Materials[matnum].Id)
{ {
mat = Materials[i].Mat; mat = Materials[matnum].Mat;
break; break;
} }
...@@ -1225,7 +1225,7 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader, ...@@ -1225,7 +1225,7 @@ void CColladaFileLoader::readPolygonSection(io::IXMLReaderUTF8* reader,
mbuffer->Material=mat; mbuffer->Material=mat;
buffer = mbuffer; buffer = mbuffer;
for (i=0; i<polygons.size(); ++i) for (u32 i=0; i<polygons.size(); ++i)
{ {
u32 vertexCount = polygons[i].Indices.size() / inputSemanticCount; u32 vertexCount = polygons[i].Indices.size() / inputSemanticCount;
......
...@@ -939,7 +939,7 @@ bool CSceneManager::isCulled(ISceneNode* node) ...@@ -939,7 +939,7 @@ bool CSceneManager::isCulled(ISceneNode* node)
{ {
ICameraSceneNode* cam = getActiveCamera(); ICameraSceneNode* cam = getActiveCamera();
if (!cam) if (!cam)
return true; return false;
switch ( node->getAutomaticCulling() ) switch ( node->getAutomaticCulling() )
{ {
......
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