NSchertler/OnlineSurfaceReconstruction

Error while compiling geometry shader "FlatMeshShader"

Closed this issue · 4 comments

I had no trouble compiling on an Ubuntu 16.04.3 LTS system, but launching the resulting 'OnlineSurfaceReconstruction' binary results in a core dump with the following shader error:

Error: 
0:1(10): error: the compatibility profile is not supported

Am I right to suspect the problem may be a GPU requirement? I am testing on a laptop with integrated graphics; however, in the machine's defense I have no trouble running 'Instant Meshes' on this machine -- in case that's a helpful hint!

I confirmed the dependencies noted are installed:

  • xorg-dev
  • libglu1-mesa-dev
  • libboost-dev (only the header files are needed)

A full terminal follows:
``kevin@vaio:~/OnlineSurfaceReconstruction/build$ /home/kevin/test/osr/OnlineSurfaceReconstruction
Error while compiling geometry shader "FlatMeshShader":
#version 330 compatibility

/*
This file is part of the implementation for the technical paper

            Field-Aligned Online Surface Reconstruction
            Nico Schertler, Marco Tarini, Wenzel Jakob, Misha Kazhdan, Stefan Gumhold, Daniele Panozzo
            ACM TOG 36, 4, July 2017 (Proceedings of SIGGRAPH 2017)

    Use of this source code is granted via a BSD-style license, which can be found
    in License.txt in the repository root.

    @author Nico Schertler

*/

layout(triangles) in;
layout(triangle_strip, max_vertices = 3) out;

in GEOM_IN
{
vec4 pos;
vec4 color;
} vIn[];

out FRAG_IN
{
vec4 pos;
vec4 color;
vec3 n;
} vOut;

void main(void)
{
vOut.n = normalize(cross(vIn[1].pos.xyz - vIn[0].pos.xyz, vIn[2].pos.xyz - vIn[0].pos.xyz));
for(int i = 0; i < 3; ++i)
{
vOut.pos = vIn[i].pos;
vOut.color = vIn[i].color;
gl_Position = gl_in[i].gl_Position;
EmitVertex();
}
}

Error:
0:1(10): error: the compatibility profile is not supported

terminate called after throwing an instance of 'std::runtime_error'
what(): Shader compilation failed!
Aborted (core dumped)

Apparently, I forgot to remove the compatibility profile from that one. I'll upload a fix. The binaries will be updates as soon as the compilation is done (you can check the build status by clicking the build badges on the repository's start page).

Thanks for the fast reply and fix, which cleared the above error but now gives:

Error: 
0:1(10): error: GLSL 4.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 1.00 ES, and 3.00 ES

Thanks for reporting. It's good to see potential errors on hardware/software setups that I could not test on. Uploading another fix.

Thanks once again -- I wanted to note that your latest fix did the trick for me!