Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] OpenGL problem in CGAL

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] OpenGL problem in CGAL


Chronological Thread 
  • From: Maxime Gimeno <>
  • To:
  • Subject: Re: [cgal-discuss] OpenGL problem in CGAL
  • Date: Wed, 13 Jan 2021 15:24:29 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:PJezORbP83pETeMJU+r9DkP/LSx+4OfEezUN459isYplN5qZpsyyYR7h7PlgxGXEQZ/co6odzbaP4+a4Aidcvd7B6ClELMUTEUddyI0/pE8JOIa9E0r1LfrnPWQRPf9pcxtbxUy9KlVfA83kZlff8TWY5D8WHQjjZ0IufrymUoHdgN6q2O+s5pbdfxtHhCanYbN1MR66sRjdutMZjId/Kas90AfFr3VHd+lZym5jOFafkwrh6suq85Nv7iZdt+g9+8JcVKnxYrg1Q6FfADk6KW4++dfltQPETQuB53scVnsZnx9VCAXb7x/0Q4n8vDLiuuVyxCeVM8v2TaspWTu59KdkVAXoiCYcODEn9mzcl9F9g7haoBKloBx/3pLUbYSIP/dwYq/RYdUXTndHU81MVSJOH5m8YpMAAOoPP+lWr4fzqVgToxWgGQahH/ngxiNSi3LswaE2z+YsHAfb1wIgBdIOt3HUoc3yOqgIXuG1zazIwiveZP1X2Df97ZbHchYmofqRWr9wdNDeyEYuFwPAkFqcs4PlPzKQ1usTtWib6PFtVe2qi2E9qgFxpiKjydsrionMn48YzE3P+iplzogvP9K4VFJ7bsC+EJtWryyUOZd7T94/T29ouSs31qMKtIO5cSYFyJoqxx3SZuCJfoaG7B/uVumfLzl3iX9rer+ymRm8/VS9xuHiUsS50FdHoyxYmdfCsXAN0gbc6smBSvZl8Ueh2CqP1wDO6u5fO0w7ia3bK5s5zr4xkJoTq0XDETXslEX4lq+bcFgv9Ouw6+n/fLnqupuRO5V3hwz+KKgih82yDOYiPgQTXGWX5OKx36D580LjWrVFlPg2n7HZsJ/EIcQboba0AwpP3YYi7xazFjCm0NUFkXUeIlJJZRGKg5XzN1HBJ/D4Cvi/g1Cynztx2//GObjhDo3MLnjFjrjhYa5w51BAxAc319xS5JJZBqscLP/yWEL9rsHUAxwkPwCsxuboEtR91ocQWWKVBa+ZNbvfsVqS6eMgIumMYZEatCzyK/gk4v7hk3k5mVgGcKmm2JsYcnG4HvB8L0qFZnrsh88NEX0WsQomUOzqlFqCXCZPaHa9Ra084ig3B5+nDYfYWo+tnaeB3DygE51NZmFGD0iMHm3ye4WFXfcMciOSLdV7njwKT7jyA7Inzgyk4Q/m16J8fK2T4TwdrZul1d5v5uSVmwt17i1xF83a0meDSCZ/kWoMAjM3x6tiulcu91GYzKJYn/lcQNxP++tSAEB9Lo/Z1+U8CtboWwuHcM3OU0ejWtzhADc/SZU6zNYKJkp8AN6/lQuQ4iyxHrUpmqyXUZwo7rrHjT+2PNd403+A1a87jlBgTNEILnyjnqc49g7dAMnCnEyd0qqrbq8BxzWeyGDWxmWHuARUURV7TL7edXEZfErf69rjtW3YSLr7LL03Mw5MgeGDL6ZMbZW9iFxWRfLuftvfZm+3nE+/AB+JwvWHa4+8KDZV5znUFEVRy1Nbxn2BLwVrXn798VKbNyRnEBfUW22p6fN38SrpQUo9zgXMZEpkheLsp0wlwMeEQvZW5Yoq/ScsrzIuQgS41tPSTt2B/k9vJfUFJ9w651hD2CTSsAkvZsXxfZAnvUYXdkFMh22r0hx2Dotals1z9SElyQNzLeST11YTLj4=

Hi, 
I updated my PR with a generalization of my fix to all demos, I hope it works now.

Maxime

Le 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,

David

On 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/5336
If you don't want to wait for the next release, you can clone the branch and use it, it is based on CGAL-5.1

Le 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/5334

Le 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




Archive powered by MHonArc 2.6.19+.

Top of Page