Subject: CGAL users discussion list
List archive
- From: David Rochera <>
- To:
- Subject: Re: [cgal-discuss] OpenGL problem in CGAL
- Date: Wed, 13 Jan 2021 16:32:51 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:dI3zlxPuYKgUk9lii8cl6mtUPXoX/o7sNwtQ0KIMzox0K/zzp8bcNUDSrc9gkEXOFd2Cra4d26yO6Ou/ByRAuc/H7CldNsQUFlcssoY/p0QYGsmLCEn2frbBThcRO4B8bmJj5GyxKkNPGczzNBX4q3y26iMOSF2kbVImbuv6FZTPgMupyuu854PcYxlShDq6fLh+MAi6oR/eu8ULgoZuMLo9xxXGrnZKeuld2GdkKU6Okxrm6cq84Zxu/z5Mt/498sJLTLn3cbk/QbFEFjotLno75NfstRnNTAuP4mUTX2ALmRdWAAbL8Q/3UI7pviT1quRy1i+aPdbrTb8vQjSt871rSB7zhygZMTMy7XzahdZxjKJfpxKhugB/zovJa4ybKPZyYqXQds4cSGFcXMheSjZBD5uzYIsBDeUPPehWoYrgqVUQsRSzHhOjCP/1xzJSmnP6wa833uI8Gg/GxgwgGNcOvWzaotrvKqcSUP26x7TUwzXEc/xW2Sny6JLSfRs8pvyDQKhwcc3NxkkvCQzFlE+fpJf+MDyJzOsNtnKU7/ZgVe61jG4nsQ5xryGpy8wxhYbHmpgbxUrY9SVl3ok1P9u4RVZnbdOnDJddtj2XOo92TM48TW9muDs3xLICtJKmYiQHyZQqyRHBZ/GHbYWE/hLtWeSRLzp6mn5pZa+yiwi8/0WizOD3S8e60FFPriVfk9nMsGgA1wDN5cmIVvRx5Fyh2SqX2wDc6+FEPUA0lbfAJJI73rEwkZ8TvVzCHi/wgkX2jbWZel8q+uiy7ensf7bopoeEOoNqlg3zNr4il8+/DOgiLwQDXmqW9f682bH/+0DyXa9EgecskqbDtZDXPcQbqbC9Aw9Syosj7gywDzai0NgBmXkHIk9JdAuJj4XpJ13COv/4DfC4g1SjlDdk2erKMaHmApXINnTDkbHhcqhh60NE1gY/0dRS64hXB7wBOv7/R078ud7CAhI5LwC42+PnB8981oMaV2KPGKiZMKbKvFCV/OIvJPWDZI8LtzbnMfco/OXhgmMjll8YZ6apwZsXZGq/HvR8LEWVeWDsjcsZEWcWogo+S/Tnh0GNUTFJY3a+Rr8z5jAgCI26EIfDXZutjaea3Ca7G51WfnpJBkqNEXfubYWEWu0DZDicIs97wXQ5U6O8QdohyQ22r129jKF2K/LdvCwer5PqktZvoPbCkAk7sj1yAcPa2G6ESyR4n3gDWiQtj515ulF36kuG1f14n+BADo4UoOhYVx8zc5/a1e1zTd7oHRnQe8+AD1egTNLhCj44Spc9wsQFfl1mSOiklQ3J4ye6H+oVi6CTH85ztbnN2mD4Ycd70XfPkqc7yEI3R9NGcmygiKk4/AfaA8vFkl6Sir2xJpgbiSXC/WPGwWuVt1xDSyZxV7/EVDYRfBj4t9P8s2/LUb6iQY4gOQtM08fKfqdQbdbpgE9PbP3oMdHXf2L3nH2/U0XbjoiQZZbnLj1OlB7WD1IJxlhKoCS2cDMmDyLkmFrwSTxjEVW1PhHp+Oh67Xe1Fwo6klnMYEpm2L64vBUSgK7EEq9B7vc/oC4k7g5MMhOlxduPUIiKrANkdblcJ9Qn7wUfjDOLh0lGJpWlaptaqBsbegVzsVnp0kwsWI9LmM0jsHNsyxB9e/uV
Using context 4 . 1 GL
QOpenGLShader::compile(Fragment): ERROR: 0:6: Invalid call of undeclared identifier 'texture2D'
*** Problematic Fragment shader source code ***
#version 150
#ifdef GL_KHR_blend_equation_advanced
#extension GL_ARB_fragment_coord_conventions : enable
#extension GL_KHR_blend_equation_advanced : enable
#endif
#define lowp
#define mediump
#define highp
#line 1
uniform sampler2D texture;
in highp vec2 texc;
out highp vec4 out_color;
void main(void) {
out_color = texture2D(texture, texc.st);
}
***
Compiling fragmentsource FAILED
QOpenGLShader::link: ERROR: One or more attached shaders not successfully compiled
linking Program FAILED
QOpenGLShader::link: ERROR: One or more attached shaders not successfully compiled
QOpenGLShaderProgram::attributeLocation(vertex): shader program is not linked
QOpenGLShader::link: ERROR: One or more attached shaders not successfully compiled
QOpenGLShaderProgram::attributeLocation(tex_coord): shader program is not linked
QOpenGLShader::link: ERROR: One or more attached shaders not successfully compiled
Similar warnings when using it and when closing the window:
Write setting... done.
QOpenGLVertexArrayObject::destroy() failed to restore current context
Best wishes,
David
Hi,I updated my PR with a generalization of my fix to all demos, I hope it works now.MaximeLe jeu. 7 janv. 2021 à 16:28, David Rochera <> a écrit :Thank you very much, Maxime! I've tested it and now the points and edges are perfectly displayed in the examples!I don't know if it's important, but just let you know that when the Basic Viewer window is closed, the following line is still shown:QOpenGLVertexArrayObject::destroy() failed to restore current context
In addition, there may be some demos in which the 4.1 context still does not work... In particular, I tried the AABB_tree demo.Best wishes,DavidOn Thu, 7 Jan 2021 at 13:16, Maxime Gimeno <> wrote:I made a PR to fix your specific issue : https://github.com/CGAL/cgal/pull/5336If you don't want to wait for the next release, you can clone the branch and use it, it is based on CGAL-5.1Le jeu. 7 janv. 2021 à 10:56, David Rochera <> a écrit :Sorry, Sebastien, it was for CGAL version 5.1.1.I downgraded because for the latest version, 5.2, I got an error message like the following when trying to compile the Polyhedron demo:[ 3%] Building CXX object CMakeFiles/demo_framework.dir/Viewer.cpp.o
/Users/drochera/Downloads/CGAL-David/Polyhedron/Viewer.cpp:1133:31: error:
too few arguments to function call, expected 2, have 1
d->textRenderer->draw(this);
~~~~~~~~~~~~~~~~~~~~~ ^
/usr/local/include/CGAL/Three/TextRenderer.h:142:5: note: 'draw' declared here
void draw(CGAL::Three::Viewer_interface* viewer, const QVector3D &scaler);
^
1 error generated.
make[2]: *** [CMakeFiles/demo_framework.dir/Viewer.cpp.o] Error 1
make[1]: *** [CMakeFiles/demo_framework.dir/all] Error 2
make: *** [all] Error 2
But this might be another different bug... (for the CGAL version 5.1.1 this error does not appear).Best wishes.On Thu, 7 Jan 2021 at 09:00, Maxime Gimeno <> wrote:I opened an issue and I've been working on a fix since yesterday: https://github.com/CGAL/cgal/issues/5334Le jeu. 7 janv. 2021 à 08:47, Sebastien Loriot <> a écrit :What version of CGAL are you using?
Sebastien
On 1/5/21 8:47 PM, David Rochera wrote:
>> Hello, I'm new in CGAL and in this mailing list,
>>
>> I have been trying for many days to solve an OpenGL problem I have
>> when running some CGAL examples and demos but I could not solve it
>> yet. If some of you know the answer to this question I would be very
>> grateful. :)
>>
>> I'm using a fairly new Mac OS, where I have installed the last
>> versions of CGAL, Qt5 and many other optional libraries. The OpenGL
>> support was discontinued for Apple some years ago, so that my GL Core
>> version is up to 4.1. The problem is that after compiling and running
>> some CGAL examples and demos I get the warning:
>>
>> GL 4.3 context initialization failed.
>>
>> Using context 2 . 1 GL
>>
>>
>> This results in not being able to see vertices nor edges in the
>> Basic_viewer. I'm wondering how the 4.1 context could be set in order
>> to avoid such an issue. Looking at the CGAL Qt files, I can guess
>> that the 4.3 context is tried to be set and, if not found, the ES 2.0
>> context is displayed instead. Nevertheless, I guess there should be a
>> way to display the highest possible Mac OS context 4.1 because the
>> Polyhedron demo, for instance, works fine for me. If I run it, I can
>> see vertices and edges and indeed I get:
>>
>> Using context 4 . 1 GL
>>
>>
>> If the problem is regarding the OS, there should be many affected
>> CGAL users but I haven't found many people speaking about it in any
>> forum... so I don't know if I'm missing something.
>>
>>
>> Thank you very much and best wishes,
>>
>>
>> David
>>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] OpenGL problem in CGAL, David Rochera, 01/05/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, Sebastien Loriot, 01/07/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, Maxime Gimeno, 01/07/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, David Rochera, 01/07/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, David Rochera, 01/07/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, Maxime Gimeno, 01/07/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, David Rochera, 01/07/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, Maxime Gimeno, 01/13/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, David Rochera, 01/13/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, Maxime Gimeno, 01/14/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, David Rochera, 01/14/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, Maxime Gimeno, 01/14/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, David Rochera, 01/14/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, Maxime Gimeno, 01/13/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, David Rochera, 01/07/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, Maxime Gimeno, 01/07/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, Maxime Gimeno, 01/07/2021
- Re: [cgal-discuss] OpenGL problem in CGAL, Sebastien Loriot, 01/07/2021
Archive powered by MHonArc 2.6.19+.