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: David Rochera <>
  • To:
  • Subject: Re: [cgal-discuss] OpenGL problem in CGAL
  • Date: Thu, 7 Jan 2021 16:28:01 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:BxDZVBaG9VCEGIyrsEqtY4P/LSx+4OfEezUN459isYplN5qZpsy5ZR7h7PlgxGXEQZ/co6odzbaP7Oa6BTZLvMnJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MRe7oR/PusQZn4duJaY8xxnUqXZUZupawn9lK0iOlBjm/Mew+5Bj8yVUu/0/8sNLTLv3caclQ7FGFToqK2866tHluhnFVguP+2ATUn4KnRpSAgjK9w/1U5HsuSbnrOV92S2aPcrrTbAoXDmp8qlmRAP0hCoBKjU09nzchM5tg6JBuB+uqBJ/zIzUbo+bN/RwY73Tcs8BSGVbQspcTTZMDp+gY4YNCecKIOZWr5P6p1sLtRawCxOjBP3uyjBVm3T4wao63PghEQ7YxgwvBc8FvXPJo9XvM6cdTeC1w7fSzTrZdP5Zwivy55LNch87vfGMXah8cc3LyUkgDg7IiEibpoP5MT2PzOsNr3Sb4PR6VeKpk2MqtwV8rzugy8owi4TFmoIYxF7L+yh5wIg4O9m1RUx/bNOmEJZcqi+UOpVoTs4mTGxluCg0x6AJt5C1fiUH1ZQqyhjCYPKJdIiI5wjsVOeXITpgi3Jlea6/hxav8Ue70OHzSs600FNSoipElNnMrHEN2AbJ5siJUPtw+Fqq1zWX1w3L9O1IPUQ5mbDYJpMh2LI8i5sevEbZEiL5nEj7irKdeF8+9eiy8evnZ63rpp+COI9wjQHzKqEulda+AeQ8KwQOW2ab9fml2L3t8kD0RK9GjvIxkqnev5DaIdoUqrSlDA9S14Yv8xe/DzG439QEhXQLMk5JdRadg4XqO1zCOu30APa9jli2nzpmw+jKPrj7DZXMKnjDnq3hfbF460NE1QUz19df6I5UCr4fOvL8QFT8u8fEARAjNgy72frnCNVn2oMZQ2KPDbeVMLnOvl+Q+uIvP+6MaZcJtzbyMfcl4+figmI4mV8GYaapwIAXaGujE/R9I0SZZGLsjc0bHWcLuAo+Vu3qh0eYXT5dfXbhF586/SwxXYK6EZ/YFMfqm62ExC79H5tMZ2kABErLCmbtb4zDWvECb2WZLcZl1zAFTrO8UJRy6Be1qQXa179je+rI5jUD59Wkz8lw/+SVlBco9DUyAd7ayHCIV2gzn2UGQHg906l75EB80VyeyrMrvvpDCNZv6uNVBwcmKYbHnas9EMH3QguHf9GTSV/gTM/hGiA0Vtt2wtkAZAF2FNymyxzCxCG3GKRGq7veD5M99ufQ3mP6Ot1m43fAzqgoyVc8EeVVMmjzqqdh9gSbPYnCk0iDnu7+eb4b1y7A7m6rx2GHuUhEUEh3S6qTDiNXXVffsdmsvhCKdLSpE7lyalIQm/7HEbNDb5jStXsDQf7iPNrEZGfowDW6Dh+Nz6+MKo3wdDdEhXmPOA0/iwkWuE2+G00mHC74+DDUBzVrHE7vJUT2/rsm8S7pfgoP1wiPKnZZ+f+19xoS36HOTvoS2vcAtn5kpWklWlm62N3SBpyLoA8zJKg=

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




Archive powered by MHonArc 2.6.19+.

Top of Page