public final class GLUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getEGLErrorString(int error)
Return a string for the EGL error code, or the hex representation
if the error is unknown.
|
static int |
getInternalFormat(Bitmap bitmap)
return the internal format as defined by OpenGL ES of the supplied bitmap.
|
static int |
getType(Bitmap bitmap)
Return the type as defined by OpenGL ES of the supplied bitmap, if there
is one.
|
static void |
texImage2D(int target,
int level,
Bitmap bitmap,
int border)
A version of texImage2D that determines the internalFormat and type
automatically.
|
static void |
texImage2D(int target,
int level,
int internalformat,
Bitmap bitmap,
int border)
Calls glTexImage2D() on the current OpenGL context.
|
static void |
texImage2D(int target,
int level,
int internalformat,
Bitmap bitmap,
int type,
int border)
A version of texImage2D() that takes an explicit type parameter
as defined by the OpenGL ES specification.
|
static void |
texSubImage2D(int target,
int level,
int xoffset,
int yoffset,
Bitmap bitmap)
Calls glTexSubImage2D() on the current OpenGL context.
|
static void |
texSubImage2D(int target,
int level,
int xoffset,
int yoffset,
Bitmap bitmap,
int format,
int type)
A version of texSubImage2D() that takes an explicit type parameter
as defined by the OpenGL ES specification.
|
public static int getInternalFormat(Bitmap bitmap)
bitmap
- public static int getType(Bitmap bitmap)
bitmap
- IllegalArgumentException
- if the bitmap does not have a type.public static void texImage2D(int target, int level, int internalformat, Bitmap bitmap, int border)
target
- level
- internalformat
- bitmap
- border
- public static void texImage2D(int target, int level, int internalformat, Bitmap bitmap, int type, int border)
target
- level
- internalformat
- bitmap
- type
- border
- public static void texImage2D(int target, int level, Bitmap bitmap, int border)
target
- level
- bitmap
- border
- public static void texSubImage2D(int target, int level, int xoffset, int yoffset, Bitmap bitmap)
target
- level
- xoffset
- yoffset
- bitmap
- public static void texSubImage2D(int target, int level, int xoffset, int yoffset, Bitmap bitmap, int format, int type)
target
- level
- xoffset
- yoffset
- bitmap
- type
- public static String getEGLErrorString(int error)
error
- The EGL error to convert into a String.