OpenGL ES SDK for Android
ARM Developer Center
|
#include <android/log.h>
#include <GLES3/gl3.h>
Go to the source code of this file.
Classes | |
struct | astc_header |
struct | texture_set |
struct | texture_set_info |
Typedefs | |
typedef struct texture_set | texture_set |
typedef struct texture_set_info | texture_set_info |
Functions | |
GLuint | load_shader (GLenum shader_type, const char *shader_source) |
Create shader object and compile its source code. More... | |
GLuint | create_program (const char *vertex_source, const char *fragment_source) |
Create program object, attach vertex and fragment shader to it. Link program object and check whether it has succeeded. More... | |
GLint | get_and_check_attrib_location (GLuint program, const GLchar *attrib_name) |
Invoke glGetAttribLocation(), if it has returned a positive value. Otherwise, print a message and exit. Function used for clarity reasons. More... | |
GLint | get_and_check_uniform_location (GLuint program, const GLchar *uniform_name) |
Invoke glGetUniformLocation, if it has returned a positive value. Otherwise, print a message and exit. Function used for clarity reasons. More... | |
Variables | |
const char | earth_vertex_shader_source [] |
const char | earth_fragment_shader_source [] |
#define ASTC_TEXTURE_SWITCH_INTERVAL (5) /* sec */ |
Definition at line 104 of file AstcTextures.h.
#define FREE_CHECK | ( | ptr | ) |
Definition at line 53 of file AstcTextures.h.
#define GL_CHECK | ( | x | ) |
Definition at line 59 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR (0x93BB) |
Definition at line 82 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR (0x93B8) |
Definition at line 79 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR (0x93B9) |
Definition at line 80 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR (0x93BA) |
Definition at line 81 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR (0x93BC) |
Definition at line 83 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR (0x93BD) |
Definition at line 84 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR (0x93B0) |
Definition at line 71 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR (0x93B1) |
Definition at line 72 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR (0x93B2) |
Definition at line 73 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR (0x93B3) |
Definition at line 74 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR (0x93B4) |
Definition at line 75 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR (0x93B5) |
Definition at line 76 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR (0x93B6) |
Definition at line 77 of file AstcTextures.h.
#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR (0x93B7) |
Definition at line 78 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR (0x93DB) |
Definition at line 96 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR (0x93D8) |
Definition at line 93 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR (0x93D9) |
Definition at line 94 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR (0x93DA) |
Definition at line 95 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR (0x93DC) |
Definition at line 97 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR (0x93DD) |
Definition at line 98 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR (0x93D0) |
Definition at line 85 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR (0x93D1) |
Definition at line 86 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR (0x93D2) |
Definition at line 87 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR (0x93D3) |
Definition at line 88 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR (0x93D4) |
Definition at line 89 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR (0x93D5) |
Definition at line 90 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR (0x93D6) |
Definition at line 91 of file AstcTextures.h.
#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR (0x93D7) |
Definition at line 92 of file AstcTextures.h.
#define GL_TEXTURE_ASTC_DECODE_PRECISION_EXT (0x8F69) |
Definition at line 101 of file AstcTextures.h.
#define LOG_TAG "libNative" |
Definition at line 27 of file AstcTextures.h.
#define LOGD | ( | ... | ) | __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__) |
Definition at line 28 of file AstcTextures.h.
#define LOGE | ( | ... | ) | __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) |
Definition at line 30 of file AstcTextures.h.
#define LOGF | ( | ... | ) | __android_log_print(ANDROID_LOG_FATAL, LOG_TAG, __VA_ARGS__) |
Definition at line 31 of file AstcTextures.h.
#define LOGI | ( | ... | ) | __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) |
Definition at line 29 of file AstcTextures.h.
#define MALLOC_CHECK | ( | ptr_type, | |
ptr, | |||
size | |||
) |
Definition at line 33 of file AstcTextures.h.
#define REALLOC_CHECK | ( | ptr_type, | |
ptr, | |||
size | |||
) |
Definition at line 43 of file AstcTextures.h.
#define X_ROTATION_SPEED (5) |
Definition at line 107 of file AstcTextures.h.
#define Y_ROTATION_SPEED (4) |
Definition at line 108 of file AstcTextures.h.
#define Z_ROTATION_SPEED (3) |
Definition at line 109 of file AstcTextures.h.
typedef struct texture_set texture_set |
typedef struct texture_set_info texture_set_info |
GLuint create_program | ( | const char * | vertex_source, |
const char * | fragment_source | ||
) |
Create program object, attach vertex and fragment shader to it. Link program object and check whether it has succeeded.
Definition at line 229 of file AstcTextures.cpp.
GLint get_and_check_attrib_location | ( | GLuint | program, |
const GLchar * | attrib_name | ||
) |
Invoke glGetAttribLocation(), if it has returned a positive value. Otherwise, print a message and exit. Function used for clarity reasons.
[in] | program | OpenGL ES specific. |
[in] | attrib_name | OpenGL ES specific. |
Definition at line 160 of file AstcTextures.cpp.
GLint get_and_check_uniform_location | ( | GLuint | program, |
const GLchar * | uniform_name | ||
) |
Invoke glGetUniformLocation, if it has returned a positive value. Otherwise, print a message and exit. Function used for clarity reasons.
[in] | program | OpenGL ES specific. |
[in] | uniform_name | OpenGL ES specific. |
Definition at line 174 of file AstcTextures.cpp.
Create shader object and compile its source code.
Definition at line 188 of file AstcTextures.cpp.
const char earth_fragment_shader_source[] |
Definition at line 136 of file AstcTextures.h.
const char earth_vertex_shader_source[] |
Definition at line 112 of file AstcTextures.h.