Having a problem when trying to render a Camera Preview buffer into an opengl renderer in BB10 (but relevant to any platform). My renderer is just a basic open gl renderer that goes through a relatively infinite render loop however im looking to send in the camera preview buffer from my camera class (where i instantiate my renderer) as so
myThread = new QThread();
renderer = new BPRenderer();
renderer->moveToThread(myThread);
connect(myThread, SIGNAL(started()), renderer, SLOT(run()));
connect(this, SIGNAL(NewTexture(int)), renderer, SLOT(SetTextureFromRaw(unsigned char*)));
myThread->start();
So the emit function is:
emit this->NewTexture(camera->buf);
so thats pretty basic and i know its getting updated fine. But it seems i may be having a problem in my threading as although the run signal runs fine, my settexturefromraw slot never gets triggered, i tried setting it to a local camera function to check it isnt the camera(this) function but that was working fine so im sure its the settexturefromrawfunc.
If anyone has any ideas throw them at me because this has had me for quite a while! Cheers