<div dir="ltr"><div>Hi Giuseppe,</div><div><br></div><div>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...<br></div><div><br></div><div>Best,</div><div>Pieter<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 15 Jul 2019 at 15:57, Giuseppe D'Angelo via Interest <<a href="mailto:interest@qt-project.org">interest@qt-project.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Il 04/07/19 11:17, Pieter Barendrecht ha scritto:<br>
> <br>
> I have a Qt application with a QOpenGLWidget for displaying 3D meshes. <br>
> Now I'd like to use an external library (OpenSubdiv in this case, see <br>
> e.g. <a href="http://graphics.pixar.com/opensubdiv/docs/api_overview.html" rel="noreferrer" target="_blank">http://graphics.pixar.com/opensubdiv/docs/api_overview.html</a>) to <br>
> generate additional OpenGL buffers, which I can then bind and use in the <br>
> context of my QOpenGLWidget. Currently the application segfaults when <br>
> OpenSubdiv tries to generate these buffers — it does not seem to have a <br>
> valid OpenGL context.<br>
<br>
Does OpenSubdiv simply require a current context when asked to generate <br>
buffers? You can achieve that by simply calling widget->makeCurrent().<br>
<br>
HTH,<br>
-- <br>
Giuseppe D'Angelo | <a href="mailto:giuseppe.dangelo@kdab.com" target="_blank">giuseppe.dangelo@kdab.com</a> | Senior Software Engineer<br>
KDAB (France) S.A.S., a KDAB Group company<br>
Tel. France +33 (0)4 90 84 08 53, <a href="http://www.kdab.com" rel="noreferrer" target="_blank">http://www.kdab.com</a><br>
KDAB - The Qt, C++ and OpenGL Experts<br>
<br>
_______________________________________________<br>
Interest mailing list<br>
<a href="mailto:Interest@qt-project.org" target="_blank">Interest@qt-project.org</a><br>
<a href="https://lists.qt-project.org/listinfo/interest" rel="noreferrer" target="_blank">https://lists.qt-project.org/listinfo/interest</a><br>
</blockquote></div></div>