osx - How to create a QGLWidget from a CGLContextObj? -
i'm using qt 4.8.4 on mac os 10.8.
i have cglcontextobj
(created outside control).
i create qglwidget
(or @ least shared with) existing cglcontextobj
— can render textures created on cglcontextobj
.
how can create qglcontext
existing cglcontextobj
?
already tried
- i found
qglcontext::fromplatformglcontext()
, method appears available when qt built in qpa mode (...but./configure -qpa cocoa
fails build, , haven't been able find documentation on-qpa
flag does).
qpa (qt platform abstraction) still work in progress in qt 4. it's fully integrated qt 5. if have option upgrade qt 5, things might easier.
in qt 5, can construct qcocoaglcontext
(a derived class of qplatformopenglcontext
), , qopenglcontext
(qplatformopenglcontext::context()
), , qglcontext
(qglcontext::fromopenglcontext(qopenglcontext *)
). gets pretty close, how cglcontextobj
qcocoaglcontext
?
unfortunately, don't see option construct qcocoaglcontext
cglcontextobj
. have nsopenglcontext
private data member, initialized inside existing constructor, maybe add constructor.
Comments
Post a Comment