Fix draworder
This commit is contained in:
@@ -60,6 +60,11 @@ namespace openVulkanoCpp
|
||||
if (drawable->GetScene() != this) drawable->SetScene(this);
|
||||
if (Utils::Contains(shapeList, drawable)) return; // Prevent duplicate entries
|
||||
shapeList.push_back(drawable);
|
||||
if (shapeList.size() > 1 && shapeList[shapeList.size() - 2]->GetDrawPhase() < drawable->GetDrawPhase())
|
||||
{
|
||||
std::sort(shapeList.begin(), shapeList.end(),
|
||||
[](Drawable* a, Drawable* b) { return a->GetDrawPhase() > b->GetDrawPhase(); });
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveDrawable(Drawable* drawable)
|
||||
|
||||
Reference in New Issue
Block a user