public class

ShaderUtil

extends Object
java.lang.Object
   ↳ com.vidinoti.android.vdarsdk.arcore.rendering.ShaderUtil

Class Overview

Shader helper functions. 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/ShaderUtil.java

Summary

Public Constructors
ShaderUtil()
Public Methods
static void checkGLError(String tag, String label)
Checks if we've had an error inside of OpenGL ES, and if so what that error is.
static int loadGLShader(String tag, Context context, int type, String filename)
Converts a raw text file, saved as a resource, into an OpenGL ES shader.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ShaderUtil ()

Public Methods

public static void checkGLError (String tag, String label)

Checks if we've had an error inside of OpenGL ES, and if so what that error is.

Parameters
label Label to report in case of error.
Throws
RuntimeException If an OpenGL error is detected.

public static int loadGLShader (String tag, Context context, int type, String filename)

Converts a raw text file, saved as a resource, into an OpenGL ES shader.

Parameters
type The type of shader we will be creating.
filename The filename of the asset file about to be turned into a shader.
Returns
  • The shader object handler.
Throws
IOException