
Originally Posted by
pixaeiro
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
I have a try like this
cx_->create();
slicerX_ = new slicerCanvas(cx_,this);
cx_ = slicerX_->context();
secWid_ = new secCan(cx_,this,slicerX_);
thrWid_ = new triCan(cx_,this,slicerX_);
cx_ = new QGLContext(QGLFormat::defaultFormat());
cx_->create();
slicerX_ = new slicerCanvas(cx_,this);
cx_ = slicerX_->context();
secWid_ = new secCan(cx_,this,slicerX_);
thrWid_ = new triCan(cx_,this,slicerX_);
To copy to clipboard, switch view to plain text mode
but it don't render correct.I saw a question in
http://stackoverflow.com/questions/2...t-or-data?rq=1 ,
any one can give me some advice? thanks
,
Bookmarks