c++ - How can I create a "proxy" openGL texture in Qt? -


i porting app qt , have troubles integration of syphon framework (http://syphon.v002.info/) used video streams sharing between applications via gpu (mac os x only).

two c++ implementations syphon available, 1 cinder (github/astellato/cinder-syphon) , 1 openframeworks (github/astellato/ofxsyphon). started cinder implementation (both quite similar) , tried port qt can't find way create qopengltexture using created texture.

here code cinder-syphon i'm trying work (file syphonclient.mm) :

void syphonclient::bind() {     nsautoreleasepool* pool = [[nsautoreleasepool alloc] init];      if(bsetup)     {         [(syphonnameboundclient*)mclient lockclient];         syphonclient *client = [(syphonnameboundclient*)mclient client];          latestimage = [client newframeimageforcontext:cglgetcurrentcontext()];         nssize texsize = [(syphonimage*)latestimage texturesize];         gluint m_id = [(syphonimage*)latestimage texturename];          mtex = ci::gl::texture::create(gl_texture_rectangle_arb, m_id,                                texsize.width, texsize.height, true);         mtex->setflipped();          mtex->bind();     }      else         std::cout<<"syphonclient not setup, or not connected server.  cannot bind.\n";      [pool drain]; } 

in qt version i'm writing, mtex of type qopengltexture couldn't find equivalent of mtex = ci::gl::texture::create(gl_texture_rectangle_arb, m_id, texsize.width, texsize.height, true);, is, creating qopengltexture using existing texture id without having allocate storage again.

did miss in qt opengl api or not possible ? if not guess have use direct opengl calls or pulling in whole cinder opengl api ?


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -