java.lang.Object | |
↳ | com.vidinoti.android.vdarsdk.arcore.rendering.BackgroundRenderer |
This class renders the AR background from camera feed. It creates and hosts the texture given to ARCore to be filled with the camera image. See https://github.com/google-ar/arcore-android-sdk/blob/master/samples/hello_ar_java/app/src/main/java/com/google/ar/core/examples/java/common/rendering/BackgroundRenderer.java
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Allocates and initializes OpenGL resources needed by the background renderer.
| |||||||||||
Draws the camera image using the currently configured BackgroundRenderer#quadTexCoords
image texture coordinates.
| |||||||||||
Draws the AR background image.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Allocates and initializes OpenGL resources needed by the background renderer. Must be called on
the OpenGL thread, typically in onSurfaceCreated(GL10, EGLConfig)
.
context | Needed to access shader source. |
---|
IOException |
---|
Draws the camera image using the currently configured BackgroundRenderer#quadTexCoords image texture coordinates.
The image will be center cropped if the camera sensor aspect ratio does not match the screen aspect ratio, which matches the cropping behavior of Frame#transformCoordinates2d(Coordinates2d, float[], Coordinates2d, float[]).
Draws the AR background image. The image will be drawn such that virtual content rendered with the matrices provided by com.google.ar.core.Camera#getViewMatrix(float[], int) and com.google.ar.core.Camera#getProjectionMatrix(float[], int, float, float) will accurately follow static physical objects. This must be called before drawing virtual content.
frame | The current Frame as returned by Session#update().
|
---|