|
|
@@ -19,6 +19,8 @@
|
|
|
#include "textureStageCollection.h"
|
|
|
|
|
|
#include "indent.h"
|
|
|
+#include "indirectLess.h"
|
|
|
+#include <algorithm>
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: TextureStageCollection::Constructor
|
|
|
@@ -253,6 +255,18 @@ operator [] (int index) const {
|
|
|
return _texture_stages[index];
|
|
|
}
|
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
+// Function: TextureStageCollection::sort
|
|
|
+// Access: Published
|
|
|
+// Description: Sorts the TextureStages in this collection into order
|
|
|
+// by TextureStage::sort(), from lowest to highest.
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
+void TextureStageCollection::
|
|
|
+sort() {
|
|
|
+ ::sort(_texture_stages.begin(), _texture_stages.end(),
|
|
|
+ IndirectLess<TextureStage>());
|
|
|
+}
|
|
|
+
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: TextureStageCollection::output
|
|
|
// Access: Published
|