Hello,
I am developing a application,i need some qglwidgets share a volume 3d texture.I know
can share texture between two qglwidget(Qglwidget share with shareWidget).IsCode:
tere a way to share texture with multi qglwidget?
Thanks,
Printable View
Hello,
I am developing a application,i need some qglwidgets share a volume 3d texture.I know
can share texture between two qglwidget(Qglwidget share with shareWidget).IsCode:
tere a way to share texture with multi qglwidget?
Thanks,
Yes, in OpenGL you can share textures between displays that have the same context.
So, you can create a new gl context, and then create your two widgets with that context:
QGLContext(const QGLFormat & format);
QGLWidget(QGLContext * context, QWidget * parent = 0, const QGLWidget * shareWidget = 0, Qt::WindowFlags f = 0)
https://www.opengl.org/discussion_bo...hare-a-texture
yes,I know use QGLContext maybe solve my problem.But I don't understand QGlContext.Is there a example to use QGLContext ?Thanks
I have a try like this
but it don't render correct.I saw a question inCode:
cx_->create(); slicerX_ = new slicerCanvas(cx_,this); cx_ = slicerX_->context(); secWid_ = new secCan(cx_,this,slicerX_); thrWid_ = new triCan(cx_,this,slicerX_);
http://stackoverflow.com/questions/2...t-or-data?rq=1 ,
any one can give me some advice? thanks
,