'How to render a 2D renderable in Sceneform 1.17.1 application using GLSurfaceView

I've been trying to develop an AR application using ARCore, in which a context box appears next to a object once detected. So far I am able to detect objects fine, and render a 3d object by the object itself, but I just cannot get a 2D renderable to work using the instructions here: https://developers.google.com/sceneform/develop/create-renderables

I've gone so far as to get the sample project for referenced by this page and have had no luck getting a layout to inflate on screen.

Now, I am well aware of the warnings on the top of that page saying sceneform 1.16 was archived, and that the documentation on that page is for 1.15.0. It is worth noting that grabbing the latest sample projects from Google references Sceneform 1.17.1.

I am wondering if someone knows of any way to create a 2D renderable in a ARCore application? Is it possible that my issues are the OpenGL renderer used for the camera view in sceneform?

The relevant code is located here, in the drawAugmentedImages() function. https://github.com/mjstratton7/PrivacyScan/blob/main/Project/PrivacyScan/app/src/main/java/com/mjstratt/privacyscan/augmentedimage/AugmentedImageActivity.java



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source