OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AstcTextures Namespace Reference

Classes

class  Matrix
 Functions for manipulating matrices. More...
 
class  SolidSphere
 
struct  Vec2
 Type representing texture coordinates. More...
 
class  Text
 Functions for drawing text in OpenGL ES. More...
 
class  Timer
 Provides a platform independent high resolution timer. More...
 

Typedefs

typedef struct AstcTextures::Vec2 Vec2
 Type representing texture coordinates. More...
 

Functions

void loadData (const char *filename, unsigned char **textureData)
 Load texture data from a file into memory. More...
 

Variables

const char fontVertexShaderSource []
 Vertex shader source code for text rendering. More...
 
const char fontFragmentShaderSource []
 Fragment shader source code for text rendering. More...
 

Typedef Documentation

Type representing texture coordinates.

Function Documentation

void AstcTextures::loadData ( const char *  filename,
unsigned char **  textureData 
)

Load texture data from a file into memory.

Parameters
[in]filenameThe filename of the texture to load.
[out]textureDataPointer to the texture that has been loaded.

Definition at line 38 of file Text.cpp.

Variable Documentation

const char AstcTextures::fontFragmentShaderSource
Initial value:
=
{
"#version 300 es\n"
"precision mediump float;\n"
"uniform sampler2D u_s2dTexture;\n"
"in vec2 v_v2TexCoord;\n"
"in vec4 v_v4FontColor;\n"
"out vec4 color;\n"
"void main() {\n"
" vec4 v4Texel = texture(u_s2dTexture, v_v2TexCoord);\n"
" color = v_v4FontColor * v4Texel;\n"
"}\n"
}

Fragment shader source code for text rendering.

Definition at line 52 of file Text.h.

const char AstcTextures::fontVertexShaderSource
Initial value:
=
{
"#version 300 es\n"
"uniform mat4 u_m4Projection;\n"
"in vec4 a_v4Position;\n"
"in vec4 a_v4FontColor;\n"
"in vec2 a_v2TexCoord;\n"
"out vec4 v_v4FontColor;\n"
"out vec2 v_v2TexCoord;\n"
"void main() {\n"
" v_v4FontColor = a_v4FontColor;\n"
" v_v2TexCoord = a_v2TexCoord;\n"
" gl_Position = u_m4Projection * a_v4Position;\n"
"}\n"
}

Vertex shader source code for text rendering.

Definition at line 33 of file Text.h.