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

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Mon Jul 15 15:55:40 CEST 2019


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190715/8f145b28/attachment.bin>


More information about the Interest mailing list