Index: OpenSceneGraph/trunk/examples/osgmultiplerendertargets/osgmultiplerendertargets.cpp
===================================================================
--- OpenSceneGraph/trunk/examples/osgmultiplerendertargets/osgmultiplerendertargets.cpp (revision 12292)
+++ OpenSceneGraph/trunk/examples/osgmultiplerendertargets/osgmultiplerendertargets.cpp (revision 12531)
@@ -195,5 +195,5 @@
 // Here a scene consisting of a single quad is created. This scene is viewed by the screen camera.
 // The quad is textured using a shader and the multiple textures generated in the RTT stage.
-osg::Node* createScene(osg::Node* cam_subgraph, unsigned int tex_width, unsigned int tex_height, bool useHDR, bool useImage)
+osg::Node* createScene(osg::Node* cam_subgraph, unsigned int tex_width, unsigned int tex_height, bool useHDR, bool useImage, bool useMultiSample)
 {
     if (!cam_subgraph) return 0;
@@ -349,5 +349,10 @@
         // attach the textures to use
         for (int i=0; i<NUM_TEXTURES; i++) {
-            camera->attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER0+i), textureRect[i]);
+            if (useMultiSample)
+                camera->attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER0+i), textureRect[i], 0, 0, false, 4, 4);
+            else
+                camera->attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER0+i), textureRect[i]);
+
+                
         }
      
@@ -417,8 +422,11 @@
     while (arguments.read("--image")) { useImage = true; }
 
+    bool useMultiSample = false;
+    while (arguments.read("--ms")) { useMultiSample = true; }
+
     osg::Group* subGraph = createRTTQuad(tex_width, tex_height, useHDR);
 
     osg::Group* rootNode = new osg::Group();
-    rootNode->addChild(createScene(subGraph, tex_width, tex_height, useHDR, useImage));
+    rootNode->addChild(createScene(subGraph, tex_width, tex_height, useHDR, useImage, useMultiSample));
 
     // add model to the viewer.
