- Bump revision after graphics/osg update, add patches to fix build with newer mygui and osg

This commit is contained in:
Dmitry Marakasov 2020-02-14 23:12:10 +00:00
parent 68719bc95a
commit e9d4552196
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=526186
3 changed files with 74 additions and 1 deletions

View File

@ -4,7 +4,7 @@
PORTNAME= openmw
DISTVERSIONPREFIX= openmw-
DISTVERSION= 0.45.0
PORTREVISION= 8
PORTREVISION= 9
CATEGORIES= games
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/

View File

@ -0,0 +1,11 @@
--- components/esm/custommarkerstate.hpp.orig 2019-03-10 10:50:29 UTC
+++ components/esm/custommarkerstate.hpp
@@ -16,7 +16,7 @@ struct CustomMarker
std::string mNote;
- bool operator == (const CustomMarker& other)
+ bool operator == (const CustomMarker& other) const
{
return mNote == other.mNote && mCell == other.mCell && mWorldX == other.mWorldX && mWorldY == other.mWorldY;
}

View File

@ -0,0 +1,62 @@
See https://github.com/OpenMW/openmw/pull/2676
From 4eb330b4ed794fd6201f7954a517dec29678c285 Mon Sep 17 00:00:00 2001
From: Julien Valentin <julienvalentin51@gmail.Com>
Date: Mon, 27 Jan 2020 23:44:22 +0100
Subject: [PATCH] comply with new OQN API
---
apps/openmw/mwrender/sky.cpp | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/apps/openmw/mwrender/sky.cpp b/apps/openmw/mwrender/sky.cpp
index 3996f472c2..009b9d935f 100644
--- apps/openmw/mwrender/sky.cpp
+++ apps/openmw/mwrender/sky.cpp
@@ -2,6 +2,7 @@
#include <cmath>
+#include <osg/Version>
#include <osg/ClipPlane>
#include <osg/Fog>
#include <osg/Transform>
@@ -557,27 +558,33 @@ class Sun : public CelestialBody
{
osg::ref_ptr<osg::OcclusionQueryNode> oqn = new osg::OcclusionQueryNode;
oqn->setQueriesEnabled(true);
-
+#if OSG_VERSION_LESS_THAN(3,6,5)
+ osg::Geometry* queryGeom = oqn->getQueryGeometry();
+#else
+ osg::ref_ptr<osg::QueryGeometry> queryGeom(new osg::QueryGeometry());
+#endif
// Make it fast! A DYNAMIC query geometry means we can't break frame until the flare is rendered (which is rendered after all the other geometry,
// so that would be pretty bad). STATIC should be safe, since our node's local bounds are static, thus computeBounds() which modifies the queryGeometry
// is only called once.
// Note the debug geometry setDebugDisplay(true) is always DYNAMIC and that can't be changed, not a big deal.
- oqn->getQueryGeometry()->setDataVariance(osg::Object::STATIC);
+ queryGeom->setDataVariance(osg::Object::STATIC);
// Set up the query geometry to match the actual sun's rendering shape. osg::OcclusionQueryNode wasn't originally intended to allow this,
// normally it would automatically adjust the query geometry to match the sub graph's bounding box. The below hack is needed to
// circumvent this.
- osg::Geometry* queryGeom = oqn->getQueryGeometry();
queryGeom->setVertexArray(mGeom->getVertexArray());
queryGeom->setTexCoordArray(0, mGeom->getTexCoordArray(0), osg::Array::BIND_PER_VERTEX);
- queryGeom->removePrimitiveSet(0, oqn->getQueryGeometry()->getNumPrimitiveSets());
+ queryGeom->removePrimitiveSet(0, queryGeom->getNumPrimitiveSets());
queryGeom->addPrimitiveSet(mGeom->getPrimitiveSet(0));
+#if OSG_VERSION_LESS_THAN(3,6,5)
// Hack to disable unwanted awful code inside OcclusionQueryNode::computeBound.
oqn->setComputeBoundingSphereCallback(new DummyComputeBoundCallback);
// Still need a proper bounding sphere.
oqn->setInitialBound(queryGeom->getBound());
-
+#else
+ oqn->setQueryGeometry(queryGeom);
+#endif
osg::StateSet* queryStateSet = new osg::StateSet;
if (queryVisible)
{