<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle">P {
MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
P {
MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
</style>
</head>
<body fPStyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<p>Hi,</p>
<p> </p>
<p>I have finally found how to display my colored points.</p>
<p> </p>
<p>Instead of using</p>
<p><font color="#800000"> points</font>->SetPoint(<font color="navy">0</font>,<font color="silver">
</font><font color="navy">0.1</font>,<font color="silver"> </font><font color="navy">0.0</font>,<font color="silver">
</font><font color="navy">0.0</font>);</p>
<p>I have used </p>
<p><span style="COLOR: #800000"> points</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">InsertNextPoint</span><span style="COLOR: #000000">(</span><span style="COLOR: #000080">0.1</span><span style="COLOR: #000000">,</span><span style="COLOR: #c0c0c0">
</span><span style="COLOR: #000080">0.0</span><span style="COLOR: #000000">,</span><span style="COLOR: #c0c0c0">
</span><span style="COLOR: #000080">0.0</span><span style="COLOR: #000000">);</span></p>
<p><span style="COLOR: #000000"></span> </p>
<p><span style="COLOR: #000000">and it works like a charm !</span></p>
<p><span style="COLOR: #000000"></span> </p>
<p><span style="COLOR: #000000">Could someone explain me(us) why, calling this API, it does not make appear the 2 warning messages below ?</span></p>
<p><span style="COLOR: #000000"></span> </p>
<p><span style="COLOR: #000000">Best regards,</span></p>
<p><span style="COLOR: #000000">David.</span></p>
<div style="FONT-SIZE: 16px; FONT-FAMILY: Times New Roman; COLOR: #000000">
<hr tabindex="-1">
<div id="divRpF938597" style="DIRECTION: ltr"><font color="#000000" size="2" face="Tahoma"><b>De :</b> vtkusers [vtkusers-bounces@vtk.org] de la part de MOUSSAUD David 244079<br>
<b>Envoyé :</b> jeudi 14 janvier 2016 09:51<br>
<b>À :</b> vtkusers@vtk.org<br>
<b>Objet :</b> [PROVENANCE INTERNET] [vtkusers] opengl2 : set the RGB color to a vertex with vtkPolyData and vtkPolyDataMapper<br>
</font><br>
</div>
<div></div>
<div>
<div style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma; COLOR: #000000; DIRECTION: ltr">
<p>Dear all,</p>
<p> </p>
<p>I'm trying to use the opengl2 backend rendering. I am with the 6.3 release version.</p>
<p> </p>
<p>I have a working code to display 3 colored vertex that works with opengl1 (cf below and attached file).</p>
<p> </p>
<p> </p>
<p><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">//</span><span style="COLOR: #c0c0c0">
</span><span style="COLOR: #008000">Setup</span><span style="COLOR: #c0c0c0"> </span>
<span style="COLOR: #008000">points</span></p>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">points</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800080">vtkSmartPointer</span><span style="COLOR: #000000"><</span><span style="COLOR: #800080">vtkPoints</span><span style="COLOR: #000000">>::</span><span style="COLOR: #000000">New</span><span style="COLOR: #000000">();</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">//</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">Setup</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">the</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">colors</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">array</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">colors</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800080">vtkSmartPointer</span><span style="COLOR: #000000"><</span><span style="COLOR: #800080">vtkUnsignedCharArray</span><span style="COLOR: #000000">>::</span><span style="COLOR: #000000">New</span><span style="COLOR: #000000">();</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">colors</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000; FONT-STYLE: italic">SetNumberOfComponents</span><span style="COLOR: #000000">(</span><span style="COLOR: #000080">3</span><span style="COLOR: #000000">);</span><span style="COLOR: #c0c0c0"> </span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">colors</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000; FONT-STYLE: italic">SetName</span><span style="COLOR: #000000">(</span><span style="COLOR: #008000">"Colors"</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">//</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">create</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">a</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">vertex</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">vertex</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800080">vtkSmartPointer</span><span style="COLOR: #000000"><</span><span style="COLOR: #800080">vtkVertex</span><span style="COLOR: #000000">>::</span><span style="COLOR: #000000">New</span><span style="COLOR: #000000">();</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">//</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">list</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">of</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">all</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">the</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">vertices</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">vertices</span><span style="COLOR: #000000">=</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800080">vtkSmartPointer</span><span style="COLOR: #000000"><</span><span style="COLOR: #800080">vtkCellArray</span><span style="COLOR: #000000">>::</span><span style="COLOR: #000000">New</span><span style="COLOR: #000000">();</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">nb_points</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000080">3</span><span style="COLOR: #000000">;</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">points</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">Resize</span><span style="COLOR: #000000">(</span><span style="COLOR: #800000">nb_points</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">vertices</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">Initialize</span><span style="COLOR: #000000">();</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">colors</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000; FONT-STYLE: italic">Initialize</span><span style="COLOR: #000000">();</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">points</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">SetPoint</span><span style="COLOR: #000000">(</span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">,</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000080">0.1</span><span style="COLOR: #000000">,</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000080">0.0</span><span style="COLOR: #000000">,</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000080">0.0</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">vertex</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">GetPointIds</span><span style="COLOR: #000000">()-></span><span style="COLOR: #000000">SetId</span><span style="COLOR: #000000">(</span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">,</span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">vertices</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">InsertNextCell</span><span style="COLOR: #000000">(</span><span style="COLOR: #800000">vertex</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">colors</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">InsertNextTuple3</span><span style="COLOR: #000000">(</span><span style="COLOR: #000080">255</span><span style="COLOR: #000000">,</span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">,</span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">points</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">SetPoint</span><span style="COLOR: #000000">(</span><span style="COLOR: #000080">1</span><span style="COLOR: #000000">,</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">,</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000080">0.1</span><span style="COLOR: #000000">,</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000080">0.0</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">vertex</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">GetPointIds</span><span style="COLOR: #000000">()-></span><span style="COLOR: #000000">SetId</span><span style="COLOR: #000000">(</span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">,</span><span style="COLOR: #000080">1</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">vertices</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">InsertNextCell</span><span style="COLOR: #000000">(</span><span style="COLOR: #800000">vertex</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">colors</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">InsertNextTuple3</span><span style="COLOR: #000000">(</span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">,</span><span style="COLOR: #000080">255</span><span style="COLOR: #000000">,</span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">points</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">SetPoint</span><span style="COLOR: #000000">(</span><span style="COLOR: #000080">2</span><span style="COLOR: #000000">,</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">,</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000080">0.0</span><span style="COLOR: #000000">,</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000080">0.1</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">vertex</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">GetPointIds</span><span style="COLOR: #000000">()-></span><span style="COLOR: #000000">SetId</span><span style="COLOR: #000000">(</span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">,</span><span style="COLOR: #000080">2</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">vertices</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">InsertNextCell</span><span style="COLOR: #000000">(</span><span style="COLOR: #800000">vertex</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">colors</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">InsertNextTuple3</span><span style="COLOR: #000000">(</span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">,</span><span style="COLOR: #000080">0</span><span style="COLOR: #000000">,</span><span style="COLOR: #000080">255</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">//</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">Create</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">a</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">polydata</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">object</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">and</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">add</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">everything</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">to</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">it</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">polydata</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800080">vtkSmartPointer</span><span style="COLOR: #000000"><</span><span style="COLOR: #800080">vtkPolyData</span><span style="COLOR: #000000">>::</span><span style="COLOR: #000000">New</span><span style="COLOR: #000000">();</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">polydata</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000; FONT-STYLE: italic">SetPoints</span><span style="COLOR: #000000">(</span><span style="COLOR: #800000">points</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">polydata</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">SetVerts</span><span style="COLOR: #000000">(</span><span style="COLOR: #800000">vertices</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">polydata</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">GetPointData</span><span style="COLOR: #000000">()-></span><span style="COLOR: #000000">SetScalars</span><span style="COLOR: #000000">(</span><span style="COLOR: #800000">colors</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">mapper</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800080">vtkSmartPointer</span><span style="COLOR: #000000"><</span><span style="COLOR: #800080">vtkPolyDataMapper</span><span style="COLOR: #000000">>::</span><span style="COLOR: #000000">New</span><span style="COLOR: #000000">();</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">mapper</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">SetInputData</span><span style="COLOR: #000000">(</span><span style="COLOR: #800000">polydata</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">actor</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800080">vtkSmartPointer</span><span style="COLOR: #000000"><</span><span style="COLOR: #800080">vtkActor</span><span style="COLOR: #000000">>::</span><span style="COLOR: #000000">New</span><span style="COLOR: #000000">();</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">actor</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000; FONT-STYLE: italic">SetMapper</span><span style="COLOR: #000000">(</span><span style="COLOR: #800000">mapper</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">actor</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">GetProperty</span><span style="COLOR: #000000">()-></span><span style="COLOR: #000000; FONT-STYLE: italic">SetPointSize</span><span style="COLOR: #000000">(</span><span style="COLOR: #000080">5</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">//</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">Setup</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">window</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">renderWindow</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800080">vtkSmartPointer</span><span style="COLOR: #000000"><</span><span style="COLOR: #800080">vtkRenderWindow</span><span style="COLOR: #000000">>::</span><span style="COLOR: #000000">New</span><span style="COLOR: #000000">();</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">//</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">Setup</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #008000">renderer</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">renderer</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #000000">=</span><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800080">vtkSmartPointer</span><span style="COLOR: #000000"><</span><span style="COLOR: #800080">vtkRenderer</span><span style="COLOR: #000000">>::</span><span style="COLOR: #000000">New</span><span style="COLOR: #000000">();</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">renderWindow</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000; FONT-STYLE: italic">AddRenderer</span><span style="COLOR: #000000">(</span><span style="COLOR: #800000">renderer</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">renderer</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">AddActor</span><span style="COLOR: #000000">(</span><span style="COLOR: #800000">actor</span><span style="COLOR: #000000">);</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #800000">renderer</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">ResetCamera</span><span style="COLOR: #000000">();</span></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><br></pre>
<pre style="MARGIN: 0px; TEXT-INDENT: 0px"><span style="COLOR: #c0c0c0"> </span><span style="COLOR: #808000">this</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000; FONT-STYLE: italic">SetRenderWindow</span><span style="COLOR: #000000">(</span><span style="COLOR: #800000">renderWindow</span><span style="COLOR: #000000">);</span></pre>
<p> </p>
<p>When I compile the same project with my vtk library compiled with the opengl2 backend rendering,</p>
<p> </p>
<p>I have this error :</p>
<p> </p>
<p>ERROR: In C:\work\lib\vtk\VTK-6.3.0\VTK-6.3.0\Rendering\OpenGL2\vtkOpenGLPolyDataMapper.cxx, line 1223<br>
vtkOpenGLPolyDataMapper (0000000000501B90): Error setting 'vertexMC' in shader VAO.</p>
<p>ERROR: In C:\work\lib\vtk\VTK-6.3.0\VTK-6.3.0\Rendering\OpenGL2\vtkOpenGLPolyDataMapper.cxx, line 1250<br>
vtkOpenGLPolyDataMapper (0000000000501B90): Error setting 'scalarColor' in shader VAO.</p>
<p> </p>
<p>For information, I've tried the same with a vtkPlyReader based project and I've succeed to render it with opengl2 backend (and it works very much better !)</p>
<p> </p>
<p>Best Regards,</p>
<p>David.</p>
<p> </p>
<p> </p>
</div>
</div>
</div>
</div>
</body>
</html>