public class GlUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static float[] |
IDENTITY_MATRIX
Identity matrix for general use.
|
static java.lang.String |
TAG |
Modifier and Type | Method and Description |
---|---|
static void |
checkGlError(java.lang.String op)
Checks to see if a GLES error has been raised.
|
static void |
checkLocation(int location,
java.lang.String label)
Checks to see if the location we obtained is valid.
|
static java.nio.FloatBuffer |
createFloatBuffer(float[] coords)
Allocates a direct float buffer and populates it with the float array data.
|
static int |
createImageTexture(java.nio.ByteBuffer data,
int width,
int height,
int format)
Creates a texture from raw data.
|
static int |
createProgram(java.lang.String vertexSource,
java.lang.String fragmentSource)
Creates a new program from the supplied vertex and fragment shaders.
|
static int |
loadShader(int shaderType,
java.lang.String source)
Compiles the provided shader source.
|
static void |
logVersionInfo()
Writes GL version info to the log.
|
public static final java.lang.String TAG
public static final float[] IDENTITY_MATRIX
public static int createProgram(java.lang.String vertexSource, java.lang.String fragmentSource)
public static int loadShader(int shaderType, java.lang.String source)
public static void checkGlError(java.lang.String op)
public static void checkLocation(int location, java.lang.String label)
public static int createImageTexture(java.nio.ByteBuffer data, int width, int height, int format)
data
- Image data, in a direct ByteBuffer.width
- Texture width, in pixels (not bytes).height
- Texture height, in pixels.format
- Image data format (use constant appropriate for glTexImage2D(), for example, GL_RGBA).public static java.nio.FloatBuffer createFloatBuffer(float[] coords)
public static void logVersionInfo()
© 2016 - 2018 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal