Re: Re[20]: OpenGL Linux SIGTRAP wxWidgets-3.2*

Dan Gudmundsson <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <CANX4uuPEJ0viGw3QGa0G+Cp4LJrf63+7qoFihP0BOYX6fUc=PA@mail.gmail.com>
If someone has the same problem and searches for a solution.

My current solution in Wings is:
After a reparent that somehow involves the wxGLCanvas, i.e. a direct
reparent of the wxGLCanvas or
a grandparent of the wxGLCanvas use wxGLCanvas::CreateSurface() and
recreate the wxGLContext::new( with previous context )

After a reparent that does not involve the wxGLCanvas or its grandparents,
do NOT call wxGLCanvas::CreateSurface() because that will
fail (return false) for some unknown reason and all opengl calls will
return errors.

So I finally have a solution that works on Ubuntu-20 with EGL as the OpenGL
backend.

Regards
/Dan

On Sat, Mar 18, 2023 at 6:05 PM Vadim Zeitlin <[email protected]> wrote:

> On Sat, 18 Mar 2023 09:33:22 +0100 Dan Gudmundsson wrote:
>
> DG> I don't know if that will work, do we get a realized event if we don't
> DG> create windows just delete and reparent,
>
>  I think we do, but I admit I haven't tested it.
>
> DG> Maybe just do what I wanted in the first place, document
> CreateSurface()
> DG> for EGL only, and add a eglDestroySurface() if the surface already
> DG> exists, so the user can have control.
>
>  I don't mind doing whatever needs to be done to allow you to fix the issue
> you're having, but I'd really prefer if you could please submit a PR doing
> this because I don't want to make the changes which I neither fully
> understand nor can really test.
>
>  Regards,
> VZ
>
> --
> TT-Solutions: wxWidgets consultancy and technical support
>                http://www.tt-solutions.com/
>

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/CANX4uuPEJ0viGw3QGa0G%2BCp4LJrf63%2B7qoFihP0BOYX6fUc%3DPA%40mail.gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.