[vtkusers] Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY

Lonni Besançon lonni.besancon at gmail.com
Thu Nov 26 07:00:18 EST 2015


Thanks again for your answer and the help you have provided once again.

I’m afraid it cannot be a problem with the mapper as it is set before this function is called ( I can check that easily because I use an other function that does exactly what I want to do in terms of rotating and translating an actor before I call this one ).

One of the weird things is that the matrix is apparently modified because I have tried to send it through UDP to an other machine to check if that was working and apparently it is working (the matrix I receive is modified it’s just that the rendering cannot be done for some unknown reason).

Again, thanks for the help you have provided me so far, you have been more than helpful. 

Contact me when you’re back and I could send you the whole project if you’d like to take a better look at it (however be aware that I’m still playing with vtk for android, so the code is not optimised at all but that is not the point for the time being).

Have a very nice holiday with your family (wish we had the equivalent of Thanksgiving in France).


Best / Cordialement,

Lonni Besançon
PhD Student with the AVIZ <http://www.aviz.fr/> team at Inria and with the HAPCO <http://hapco.limsi.fr/> team at Limsi/CNRS
Teaching Assistant at Polytech Paris Sud and Université Paris Sud
Address: University Paris-Saclay, Bat 660 (Digiteo) — Office 1041
Email: lonni.besancon at gmail.com <mailto:lonni.besancon at gmail.com>
Phone: +33689902815 <tel:%2B33689902815>
WebPage: http://lonni.besancon.pagesperso-orange.fr <http://lonni.besancon.pagesperso-orange.fr/> 
LinkedIn: fr.linkedin.com/pub/lonni-besançon/77/552/a38/en <http://fr.linkedin.com/pub/lonni-besan%C3%A7on/77/552/a38/en>







> On 25 Nov 2015, at 23:30, Ken Martin [via VTK] <ml-node+s1045678n5735198h31 at n5.nabble.com> wrote:
> 
> Thanks Lonni,
> 
> 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.
> 
> Thanks
> Ken
> 
> 
> On Mon, Nov 23, 2015 at 11:59 AM, Lonni Besançon <[hidden email] <x-msg://15/user/SendEmail.jtp?type=node&node=5735198&i=0>> wrote:
> Sorry for the time I took to answer. I will update the post on SO.
> 
> So here is the code I got from the error macro:
> /W/NativeVTK( 7871): rotation = 0.000000 ;;; 0.000000 ;;; 0.583755
> E/VTK     ( 7871): ERROR: In
> /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx,
> line 1237
> E/VTK     ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): VS:
> //VTK::System::Dec
> E/VTK     ( 7871):
> /*=========================================================================
> E/VTK     ( 7871):   Program:   Visualization Toolkit
> E/VTK     ( 7871):   Module:    vtkPolyDataVS.glsl
> E/VTK     ( 7871):   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
> E/VTK     ( 7871):   All rights reserved.
> E/VTK     ( 7871):   See Copyright.txt or
> http://www.kitware.com/Copyright.htm <http://www.kitware.com/Copyright.htm> for details.
> E/VTK     ( 7871):      This software is distributed WITHOUT ANY WARRANTY;
> without even
> E/VTK     ( 7871):      the implied warranty of MERCHANTABILITY or FITNESS
> FOR A PARTICULAR
> E/VTK     ( 7871):      PURPOSE.  See the above copyright notice for more
> information.
> E/VTK     ( 7871):
> =========================================================================*/
> E/VTK     ( 7871): attribute vec4 vertexMC;
> E/VTK     ( 7871): // frag position in VC
> E/VTK     ( 7871): varying vec4 vertexVCVSOutput;
> E/VTK     ( 7871): // optional normal declaration
> E/VTK     ( 7871): attribute vec3 normalMC;
> E/VTK     ( 7871): uniform mat3 normalMatrix;
> E/VTK     ( 7871): varying vec3 normalVCVSOutput;
> E/VTK     ( 7871): // extra lighting parameters
> E/VTK     ( 7871): //VTK::Light::Dec
> E/VTK     ( 7871): // Texture coordinates
> E/VTK     ( 7871): //VTK::TCoord::Dec
> E/VTK     ( 7871): // material property values
> E/VTK     ( 7871): //VTK::Color::Dec
> E/VTK     ( 7871): // clipping plane vars
> E/VTK     ( 7871): //VTK::Clip::Dec
> E/VTK     ( 7871): // camera and actor matrix values
> E/VTK     ( 7871): uniform mat4 MCDCMatrix;
> E/VTK     ( 7871): uniform mat4 MCVCMatrix;
> E/VTK     ( 7871): // Apple Bug
> E/VTK     ( 7871): //VTK::PrimID::Dec
> E/VTK     ( 7871): void main()
> E/VTK     ( 7871): {
> E/VTK     ( 7871):   //VTK::Color::Impl
> E/VTK     ( 7871):   normalVCVSOutput = normalMatrix * normalMC;
> E/VTK     ( 7871):   //VTK::TCoord::Impl
> E/VTK     ( 7871):   //VTK::Clip::Impl
> E/VTK     ( 7871):   //VTK::PrimID::Impl
> E/VTK     ( 7871):   vertexVCVSOutput = MCVCMatrix * vertexMC;
> E/VTK     ( 7871):   gl_Position = MCDCMatrix * vertexMC;
> E/VTK     ( 7871):   //VTK::Light::Impl
> E/VTK     ( 7871): }
> E/VTK     ( 7871): ERROR: In
> /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx,
> line 1238
> E/VTK     ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): GS:
> E/VTK     ( 7871): ERROR: In
> /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx,
> line 1239
> E/VTK     ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): FS:
> //VTK::System::Dec
> E/VTK     ( 7871):
> /*=========================================================================
> E/VTK     ( 7871):   Program:   Visualization Toolkit
> E/VTK     ( 7871):   Module:    vtkPolyDataFS.glsl
> E/VTK     ( 7871):   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
> E/VTK     ( 7871):   All rights reserved.
> E/VTK     ( 7871):   See Copyright.txt or
> http://www.kitware.com/Copyright.htm <http://www.kitware.com/Copyright.htm> for details.
> E/VTK     ( 7871):      This software is distributed WITHOUT ANY WARRANTY;
> without even
> E/VTK     ( 7871):      the implied warranty of MERCHANTABILITY or FITNESS
> FOR A PARTICULAR
> E/VTK     ( 7871):      PURPOSE.  See the above copyright notice for more
> information.
> E/VTK     ( 7871):
> =========================================================================*/
> E/VTK     ( 7871): // Template for the polydata mappers fragment shader
> E/VTK     ( 7871): uniform int PrimitiveIDOffset;
> E/VTK     ( 7871): // VC position of this fragment
> E/VTK     ( 7871): varying vec4 vertexVCVSOutput;
> I/tango   (  186): vio-fault-detector.cc:74 IMU and camera data quality are
> qualified for VIO recovery.
> W/tango   (  186): vio-status-monitor.cc:208 VIO is ready for reset. Current
> timestamp 20626.498361783
> W/tango   (  186): vio-status-monitor.cc:93 VIO receives reasonable visual
> and inertial data, try to reset now.
> I/tango   (  186): vio-status-monitor.cc:97 Resetting with last good frame.
> E/VTK     ( 7871): // optional color passed in from the vertex shader,
> vertexColor
> E/VTK     ( 7871): uniform float opacityUniform; // the fragment opacity
> E/VTK     ( 7871): uniform vec3 ambientColorUniform; // intensity weighted
> color
> E/VTK     ( 7871): uniform vec3 diffuseColorUniform; // intensity weighted
> color
> E/VTK     ( 7871): uniform vec3 specularColorUniform; // intensity weighted
> color
> E/VTK     ( 7871): uniform float specularPowerUniform;
> E/VTK     ( 7871): // optional surface normal declaration
> E/VTK     ( 7871): varying vec3 normalVCVSOutput;
> E/VTK     ( 7871): // extra lighting parameters
> E/VTK     ( 7871): //VTK::Light::Dec
> E/VTK     ( 7871): // Texture coordinates
> E/VTK     ( 7871): //VTK::TCoord::Dec
> E/VTK     ( 7871): // picking support
> E/VTK     ( 7871): //VTK::Picking::Dec
> E/VTK     ( 7871): // Depth Peeling Support
> E/VTK     ( 7871): //VTK::DepthPeeling::Dec
> E/VTK     ( 7871): // clipping plane vars
> E/VTK     ( 7871): //VTK::Clip::Dec
> E/VTK     ( 7871): // the output of this shader
> E/VTK     ( 7871): //VTK::Output::Dec
> E/VTK     ( 7871): // Apple Bug
> E/VTK     ( 7871): //VTK::PrimID::Dec
> E/VTK     ( 7871): void main()
> E/VTK     ( 7871): {
> E/VTK     ( 7871):   // Apple Bug
> E/VTK     ( 7871):   //VTK::PrimID::Impl
> E/VTK     ( 7871):   //VTK::Clip::Impl
> E/VTK     ( 7871):   vec3 ambientColor;
> E/VTK     ( 7871):   vec3 diffuseColor;
> E/VTK     ( 7871):   float opacity;
> E/VTK     ( 7871):   vec3 specularColor;
> E/VTK     ( 7871):   float specularPower;
> E/VTK     ( 7871):   ambientColor = ambientColorUniform;
> E/VTK     ( 7871):   diffuseColor = diffuseColorUniform;
> E/VTK     ( 7871):   opacity = opacityUniform;
> E/VTK     ( 7871):   specularColor = specularColorUniform;
> E/VTK     ( 7871):   specularPower = specularPowerUniform;
> E/VTK     ( 7871):   // VC position of this fragment
> E/VTK     ( 7871):   vec4 vertexVC = vertexVCVSOutput;
> E/VTK     ( 7871):   // Generate the normal if we are not passed in one
> E/VTK     ( 7871):   vec3 normalVCVSOutput = normalize(normalVCVSOutput);
> E/VTK     ( 7871):   if (gl_FrontFacing == false) { normalVCVSOutput =
> -normalVCVSOutput; }
> E/VTK     ( 7871):     float df = max(0.0, normalVCVSOutput.z);
> E/VTK     ( 7871):   float sf = pow(df, specularPower);
> E/VTK     ( 7871):   vec3 diffuse = df * diffuseColor;
> E/VTK     ( 7871):   vec3 specular = sf * specularColor;
> E/VTK     ( 7871):   gl_FragData[0] = vec4(ambientColor + diffuse +
> specular, opacity);
> E/VTK     ( 7871):   //VTK::Light::Impl
> E/VTK     ( 7871):   //VTK::TCoord::Impl
> E/VTK     ( 7871):   if (gl_FragData[0].a <= 0.0)
> E/VTK     ( 7871):     {
> E/VTK     ( 7871):     discard;
> E/VTK     ( 7871):     }
> E/VTK     ( 7871):   //VTK::DepthPeeling::Impl
> E/VTK     ( 7871):   //VTK::Picking::Impl
> E/VTK     ( 7871): }
> E/VTK     ( 7871): ERROR: In
> /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx,
> line 1421
> E/VTK     ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): Error setting
> 'vertexMC' in shader VAO.
> E/VTK     ( 7871): ERROR: In
> /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx,
> line 1429
> E/VTK     ( 7871): vtkOpenGLPolyDataMapper (0x4ba59268): Error setting
> 'normalMC' in shader VAO.
> E/VTK     ( 7871): ERROR: In
> /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx,
> line 1237
> /
> 
> Did I provide enough information? Please let me know if something is
> missing.
> 
> Have a nice day and thanks again
> 
> 
> 
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735161.html <http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735161.html>
> Sent from the VTK - Users mailing list archive at Nabble.com <http://nabble.com/>.
> _______________________________________________
> Powered by www.kitware.com <http://www.kitware.com/>
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html <http://www.kitware.com/opensource/opensource.html>
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ <http://www.vtk.org/Wiki/VTK_FAQ>
> 
> Search the list archives at: http://markmail.org/search/?q=vtkusers <http://markmail.org/search/?q=vtkusers>
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers <http://public.kitware.com/mailman/listinfo/vtkusers>
> 
> 
> 
> -- 
> Ken Martin PhD
> Chairman & CFO
> Kitware Inc.
> 28 Corporate Drive
> Clifton Park NY 12065
> 518 371 3971
> 
> 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.
> 
> _______________________________________________ 
> Powered by www.kitware.com <http://www.kitware.com/> 
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html <http://www.kitware.com/opensource/opensource.html>
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ <http://www.vtk.org/Wiki/VTK_FAQ>
> 
> Search the list archives at: http://markmail.org/search/?q=vtkusers <http://markmail.org/search/?q=vtkusers>
> 
> Follow this link to subscribe/unsubscribe: 
> http://public.kitware.com/mailman/listinfo/vtkusers <http://public.kitware.com/mailman/listinfo/vtkusers>
> 
> 
> If you reply to this email, your message will be added to the discussion below:
> http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735198.html <http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735198.html>
> To unsubscribe from Error setting 'vertexMC' in shader VAO and EGL_BAD_DISPLAY, click here <http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5735057&code=bG9ubmkuYmVzYW5jb25AZ21haWwuY29tfDU3MzUwNTd8MTcxODAwMTkxOA==>.
> NAML <http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://vtk.1045678.n5.nabble.com/Error-setting-vertexMC-in-shader-VAO-and-EGL-BAD-DISPLAY-tp5735057p5735213.html
Sent from the VTK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151126/28d8ba54/attachment.html>


More information about the vtkusers mailing list