[SCM] osgearth branch, master, updated. debian/1.4.1-1-71-gecb0256

Bas Couwenberg sebastic at xs4all.nl
Wed Sep 18 11:45:50 UTC 2013


The following commit has been merged in the master branch:
commit fa3747cda6b533fc030d30fabbf7d8af77dad3ab
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Sep 13 15:17:41 2013 +0200

    Add patch to support adapt MPGeometry to support OpenSceneGraph 3.1.8.

diff --git a/debian/changelog b/debian/changelog
index b2bbe98..0577052 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+osgearth (2.4.0+dfsg-4) UNRELEASED; urgency=low
+
+  * Add patch to support adapt MPGeometry to support OpenSceneGraph 3.1.8.
+
+ -- Bas Couwenberg <sebastic at xs4all.nl>  Fri, 13 Sep 2013 15:14:27 +0200
+
 osgearth (2.4.0+dfsg-3) unstable; urgency=low
 
   * Missing dependency libqt4-opengl-dev
diff --git a/debian/control b/debian/control
index 579c2ad..8f45244 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: osgearth
 Section: devel
 Priority: extra
 Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
-Uploaders: Pirmin Kalberer <pi_deb at sourcepole.ch>
+Uploaders: Pirmin Kalberer <pi_deb at sourcepole.ch>, Bas Couwenberg <sebastic at xs4all.nl>
 Build-Depends: debhelper (>= 7), quilt, cmake (>= 2.6.2),
  libopenscenegraph-dev (>= 2.8.0), openscenegraph (>= 2.8.0),
  libgdal-dev, libgeos-dev, libexpat1-dev (>= 2.0.1),
diff --git a/debian/patches/MPGeometry-OpenSceneGraph-3.1.8.patch b/debian/patches/MPGeometry-OpenSceneGraph-3.1.8.patch
new file mode 100644
index 0000000..95b2733
--- /dev/null
+++ b/debian/patches/MPGeometry-OpenSceneGraph-3.1.8.patch
@@ -0,0 +1,130 @@
+Description: Updates to MPGeometry to support changes to OpenSceneGraph Geometry class in OSG 3.1.8.
+Origin: https://github.com/gwaldron/osgearth/commit/e67deedb2d5275d490dd393ec736a933c2ac48f0
+Author: jasonbeverage <jasonbeverage at gmail.com>
+Last-Update: 2013-07-01
+--- a/src/osgEarthDrivers/engine_mp/MPGeometry.cpp
++++ b/src/osgEarthDrivers/engine_mp/MPGeometry.cpp
+@@ -18,6 +18,9 @@
+ */
+ #include "MPGeometry"
+ 
++#include <osg/Version>
++
++using namespace osg;
+ using namespace osgEarth_engine_mp;
+ using namespace osgEarth;
+ 
+@@ -212,18 +215,36 @@ MPGeometry::drawImplementation(osg::Rend
+ 
+     arrayDispatchers.reset();
+     arrayDispatchers.setUseVertexAttribAlias(state.getUseVertexAttributeAliasing());
++
++
++    //Remove 
++#if OSG_VERSION_LESS_THAN(3,1,8)
+     arrayDispatchers.setUseGLBeginEndAdapter(false);
++#endif
++
+ 
++#if OSG_MIN_VERSION_REQUIRED(3,1,8)
++    arrayDispatchers.activateNormalArray(_normalArray.get());
++    arrayDispatchers.activateColorArray(_colorArray.get());
++    arrayDispatchers.activateSecondaryColorArray(_secondaryColorArray.get());
++    arrayDispatchers.activateFogCoordArray(_fogCoordArray.get());
++#else
+     arrayDispatchers.activateNormalArray(_normalData.binding, _normalData.array.get(), _normalData.indices.get());
+     arrayDispatchers.activateColorArray(_colorData.binding, _colorData.array.get(), _colorData.indices.get());
+     arrayDispatchers.activateSecondaryColorArray(_secondaryColorData.binding, _secondaryColorData.array.get(), _secondaryColorData.indices.get());
+     arrayDispatchers.activateFogCoordArray(_fogCoordData.binding, _fogCoordData.array.get(), _fogCoordData.indices.get());
++#endif
++    
+ 
+     if (handleVertexAttributes)
+     {
+         for(unsigned int unit=0;unit<_vertexAttribList.size();++unit)
+         {
++#if OSG_MIN_VERSION_REQUIRED(3,1,8)
++            arrayDispatchers.activateVertexAttribArray(unit, _vertexAttribList[unit].get());
++#else
+             arrayDispatchers.activateVertexAttribArray(_vertexAttribList[unit].binding, unit, _vertexAttribList[unit].array.get(), _vertexAttribList[unit].indices.get());
++#endif             
+         }
+     }
+ 
+@@ -231,7 +252,24 @@ MPGeometry::drawImplementation(osg::Rend
+     arrayDispatchers.dispatch(BIND_OVERALL,0);
+     state.lazyDisablingOfVertexAttributes();
+ 
++
+     // set up arrays
++#if OSG_MIN_VERSION_REQUIRED( 3, 1, 8 )
++    if( _vertexArray.valid() )
++        state.setVertexPointer(_vertexArray.get());
++
++    if (_normalArray.valid() && _normalArray->getBinding()==osg::Array::BIND_PER_VERTEX)
++        state.setNormalPointer(_normalArray.get());
++
++    if (_colorArray.valid() && _colorArray->getBinding()==osg::Array::BIND_PER_VERTEX)
++        state.setColorPointer(_colorArray.get());
++
++    if (_secondaryColorArray.valid() && _secondaryColorArray->getBinding()==osg::Array::BIND_PER_VERTEX)
++        state.setSecondaryColorPointer(_secondaryColorArray.get());
++
++    if (_fogCoordArray.valid() && _fogCoordArray->getBinding()==osg::Array::BIND_PER_VERTEX)
++        state.setFogCoordPointer(_fogCoordArray.get());
++#else
+     if( _vertexData.array.valid() )
+         state.setVertexPointer(_vertexData.array.get());
+ 
+@@ -246,23 +284,50 @@ MPGeometry::drawImplementation(osg::Rend
+ 
+     if (_fogCoordData.binding==BIND_PER_VERTEX && _fogCoordData.array.valid())
+         state.setFogCoordPointer(_fogCoordData.array.get());
+-
++#endif    
++        
+     for(unsigned int unit=0;unit<_texCoordList.size();++unit)
+     {
++#if OSG_MIN_VERSION_REQUIRED( 3, 1, 8)
++        const Array* array = _texCoordList[unit].get();
++        if (array)
++        {
++            state.setTexCoordPointer(unit,array);
++        }
++#else
+         const osg::Array* array = _texCoordList[unit].array.get();
+         if (array) state.setTexCoordPointer(unit,array);
++#endif        
+     }
+ 
+     if( handleVertexAttributes )
+     {
+         for(unsigned int index = 0; index < _vertexAttribList.size(); ++index )
+         {
++#if OSG_MIN_VERSION_REQUIRED( 3, 1, 8)
++            const Array* array = _vertexAttribList[index].get();
++            if (array && array->getBinding()==osg::Array::BIND_PER_VERTEX)
++            {
++                if (array->getPreserveDataType())
++                {
++                    GLenum dataType = array->getDataType();
++                    if (dataType==GL_FLOAT) state.setVertexAttribPointer( index, array );
++                    else if (dataType==GL_DOUBLE) state.setVertexAttribLPointer( index, array );
++                    else state.setVertexAttribIPointer( index, array );
++                }
++                else
++                {
++                    state.setVertexAttribPointer( index, array );
++                }
++            }
++#else            
+             const osg::Array* array = _vertexAttribList[index].array.get();
+             const AttributeBinding ab = _vertexAttribList[index].binding;
+             if( ab == BIND_PER_VERTEX && array )
+             {
+                 state.setVertexAttribPointer( index, array, _vertexAttribList[index].normalize );
+             }
++#endif
+         }
+     }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 0a55278..8ab01fc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 soversion.patch
+MPGeometry-OpenSceneGraph-3.1.8.patch

-- 
osgEarth terrain rendering toolkit



More information about the Pkg-grass-devel mailing list