Hi,
does creating a new ObjRenderable make calls to OpenGL internally? Within onImageRecognized you do not have an OpenGL context set, so these OpenGL calls will simply fail and your model will not render.
To get the ID you will need to store it and use it in the next draw cycle (onDrawFrame) to create your object therein. If you have a look inside of the pre-existing renderables (StrokedCube, StrokedRectangle, etc.) you will notice that the only function containing calls to OpenGL is onDrawFrame.
- Daniel
Kim Wong
Hello,
I am doing a native api android project and I render a 3D model from assets file with OPENGL.
However, I find that if and only if I put the code outside of onImageRecognized(), the model can be shown.
I want to put the code in onImageRecognized() so I can get the uniqueID.
How should I solve it please?