irr: Add first patch, changelog

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13002 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
curaga
2013-06-28 12:07:07 +00:00
parent 10668e8c68
commit f2cca4e5e8
2 changed files with 12 additions and 2 deletions

3
lib/irrlicht/changes.stk Normal file
View File

@@ -0,0 +1,3 @@
The following changes have been made:
- config changes in IrrCompileConfig.h
- primary sort by material type

View File

@@ -532,20 +532,27 @@ namespace scene
struct DefaultNodeEntry
{
DefaultNodeEntry(ISceneNode* n) :
Node(n), TextureValue(0)
Node(n), TextureValue(0), MaterialType(video::EMT_SOLID)
{
if (n->getMaterialCount())
{
TextureValue = (n->getMaterial(0).getTexture(0));
MaterialType = n->getMaterial(0).MaterialType;
}
}
bool operator < (const DefaultNodeEntry& other) const
{
return (TextureValue < other.TextureValue);
if (MaterialType == other.MaterialType)
return (TextureValue < other.TextureValue);
else
return (MaterialType < other.MaterialType);
}
ISceneNode* Node;
private:
void* TextureValue;
video::E_MATERIAL_TYPE MaterialType;
};
//! sort on distance (center) to camera