<div dir="ltr">Ken, <div><br></div><div>Just curious: </div><div><br></div><div>Did we try setting the version number explicitly (I don't see it in the output shader string)? If a version is not set then by default GLSL assumes it is version 110 which is not what we want. More info here: <a href="https://www.opengl.org/wiki/Core_Language_%28GLSL%29">https://www.opengl.org/wiki/Core_Language_%28GLSL%29</a></div><div><br></div><div>Also, based on the message here: </div><div><span style="font-size:16px">0:100(28): error: operator '%' is reserved in GLSL 1.10 (GLSL 1.30 or</span><br style="font-size:16px"><span style="font-size:16px">GLSL ES 3.00 required)</span><br></div><div><span style="font-size:16px"><br></span></div><div><span style="font-size:16px">It seems like it is falling back to 110 even though system supports upto 130. </span></div><div><span style="font-size:16px"><br></span></div><div><span style="font-size:16px">Thanks,</span></div><div><span style="font-size:16px">Aashish</span></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 2, 2015 at 6:44 PM, Ken Martin <span dir="ltr"><<a href="mailto:ken.martin@kitware.com" target="_blank">ken.martin@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yup, known issue with Mesa. Right now picking with Mesa does not work. The<br>
mesa dashboard shows the same issue. We are slowly working on a fix which<br>
is basically making Mesa systems use a 3.2 context where they support the<br>
calls we need, but we have a couple more classes to convert to work with<br>
OpenGL 3.2 before that will work.<br>
<br>
Thanks<br>
Ken<br>
<br>
Ken Martin PhD<br>
Chairman & CFO<br>
Kitware Inc.<br>
28 Corporate Drive<br>
Clifton Park NY 12065<br>
<a href="mailto:ken.martin@kitware.com">ken.martin@kitware.com</a><br>
<a href="tel:518%20881-4901" value="+15188814901">518 881-4901</a> (w)<br>
<a href="tel:518%20371-4573" value="+15183714573">518 371-4573</a> (f)<br>
<br>
This communication, including all attachments, contains confidential and<br>
legally privileged information, and it is intended only for the use of the<br>
addressee.  Access to this email by anyone else is unauthorized. If you<br>
are not the intended recipient, any disclosure, copying, distribution or<br>
any action taken in reliance on it is prohibited and may be unlawful. If<br>
you received this communication in error please notify us immediately and<br>
destroy the original message.  Thank you.<br>
<div class="HOEnZb"><div class="h5"><br>
-----Original Message-----<br>
From: vtk-developers [mailto:<a href="mailto:vtk-developers-bounces@vtk.org">vtk-developers-bounces@vtk.org</a>] On Behalf Of<br>
Bill Lorensen<br>
Sent: Monday, February 2, 2015 4:11 PM<br>
To: VTK Developers<br>
Subject: [vtk-developers] OpenGL2: Picking problems on Linux<br>
<br>
Folks,<br>
<br>
I built VTK with the OpenGL2 backend. This example:<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BalloonWidget" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BalloonWidget</a><br>
crashes when I hover over an actor. It is failing during the pick<br>
operation.<br>
<br>
My system is Fedoro 20. OPenGL version:<br>
OpenGL vendor string: VMware, Inc.<br>
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits)<br>
OpenGL version string: 2.1 Mesa 10.3.3 OpenGL shading language version<br>
string: 1.30<br>
<br>
This is the reported error before the segfault:<br>
ERROR: In<br>
/home/lorensen/ProjectsGIT/VTKGerrit/Rendering/OpenGL2/vtkShaderProgram.cx<br>
x,<br>
line 291<br>
vtkShaderProgram (0x1340be0): 1:<br>
/*========================================================================<br>
=<br>
2:<br>
3:   Program:   Visualization Toolkit<br>
4:   Module:    vtkglPolyDataFSHeadight.glsl<br>
5:<br>
6:   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen<br>
7:   All rights reserved.<br>
8:   See Copyright.txt or <a href="http://www.kitware.com/Copyright.htm" target="_blank">http://www.kitware.com/Copyright.htm</a> for<br>
details.<br>
9:<br>
10:      This software is distributed WITHOUT ANY WARRANTY; without even<br>
11:      the implied warranty of MERCHANTABILITY or FITNESS FOR A<br>
PARTICULAR<br>
12:      PURPOSE.  See the above copyright notice for more information.<br>
13:<br>
14:<br>
=========================================================================*<br>
/<br>
15: // the lighting model for this shader is a Headlight<br>
16:<br>
17: // The following line handle system declarations such a<br>
18: // default precisions, or defining precisions to null<br>
19: #extension GL_EXT_gpu_shader4 : enable<br>
20: #define highp<br>
21: #define mediump<br>
22: #define lowp<br>
23:<br>
24:<br>
25: // all variables that represent positions or directions have a suffix<br>
26: // indicating the coordinate system they are in. The possible values<br>
are<br>
27: // MC - Model Coordinates<br>
28: // WC - WC world coordinates<br>
29: // VC - View Coordinates<br>
30: // DC - Display Coordinates<br>
31:<br>
32: // VC positon of this fragment<br>
33: varying vec4 vertexVC;<br>
34:<br>
35: // optional color passed in from the vertex shader, vertexColor<br>
36: uniform float opacityUniform; // the fragment opacity<br>
37: uniform vec3 ambientColorUniform; // intensity weighted color<br>
38: uniform vec3 diffuseColorUniform; // intensity weighted color<br>
39: uniform vec3 specularColorUniform; // intensity weighted color<br>
40: uniform float specularPowerUniform;<br>
41:<br>
42:<br>
43: // optional normal declaration<br>
44: varying vec3 normalVCVarying;<br>
45:<br>
46: // Texture coordinates<br>
47: //VTK::TCoord::Dec<br>
48:<br>
49: // picking support<br>
50: uniform vec3 mapperIndex;<br>
51: uniform int pickingAttributeIDOffset;<br>
52:<br>
53: // Depth Peeling Support<br>
54: //VTK::DepthPeeling::Dec<br>
55:<br>
56: // clipping plane vars<br>
57: //VTK::Clip::Dec<br>
58:<br>
59: void main()<br>
60: {<br>
61:   //VTK::Clip::Impl<br>
62:<br>
63:   vec3 ambientColor;<br>
64:   vec3 diffuseColor;<br>
65:   float opacity;<br>
66:   vec3 specularColor;<br>
67:   float specularPower;<br>
68:   ambientColor = ambientColorUniform;<br>
69:   diffuseColor = diffuseColorUniform;<br>
70:   opacity = opacityUniform;<br>
71:   specularColor = specularColorUniform;<br>
72:   specularPower = specularPowerUniform;<br>
73:<br>
74:<br>
75:   // Generate the normal if we are not passed in one<br>
76:   vec3 normalVC = normalize(normalVCVarying);<br>
77:   if (gl_FrontFacing == false) { normalVC = -normalVC; }<br>
78:<br>
79:<br>
80:   // diffuse and specular lighting<br>
81:   float df = max(0.0, normalVC.z);<br>
82:   float sf = pow(df, specularPower);<br>
83:<br>
84:   vec3 diffuse = df * diffuseColor;<br>
85:   vec3 specular = sf * specularColor;<br>
86:<br>
87:   gl_FragColor = vec4(ambientColor + diffuse + specular, opacity);<br>
88:   //VTK::TCoord::Impl<br>
89:<br>
90:   if (gl_FragColor.a <= 0.0)<br>
91:     {<br>
92:     discard;<br>
93:     }<br>
94:<br>
95:   //VTK::DepthPeeling::Impl<br>
96:<br>
97:   if (mapperIndex == vec3(0.0,0.0,0.0))<br>
98:     {<br>
99:     int idx = gl_PrimitiveID + 1 + pickingAttributeIDOffset;<br>
100:     gl_FragColor = vec4(float(idx%256)/255.0,<br>
float((idx/256)%256)/255.0, float(idx/65536)/255.0, 1.0);<br>
101:     }<br>
102:   else<br>
103:     {<br>
104:     gl_FragColor = vec4(mapperIndex,1.0);<br>
105:     }<br>
106:<br>
107: }<br>
108:<br>
109:<br>
110:<br>
111:<br>
<br>
<br>
ERROR: In<br>
/home/lorensen/ProjectsGIT/VTKGerrit/Rendering/OpenGL2/vtkShaderProgram.cx<br>
x,<br>
line 292<br>
vtkShaderProgram (0x1340be0): 0:19(12): warning: extension<br>
`GL_EXT_gpu_shader4' unsupported in fragment shader<br>
0:99(12): error: `gl_PrimitiveID' undeclared<br>
0:99(12): error: operands to arithmetic operators must be numeric<br>
0:99(12): error: operands to arithmetic operators must be numeric<br>
0:100(28): error: operator '%' is reserved in GLSL 1.10 (GLSL 1.30 or GLSL<br>
ES 3.00 required)<br>
0:100(22): error: cannot construct `float' from a non-numeric data type<br>
0:100(22): error: operands to arithmetic operators must be numeric<br>
0:100(17): error: cannot construct `vec4' from a non-numeric data type<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader         <br>| Kitware Inc.            <br></i></font><div><i><font face="trebuchet ms, sans-serif">| </font><a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
</div>