OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Cube.cpp File Reference

A simple rotating cube. More...

#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <string>
#include <jni.h>
#include <android/log.h>
#include "Cube.h"
#include "AndroidPlatform.h"
#include "Text.h"
#include "Shader.h"
#include "Texture.h"
#include "Matrix.h"
#include "Timer.h"

Go to the source code of this file.

Functions

bool setupGraphics (int width, int height)
 
void renderFrame (void)
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_cube_Cube_init (JNIEnv *env, jclass jcls, jint width, jint height)
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_cube_Cube_step (JNIEnv *env, jclass jcls)
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_cube_Cube_uninit (JNIEnv *, jclass)
 

Variables

string resourceDirectory = "/data/data/com.arm.malideveloper.openglessdk.cube/"
 
string vertexShaderFilename = "Cube_cube.vert"
 
string fragmentShaderFilename = "Cube_cube.frag"
 
GLuint programID
 
GLint iLocPosition
 
GLint iLocColor
 
GLint iLocMVP
 
int windowWidth = -1
 
int windowHeight = -1
 
Texttext
 

Detailed Description

A simple rotating cube.

Definition in file Cube.cpp.

Function Documentation

JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_cube_Cube_init ( JNIEnv *  env,
jclass  jcls,
jint  width,
jint  height 
)

Definition at line 171 of file Cube.cpp.

JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_cube_Cube_step ( JNIEnv *  env,
jclass  jcls 
)

Definition at line 181 of file Cube.cpp.

JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_cube_Cube_uninit ( JNIEnv *  ,
jclass   
)

Definition at line 187 of file Cube.cpp.

void renderFrame ( void  )

Definition at line 115 of file Cube.cpp.

bool setupGraphics ( int  width,
int  height 
)

Definition at line 62 of file Cube.cpp.

Variable Documentation

string fragmentShaderFilename = "Cube_cube.frag"

Definition at line 48 of file Cube.cpp.

GLint iLocColor

Definition at line 53 of file Cube.cpp.

GLint iLocMVP

Definition at line 54 of file Cube.cpp.

GLint iLocPosition

Definition at line 52 of file Cube.cpp.

GLuint programID

Definition at line 51 of file Cube.cpp.

string resourceDirectory = "/data/data/com.arm.malideveloper.openglessdk.cube/"

Definition at line 46 of file Cube.cpp.

Text* text

Definition at line 60 of file Cube.cpp.

string vertexShaderFilename = "Cube_cube.vert"

Definition at line 47 of file Cube.cpp.

int windowHeight = -1

Definition at line 57 of file Cube.cpp.

int windowWidth = -1

Definition at line 56 of file Cube.cpp.