Index: experimental/distortionNG/DistortionSet.cpp
===================================================================
--- experimental/distortionNG/DistortionSet.cpp	(revision 359)
+++ experimental/distortionNG/DistortionSet.cpp	(revision 360)
@@ -24,6 +24,6 @@
 DistortionSet::DistortionSet()
 {
-	_distortionMeshRows = 1;
-	_distortionMeshColumns = 1;
+	_distortionMeshRows = 2;
+	_distortionMeshColumns = 2;
 	//GLenum _meshType;
 	
Index: experimental/distortionNG/DistortionSet.h
===================================================================
--- experimental/distortionNG/DistortionSet.h	(revision 359)
+++ experimental/distortionNG/DistortionSet.h	(revision 360)
@@ -23,4 +23,5 @@
 #include <osg/Camera>
 #include <osg/Switch>
+#include <osg/Shader>
 
 namespace osgViewer {
@@ -59,4 +60,6 @@
 
 	osg::Switch* getDistortionInternals()	{ return _distortionInternals; }
+
+
 
 
Index: experimental/distortionNG/extViewer.cpp
===================================================================
--- experimental/distortionNG/extViewer.cpp	(revision 359)
+++ experimental/distortionNG/extViewer.cpp	(revision 360)
@@ -255,5 +255,5 @@
         stateset->setTextureAttributeAndModes(_distortionSet->getTexUnitScene(), texmat, osg::StateAttribute::ON);
 
-		osg::Geometry* distortionMesh = createMesh(osg::Vec3(0.0f,0.0f,0.0f), osg::Vec3(width,0.0f,0.0f), osg::Vec3(0.0f,height,0.0f), 20, 20, projectorMatrix);
+		osg::Geometry* distortionMesh = createMesh(osg::Vec3(0.0f,0.0f,0.0f), osg::Vec3(width,0.0f,0.0f), osg::Vec3(0.0f,height,0.0f), _distortionSet->getDistortionMeshColumns(), _distortionSet->getDistortionMeshColumns(), projectorMatrix);
 		meshGeode->addDrawable(distortionMesh);
 
@@ -333,6 +333,6 @@
 
 	// create shaders for blending
-	osg::Program* distortProgram = new osg::Program;
-	distortProgram->setName( "intensityMapBlending" );
+	osg::Program* IntensityMapProgram = new osg::Program;
+	IntensityMapProgram->setName( "intensityMapBlending" );
 	osg::Shader* fShader = osg::Shader::readShaderFile( osg::Shader::FRAGMENT, "shader.frag" ); 
 	fShader->setName("intensityMapFragShader");
@@ -340,8 +340,8 @@
 	if ( fShader )
 	{
-		distortProgram->addShader( fShader );
+		IntensityMapProgram->addShader( fShader );
 		stateset->addUniform( new osg::Uniform("sceneTexture", (int)_distortionSet->getTexUnitScene()) );
 		stateset->addUniform( new osg::Uniform("intensityMapTexture", (int)_distortionSet->getTexUnitIntensityMap()) );
-		stateset->setAttributeAndModes(distortProgram, osg::StateAttribute::ON);
+		stateset->setAttributeAndModes(IntensityMapProgram, osg::StateAttribute::ON);
 	}
 }
@@ -358,11 +358,11 @@
 
 	// Create DistortionSet
-	_distortionSet = new osgViewer::DistortionSet();
-	_distortionSet->setIntensityMap( intMap );
-	_distortionSet->setDistortionMeshRows( 1 );
-	_distortionSet->setDistortionMeshColumns( 1 );
-	_distortionSet->setTexUnitScene( 0 );
-	_distortionSet->setTexUnitIntensityMap( 1 );
-
-	// Todo: call setupDistortion/Blendung to perform the blending
-}
+	osgViewer::DistortionSet* ds = new osgViewer::DistortionSet();
+	ds->setIntensityMap( intMap );
+	ds->setDistortionMeshRows( 2 );
+	ds->setDistortionMeshColumns( 2 );
+	ds->setTexUnitScene( 0 );
+	ds->setTexUnitIntensityMap( 1 );
+
+	setUpViewForManualDistortion(ds);
+}
Index: experimental/distortionNG/extViewer.h
===================================================================
--- experimental/distortionNG/extViewer.h	(revision 359)
+++ experimental/distortionNG/extViewer.h	(revision 360)
@@ -38,4 +38,6 @@
 		/** Convenience method for projection on curved screens using a slave camera rendering scene and a second camera doing distortion correction to present on a nonplaner display.*/
         void setUpViewForManualDistortion(osgViewer::DistortionSet* distSet, unsigned int screenNum=0, const osg::Matrixd& projectorMatrix = osg::Matrixd());
+		//void setUpViewForManualDistortion(unsigned int rows, unsigned int colums, std::string intensityMap="");
+
 
 		void setUpIntensityMapBlending(osgViewer::DistortionSet* distSet, unsigned int screenNum=0);
Index: experimental/distortionNG/main.cpp
===================================================================
--- experimental/distortionNG/main.cpp	(revision 359)
+++ experimental/distortionNG/main.cpp	(revision 360)
@@ -56,5 +56,5 @@
 	viewer.setUpViewForManualDistortion(_distortionSet, 0);
    
-	
+	//viewer.setUpIntensityMapBlending("intensitymap.png");
 
 	// set up the camera manipulators.
@@ -195,5 +195,19 @@
  * 									
  * 
- * 
+ * direct to do:
+ * 
+ * speichern des containers in ein .dist file
+ * Laden des Containers.
+ * osgviewer setup fit machen: simple distortion ( nur rows, colums und optional blendmap ist angegeben
+ * shaderwechsel funktioniert, so dass die reine blendmap angezeigt werden kann.
+ * reset distortion funktioniert.
+ * statesetmanipulator muss auf die scene, nicht auf mesh losgehen.
+ * 
+ * Anwenden der distortion auf die Meshknoten oder die texturekoordinaten
+ * 
+ * alternativ: 
+ * - umstellung der koordinaten auf [0-1]
+ * - speichern der hieght und width im container so daß das mesh an andere Bildschirmgrößen angepasst werden kann.
+ 
  * 
 */
