<div dir="ltr">Thanks Lonni,<div><br></div><div>The shaders look fine so I suspect what is happening is that somehow a render is getting called when there is no data for the mapper. The "error setting attribute" type problems stem from either the shader not actually using the passed attribute or attempting to set the attribute with no data. Looking at the shader the attributes are definitely being used which means the error is maybe due to somehow setting the attribute with no data. Maybe somehow the mapper is not setup yet when your new method is getting called?  I'm out for Thanksgiving the rest of the week but if you are still stuck next week let me know and I can look a bit deeper.</div><div><br></div><div>Thanks</div><div>Ken</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 23, 2015 at 11:59 AM, Lonni Besançon <span dir="ltr"><<a href="mailto:lonni.besancon@gmail.com" target="_blank">lonni.besancon@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry for the time I took to answer. I will update the post on SO.<br>
<br>
So here is the code I got from the error macro:<br>
/W/NativeVTK( 7871): rotation = 0.000000 ;;; 0.000000 ;;; 0.583755<br>
E/VTK     ( 7871): ERROR: In<br>
/Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx,<br>
line 1237<br>
E/VTK     ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): VS:<br>
//VTK::System::Dec<br>
E/VTK     ( 7871):<br>
/*=========================================================================<br>
E/VTK     ( 7871):   Program:   Visualization Toolkit<br>
E/VTK     ( 7871):   Module:    vtkPolyDataVS.glsl<br>
E/VTK     ( 7871):   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen<br>
E/VTK     ( 7871):   All rights reserved.<br>
E/VTK     ( 7871):   See Copyright.txt or<br>
<a href="http://www.kitware.com/Copyright.htm" rel="noreferrer" target="_blank">http://www.kitware.com/Copyright.htm</a> for details.<br>
E/VTK     ( 7871):      This software is distributed WITHOUT ANY WARRANTY;<br>
without even<br>
E/VTK     ( 7871):      the implied warranty of MERCHANTABILITY or FITNESS<br>
FOR A PARTICULAR<br>
E/VTK     ( 7871):      PURPOSE.  See the above copyright notice for more<br>
information.<br>
E/VTK     ( 7871):<br>
=========================================================================*/<br>
E/VTK     ( 7871): attribute vec4 vertexMC;<br>
E/VTK     ( 7871): // frag position in VC<br>
E/VTK     ( 7871): varying vec4 vertexVCVSOutput;<br>
E/VTK     ( 7871): // optional normal declaration<br>
E/VTK     ( 7871): attribute vec3 normalMC;<br>
E/VTK     ( 7871): uniform mat3 normalMatrix;<br>
E/VTK     ( 7871): varying vec3 normalVCVSOutput;<br>
E/VTK     ( 7871): // extra lighting parameters<br>
E/VTK     ( 7871): //VTK::Light::Dec<br>
E/VTK     ( 7871): // Texture coordinates<br>
E/VTK     ( 7871): //VTK::TCoord::Dec<br>
E/VTK     ( 7871): // material property values<br>
E/VTK     ( 7871): //VTK::Color::Dec<br>
E/VTK     ( 7871): // clipping plane vars<br>
E/VTK     ( 7871): //VTK::Clip::Dec<br>
E/VTK     ( 7871): // camera and actor matrix values<br>
E/VTK     ( 7871): uniform mat4 MCDCMatrix;<br>
E/VTK     ( 7871): uniform mat4 MCVCMatrix;<br>
E/VTK     ( 7871): // Apple Bug<br>
E/VTK     ( 7871): //VTK::PrimID::Dec<br>
E/VTK     ( 7871): void main()<br>
E/VTK     ( 7871): {<br>
E/VTK     ( 7871):   //VTK::Color::Impl<br>
E/VTK     ( 7871):   normalVCVSOutput = normalMatrix * normalMC;<br>
E/VTK     ( 7871):   //VTK::TCoord::Impl<br>
E/VTK     ( 7871):   //VTK::Clip::Impl<br>
E/VTK     ( 7871):   //VTK::PrimID::Impl<br>
E/VTK     ( 7871):   vertexVCVSOutput = MCVCMatrix * vertexMC;<br>
E/VTK     ( 7871):   gl_Position = MCDCMatrix * vertexMC;<br>
E/VTK     ( 7871):   //VTK::Light::Impl<br>
E/VTK     ( 7871): }<br>
E/VTK     ( 7871): ERROR: In<br>
/Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx,<br>
line 1238<br>
E/VTK     ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): GS:<br>
E/VTK     ( 7871): ERROR: In<br>
/Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx,<br>
line 1239<br>
E/VTK     ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): FS:<br>
//VTK::System::Dec<br>
E/VTK     ( 7871):<br>
/*=========================================================================<br>
E/VTK     ( 7871):   Program:   Visualization Toolkit<br>
E/VTK     ( 7871):   Module:    vtkPolyDataFS.glsl<br>
E/VTK     ( 7871):   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen<br>
E/VTK     ( 7871):   All rights reserved.<br>
E/VTK     ( 7871):   See Copyright.txt or<br>
<a href="http://www.kitware.com/Copyright.htm" rel="noreferrer" target="_blank">http://www.kitware.com/Copyright.htm</a> for details.<br>
E/VTK     ( 7871):      This software is distributed WITHOUT ANY WARRANTY;<br>
without even<br>
E/VTK     ( 7871):      the implied warranty of MERCHANTABILITY or FITNESS<br>
FOR A PARTICULAR<br>
E/VTK     ( 7871):      PURPOSE.  See the above copyright notice for more<br>
information.<br>
E/VTK     ( 7871):<br>
=========================================================================*/<br>
E/VTK     ( 7871): // Template for the polydata mappers fragment shader<br>
E/VTK     ( 7871): uniform int PrimitiveIDOffset;<br>
E/VTK     ( 7871): // VC position of this fragment<br>
E/VTK     ( 7871): varying vec4 vertexVCVSOutput;<br>
I/tango   (  186): vio-fault-detector.cc:74 IMU and camera data quality are<br>
qualified for VIO recovery.<br>
W/tango   (  186): vio-status-monitor.cc:208 VIO is ready for reset. Current<br>
timestamp 20626.498361783<br>
W/tango   (  186): vio-status-monitor.cc:93 VIO receives reasonable visual<br>
and inertial data, try to reset now.<br>
I/tango   (  186): vio-status-monitor.cc:97 Resetting with last good frame.<br>
E/VTK     ( 7871): // optional color passed in from the vertex shader,<br>
vertexColor<br>
E/VTK     ( 7871): uniform float opacityUniform; // the fragment opacity<br>
E/VTK     ( 7871): uniform vec3 ambientColorUniform; // intensity weighted<br>
color<br>
E/VTK     ( 7871): uniform vec3 diffuseColorUniform; // intensity weighted<br>
color<br>
E/VTK     ( 7871): uniform vec3 specularColorUniform; // intensity weighted<br>
color<br>
E/VTK     ( 7871): uniform float specularPowerUniform;<br>
E/VTK     ( 7871): // optional surface normal declaration<br>
E/VTK     ( 7871): varying vec3 normalVCVSOutput;<br>
E/VTK     ( 7871): // extra lighting parameters<br>
E/VTK     ( 7871): //VTK::Light::Dec<br>
E/VTK     ( 7871): // Texture coordinates<br>
E/VTK     ( 7871): //VTK::TCoord::Dec<br>
E/VTK     ( 7871): // picking support<br>
E/VTK     ( 7871): //VTK::Picking::Dec<br>
E/VTK     ( 7871): // Depth Peeling Support<br>
E/VTK     ( 7871): //VTK::DepthPeeling::Dec<br>
E/VTK     ( 7871): // clipping plane vars<br>
E/VTK     ( 7871): //VTK::Clip::Dec<br>
E/VTK     ( 7871): // the output of this shader<br>
E/VTK     ( 7871): //VTK::Output::Dec<br>
E/VTK     ( 7871): // Apple Bug<br>
E/VTK     ( 7871): //VTK::PrimID::Dec<br>
E/VTK     ( 7871): void main()<br>
E/VTK     ( 7871): {<br>
E/VTK     ( 7871):   // Apple Bug<br>
E/VTK     ( 7871):   //VTK::PrimID::Impl<br>
E/VTK     ( 7871):   //VTK::Clip::Impl<br>
E/VTK     ( 7871):   vec3 ambientColor;<br>
E/VTK     ( 7871):   vec3 diffuseColor;<br>
E/VTK     ( 7871):   float opacity;<br>
E/VTK     ( 7871):   vec3 specularColor;<br>
E/VTK     ( 7871):   float specularPower;<br>
E/VTK     ( 7871):   ambientColor = ambientColorUniform;<br>
E/VTK     ( 7871):   diffuseColor = diffuseColorUniform;<br>
E/VTK     ( 7871):   opacity = opacityUniform;<br>
E/VTK     ( 7871):   specularColor = specularColorUniform;<br>
E/VTK     ( 7871):   specularPower = specularPowerUniform;<br>
E/VTK     ( 7871):   // VC position of this fragment<br>
E/VTK     ( 7871):   vec4 vertexVC = vertexVCVSOutput;<br>
E/VTK     ( 7871):   // Generate the normal if we are not passed in one<br>
E/VTK     ( 7871):   vec3 normalVCVSOutput = normalize(normalVCVSOutput);<br>
E/VTK     ( 7871):   if (gl_FrontFacing == false) { normalVCVSOutput =<br>
-normalVCVSOutput; }<br>
E/VTK     ( 7871):     float df = max(0.0, normalVCVSOutput.z);<br>
E/VTK     ( 7871):   float sf = pow(df, specularPower);<br>
E/VTK     ( 7871):   vec3 diffuse = df * diffuseColor;<br>
E/VTK     ( 7871):   vec3 specular = sf * specularColor;<br>
E/VTK     ( 7871):   gl_FragData[0] = vec4(ambientColor + diffuse +<br>
specular, opacity);<br>
E/VTK     ( 7871):   //VTK::Light::Impl<br>
E/VTK     ( 7871):   //VTK::TCoord::Impl<br>
E/VTK     ( 7871):   if (gl_FragData[0].a <= 0.0)<br>
E/VTK     ( 7871):     {<br>
E/VTK     ( 7871):     discard;<br>
E/VTK     ( 7871):     }<br>
E/VTK     ( 7871):   //VTK::DepthPeeling::Impl<br>
E/VTK     ( 7871):   //VTK::Picking::Impl<br>
E/VTK     ( 7871): }<br>
E/VTK     ( 7871): ERROR: In<br>
/Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx,<br>
line 1421<br>
E/VTK     ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): Error setting<br>
'vertexMC' in shader VAO.<br>
E/VTK     ( 7871): ERROR: In<br>
/Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx,<br>
line 1429<br>
E/VTK     ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): Error setting<br>
'normalMC' in shader VAO.<br>
E/VTK     ( 7871): ERROR: In<br>
/Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx,<br>
line 1237<br>
/<br>
<br>
Did I provide enough information? Please let me know if something is<br>
missing.<br>
<br>
Have a nice day and thanks again<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735161.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735161.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Ken Martin PhD<div>Chairman & CFO<br>Kitware Inc.<br>28 Corporate Drive<br>Clifton Park NY 12065<br>518 371 3971<div><br></div><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee.  Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message. 
Thank you.</span></div></div></div>
</div>