Ok, after alot of digging I found the problem. It seems that none of the new unstructured volume renderers properly support Mesa. My best guess is that it was setting up the scene with mangled-mesa contexts, and then the Volume Rendering was using true OpenGL.  Every command probably returned an error (no GL context), but nothing checks it, so it rendering blindly & ignorant of what was going on.  
<br><br>After alot of work, I managed to apply the same structure as the other objects to the vtkProjectedTetrahedraMapper successfully. There is now a vtkProjectedTetrahedraMapper that, with the help of the vtkVolumeRenderingFactory, can properly instantiate either a vtkOpenGLProjectedTetrahedraMapper or a vtkMesaProjectedTetrahedraMapper.&nbsp; From the testing I've done here (with the hello-world code shown originally), I've been able to switch between the two pretty easily and get almost identical results.&nbsp; There are a few discrepancies, but since this is a hardware accelerated version it's very susceptible to the fine variations between how Mesa emulates the hardware and various hardware platforms actually work.
<br><br>So, who @Kitware do I need to talk to to get this patch back to mainstream?&nbsp; I plan to file a bug on it, with code attached, tomorrow morning when I return to the office.&nbsp; This is a little larger patch that I usually deal with (4 new files, extensive changes to a few others), so what's the preferred format for a patch this size?&nbsp; I know there's a command with 'cvs diff' to get &quot;patch&quot;-style diffs, which seems the best option, but I always forget it...
<br><br><div><span class="gmail_quote">On 4/3/06, <b class="gmail_sendername">Randall Hand</b> &lt;<a href="mailto:randall.hand@gmail.com">randall.hand@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">I've got a dataset in legacy VTK format with several fields, and i'm trying to do a volume rendering of it.&nbsp; I've been having alot of trouble with it, so I finally boiled it down to the following sample:
<br><div style="margin-left: 40px; font-family: courier new,monospace;">
<br>#include &lt;vtkDataSetReader.h&gt;<br>#include &lt;vtkDataSetTriangleFilter.h&gt;<br>#include &lt;vtkProjectedTetrahedraMapper.h&gt;<br>#include &lt;vtkVolumeProperty.h&gt;<br>#include &lt;vtkColorTransferFunction.h
&gt;
<br>#include &lt;vtkPiecewiseFunction.h&gt;<br>#include &lt;vtkVolume.h&gt;<br>#include &lt;vtkRenderWindow.h&gt;<br>#include &lt;vtkRenderer.h&gt;<br>#include &lt;vtkRenderWindowInteractor.h&gt;<br>#include &lt;vtkDataSet.h

&gt;<br>#include &lt;vtkPNGWriter.h&gt;<br>#include &lt;vtkRenderLargeImage.h&gt;<br>#include &lt;vtkWindowToImageFilter.h&gt;<br>#include &lt;vtkGraphicsFactory.h&gt;<br>#include &lt;vtkImagingFactory.h&gt;<br>int main(void) {
<br>#ifdef _USE_MESA_<br>&nbsp;&nbsp;&nbsp; vtkGraphicsFactory *factGraphics = vtkGraphicsFactory::New();<br>&nbsp;&nbsp;&nbsp; factGraphics-&gt;SetUseMesaClasses(1);<br>&nbsp;&nbsp;&nbsp; factGraphics-&gt;SetOffScreenOnlyMode(1);<br>&nbsp;&nbsp;&nbsp; factGraphics-&gt;Delete();<br>

&nbsp;&nbsp;&nbsp; vtkImagingFactory *factImage = vtkImagingFactory::New();<br>&nbsp;&nbsp;&nbsp; factImage-&gt;SetUseMesaClasses(1);<br>&nbsp;&nbsp;&nbsp; factImage-&gt;Delete();<br><br>#endif<br><br>&nbsp;&nbsp;&nbsp; vtkDataSetReader *in = vtkDataSetReader::New();<br>&nbsp;&nbsp;&nbsp; in-&gt;SetFileName(&quot;
output.vtk&quot;);<br>&nbsp;&nbsp;&nbsp; in-&gt;ReadAllFieldsOn();<br>&nbsp;&nbsp;&nbsp; in-&gt;ReadAllScalarsOn();<br>&nbsp;&nbsp;&nbsp; in-&gt;ReadAllVectorsOn();<br>&nbsp;&nbsp;&nbsp; in-&gt;ReadAllTensorsOn();<br>&nbsp;&nbsp;&nbsp; in-&gt;ReadAllNormalsOn();<br>&nbsp;&nbsp;&nbsp; in-&gt;ReadAllColorScalarsOn();
<br>&nbsp;&nbsp;&nbsp; in-&gt;ReadAllTCoordsOn();<br>&nbsp;&nbsp;&nbsp; in-&gt;Update();<br><br>&nbsp;&nbsp;&nbsp; vtkDataSetTriangleFilter *tri = vtkDataSetTriangleFilter::New();<br>&nbsp;&nbsp;&nbsp; tri-&gt;SetInput(in-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp; tri-&gt;Update();<br><br>&nbsp;&nbsp;&nbsp; vtkProjectedTetrahedraMapper *projTet = vtkProjectedTetrahedraMapper::New();
<br>&nbsp;&nbsp;&nbsp; projTet-&gt;SetInput(tri-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp; projTet-&gt;SelectScalarArray(&quot;Function0&quot;);<br><br>&nbsp;&nbsp;&nbsp; vtkVolumeProperty *volProp = vtkVolumeProperty::New();<br>&nbsp;&nbsp;&nbsp; volProp-&gt;ShadeOff();<br><br>&nbsp;&nbsp;&nbsp; vtkColorTransferFunction *cmap = vtkColorTransferFunction::New();
<br>&nbsp;&nbsp;&nbsp; cmap-&gt;AddHSVPoint(0.0, 0.6667,1,1);<br>&nbsp;&nbsp;&nbsp; cmap-&gt;AddHSVPoint(0.001, 0.3333,1,1);<br>&nbsp;&nbsp;&nbsp; cmap-&gt;AddHSVPoint(0.002, 0.0,1,1);<br><br>&nbsp;&nbsp;&nbsp; vtkPiecewiseFunction *omap = vtkPiecewiseFunction::New();<br>&nbsp;&nbsp;&nbsp; omap-&gt;AddPoint(
0.0, 1.0);<br>&nbsp;&nbsp;&nbsp; omap-&gt;AddPoint(0.001, 1.0);<br>&nbsp;&nbsp;&nbsp; omap-&gt;AddPoint(0.002, 1.0);<br><br>&nbsp;&nbsp;&nbsp; volProp-&gt;SetColor(cmap);<br>&nbsp;&nbsp;&nbsp; volProp-&gt;SetScalarOpacity(omap);<br><br>&nbsp;&nbsp;&nbsp; vtkVolume *volume = vtkVolume::New();<br>

&nbsp;&nbsp;&nbsp; volume-&gt;SetMapper(projTet);<br>&nbsp;&nbsp;&nbsp; volume-&gt;SetProperty(volProp);<br><br>&nbsp;&nbsp;&nbsp; vtkRenderWindow *renWin = vtkRenderWindow::New();<br>&nbsp;&nbsp;&nbsp; vtkRenderer *ren1 = vtkRenderer::New();<br><br>&nbsp;&nbsp;&nbsp; renWin-&gt;OffScreenRenderingOn();
<br>&nbsp;&nbsp;&nbsp; renWin-&gt;AddRenderer(ren1);<br>&nbsp;&nbsp;&nbsp; ren1-&gt;AddVolume(volume);<br>&nbsp;&nbsp;&nbsp; renWin-&gt;SetSize(800,600);<br><br>&nbsp;&nbsp;&nbsp; renWin-&gt;Modified();<br>&nbsp;&nbsp;&nbsp; vtkWindowToImageFilter *w2if = vtkWindowToImageFilter::New();<br>&nbsp;&nbsp;&nbsp; w2if-&gt;SetInput(renWin);
<br>&nbsp;&nbsp;&nbsp; //vtkRenderLargeImage *w2if = vtkRenderLargeImage::New();<br>&nbsp;&nbsp;&nbsp; //w2if-&gt;SetInput(ren1);<br>&nbsp;&nbsp;&nbsp; //w2if-&gt;SetMagnification(1);<br><br>&nbsp;&nbsp;&nbsp; vtkPNGWriter *png = vtkPNGWriter::New();<br>&nbsp;&nbsp;&nbsp; png-&gt;SetFileName(&quot;
frame.png&quot;);<br>&nbsp;&nbsp;&nbsp; png-&gt;SetInput(w2if-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp; png-&gt;Write();<br><br>}<br><br><br></div>When _USE_MESA_ is disabled, then it momentarily flashes a window on the screen, and the resulting PNG on disk is correct (pretty much).&nbsp; When _USE_MESA_ is enabled, then it takes noticably longer to process and no window appears, but the resulting PNG on disk is a big empty blackness.&nbsp; Any idea what's going on here?
<br></div><div style="direction: ltr;"><span class="sg">-- <br>Randall Hand<br>Visualization Scientist, <br>ERDC-MSRC Vicksburg, MS<br>Homepage: <a href="http://www.yeraze.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.yeraze.com</a>

</span></div></blockquote></div><br><br clear="all"><br>-- <br>Randall Hand<br>Visualization Scientist, <br>ERDC-MSRC Vicksburg, MS<br>Homepage: <a href="http://www.yeraze.com">http://www.yeraze.com</a>