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

Ken Martin ken.martin at kitware.com
Wed Nov 25 17:30:07 EST 2015


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 <lonni.besancon at gmail.com>
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 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 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
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151125/11b38577/attachment.html>


More information about the vtkusers mailing list