[Interest] Allow external library to generate OpenGL buffers in context of QOpenGLWidget

Pieter Barendrecht pjbarendrecht at gmail.com
Mon Jul 15 22:51:34 CEST 2019

Hi Giuseppe,

Thanks, but unfortunately that's not it. It turns out to be possible to
specify an OpenGL context as an optional argument when invoking certain
calls to OpenSubdiv, though I'm not quite sure what to pass on from within
a QOpenGLWidget — something like context()->handle() compiles but doesn't
do the trick. To be continued...


On Mon, 15 Jul 2019 at 15:57, Giuseppe D'Angelo via Interest <
interest at qt-project.org> wrote:

> Il 04/07/19 11:17, Pieter Barendrecht ha scritto:
> >
> > I have a Qt application with a QOpenGLWidget for displaying 3D meshes.
> > Now I'd like to use an external library (OpenSubdiv in this case, see
> > e.g. http://graphics.pixar.com/opensubdiv/docs/api_overview.html) to
> > generate additional OpenGL buffers, which I can then bind and use in the
> > context of my QOpenGLWidget. Currently the application segfaults when
> > OpenSubdiv tries to generate these buffers — it does not seem to have a
> > valid OpenGL context.
> Does OpenSubdiv simply require a current context when asked to generate
> buffers? You can achieve that by simply calling widget->makeCurrent().
> HTH,
> --
> Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
> KDAB (France) S.A.S., a KDAB Group company
> Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
> KDAB - The Qt, C++ and OpenGL Experts
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190715/c6850eb9/attachment.html>

More information about the Interest mailing list