I’m trying to (on Android) store some snapshots from a live camera texture, but I end up with a "
no member named 'copyTo' in 'ofTexture' error when I try to move the texture into a ofBufferObject (to use as intermediate before moving it to my copy ofTexture). Does this method not exist on Android?
As a first debug tool for a larger project I’m trying to make one of those AR apps where you can take photos which then float in mid-air, at the location and orientation where they were taken.
(See the first animated gif on the ofxARCore2 page for an example of the type of app I’m trying to make. Unfortunately the repo only contains this gif, no example code)
Using ofxARCore2 (by @boehm-e) I can use the ARCore tracking and made a
Floater class which I can use to store all needed data every time I take a photo. Each instance creates their own floating quad in the right location, but I also need to store a snapshot of the webcam’s texture. Using arcore.texture directly on these quads works, but leads to a live video obviously (as the texture gets updated by the camera).
I thought the info here (link) was what I needed; moving the contents of the texture into a buffer, and then into a local texture (Floater.texture). But I get a
no member named 'copyTo' in 'ofTexture' error as soon as I try to copy the texture into the buffer object:
ofBufferObject tmpBuffer; arcore.texture.copyTo(tmpBuffer); // -> no member named copyTo in ofTexture
Looking at the documentation this method seems to still exists, but in the OF source I do see it is wrapped in a
#ifndef TARGET_OPENGLES. Isn’t this target available on Android, leading to the method not being declared? And if so, any suggestions as to how I can achieve this in a different way?