diff --git a/megaglest-color-picking.patch b/megaglest-color-picking.patch new file mode 100644 index 0000000..d515822 --- /dev/null +++ b/megaglest-color-picking.patch @@ -0,0 +1,53 @@ +--- trunk/source/glest_game/graphics/renderer.cpp 2013/01/15 03:18:26 4024 ++++ trunk/source/glest_game/graphics/renderer.cpp 2013/01/15 03:34:01 4025 +@@ -7402,10 +7402,12 @@ + const World *world= game->getWorld(); + assert(world != NULL); + +- //assertGl(); +- + VisibleQuadContainerCache &qCache = getQuadCache(); + if(qCache.visibleQuadUnitList.empty() == false) { ++ if(colorPickingSelection == true) { ++ unitsList.reserve(qCache.visibleQuadUnitList.size()); ++ } ++ + bool modelRenderStarted = false; + for(int visibleUnitIndex = 0; + visibleUnitIndex < qCache.visibleQuadUnitList.size(); ++visibleUnitIndex) { +@@ -7506,13 +7508,12 @@ + return objectList; + } + +- //const World *world= game->getWorld(); +- //const Map *map= world->getMap(); +- +- assertGl(); +- + VisibleQuadContainerCache &qCache = getQuadCache(); + if(qCache.visibleObjectList.empty() == false) { ++ if(colorPickingSelection == true) { ++ objectList.reserve(qCache.visibleObjectList.size()); ++ } ++ + bool modelRenderStarted = false; + for(int visibleIndex = 0; + visibleIndex < qCache.visibleObjectList.size(); ++visibleIndex) { +@@ -7575,8 +7576,6 @@ + if(colorPickingSelection == true) { + o->setUniquePickingColor(); + objectList.push_back(o); +- +- //assertGl(); + } + + modelRenderer->render(objModel,resourceOnly?rmSelection:rmNormal); +@@ -7598,8 +7597,6 @@ + } + } + +- assertGl(); +- + return objectList; + } + diff --git a/megaglest.spec b/megaglest.spec index 374bf2a..56fdbf0 100644 --- a/megaglest.spec +++ b/megaglest.spec @@ -1,6 +1,6 @@ Name: megaglest Version: 3.7.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Open Source 3d real time strategy game License: GPLv3+ and GPL+ Group: Amusements/Games @@ -45,6 +45,8 @@ Patch1: %{name}-3.6.0.2-help2man.patch # Do not fail with cryptic message if there are missing translations # just use english text Patch2: %{name}-3.6.0.3-translation-missing.patch +# http://sourceforge.net/tracker/?func=detail&aid=3598159&group_id=300350&atid=1266776 +Patch3: %{name}-color-picking.patch %description MegaGlest is an open source 3D-real-time strategy game, where you control @@ -60,6 +62,7 @@ within the game at no cost. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build mkdir -p build @@ -99,6 +102,9 @@ done %{_datadir}/megaglest/* %changelog +* Wed Jan 16 2013 pcpa - 3.7.1-3 +- Add patch suggested by upstream for better color picking selection mode. + * Thu Dec 13 2012 Adam Jackson - 3.7.1-2 - Rebuild for glew 1.9.0