the videoplayer uses a texture internally and since openGL cannot be run in another thread it’ll crash, you need to disable the texture first using p.setUseTexture(false)
It is possible. The video player cannot use a texture (GPU memory) outside of the main thread, but it does have access to the pixel information of the decoded video in CPU memory. This is stored in an ofPixels object.
so in your main thread all you need to do is allocate an ofTexture, and upload the video player’s pixels to it, then draw the texture.
Hello, I am new here, I did exactly what you said but all i get is an white empty image and the sound from the video playing in back. (I draw the texture not in the thread because I get exception but in testApp::draw()). Have I understood it wrong?
You can’t use a texture within your thread class like this. You’ll want to allocate the texture in testApp:setup. In testApp::draw, this is where you should do drawTexture.loadData() and drawTexture.draw(). Any operations that require accessing the graphics card (allocating, update or drawing textures) should be done in the main thread.