OpenGL ES SDK for Android
ARM Developer Center
|
Functions specific to the Android Platform. More...
#include <AndroidPlatform.h>
Static Public Member Functions | |
static bool | getAndroidAsset (JNIEnv *JNIEnvironment, const char destinationDirectory[], const char filename[]) |
Extract an asset file from the APK. More... | |
static void | checkGlesError (const char *operation) |
Checks if OpenGL ES has reported any errors. More... | |
static const char * | glErrorToString (int glErrorCode) |
Converts OpenGL ES error codes into the readable strings. More... | |
static char * | copyString (const char *string) |
Deep copy a string using memcopy(). More... | |
Functions specific to the Android Platform.
Definition at line 42 of file AndroidPlatform.h.
|
static |
Checks if OpenGL ES has reported any errors.
[in] | operation | The OpenGL ES function that has been called. |
Calls glGetError() until no more errors are reported. GL stores all the errors since the last call to glGetError(). These are returned one-by-one with calls to getGetError(). Each call clears an error flag from GL. If GL_NO_ERROR is returned no errors have occured since the last call to glGetError(). Prints the original error code the operation which caused the error (passed in) and the string version of the error.
Definition at line 43 of file AndroidPlatform.cpp.
|
static |
Deep copy a string using memcopy().
[in] | string | The string to make a copy of. |
Definition at line 84 of file AndroidPlatform.cpp.
|
static |
Extract an asset file from the APK.
If the file specified by filename is not avaliable in destinationDirectory, this method will attempt to extract it from the APK into destinationDirectory. Typically used in OpenGL ES applications to extract shader files and textures.
[in] | JNIEnvironment | A pointer to the JNI environment which allows interfacing with the Java Virtual Machine (JVM). Allows extensive interaction with the JVM including accessing Java classes, fields and methods. This pointer is provided as part of a JNI call from Java to C++. |
[in] | destinationDirectory | The destination directory where the file should be placed. |
[in] | filename | Name of the file to extract from the APK. Can be any file placed inside the "assets" directory of the Android project when the APK is built. |
Definition at line 103 of file AndroidPlatform.cpp.
|
static |
Converts OpenGL ES error codes into the readable strings.
[in] | glErrorCode | The OpenGL ES error code to convert. |
Converts the error codes into strings using the definitions found in <GLES2/gl2.h>
Definition at line 56 of file AndroidPlatform.cpp.