I am developing an Android app based on Kudan SDK
. On my AR screen, I have a button and onclick
should download the image from the server, save it locally, and add the image to marker.
The issue is when my ARActivity
opens, if I add the image as code below, inside setup method, it works but on button click if I use the same method I get the following error:
[unnamed-7603-0] bindTextureImage: clearing GL error: 0x501
On log console and image doesn't show up.
ARTexture2D texture = new ARTexture2D();
texture.loadFromPath(testPath);
texture.setTextureID(1);
ARImageNode imageNode = new ARImageNode(texture);
trackable.getWorld().addChild(imageNode);
imageNode.setVisible(true);