PanoramaViewer
 All Classes Namespaces Files Functions Variables Macros Pages
nativeGL.cpp File Reference
#include <jni.h>
#include <android/log.h>
#include <android/bitmap.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "Esfera.cpp"
#include "Utilities.cpp"

Macros

#define VERTEX_POS_INDX   0
 
#define VERTEX_COLOR_INDX   1
 
#define VERTEX_TEXTURE_INDX   2
 

Functions

GLuint LoadShader (GLenum type, const char *shaderSrc)
 
void habilitarTextura ()
 
void perspectiveProj (GLfloat *matriz, GLuint width, GLuint height, GLfloat angleOfView)
 
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_Draw (JNIEnv *env, jobject obj)
 
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_Iniciar (JNIEnv *env, jobject obj)
 
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_surfaceChanged (JNIEnv *env, jobject obj, jint width, jint height)
 
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_scaleAngleOfView (JNIEnv *env, jobject obj, jfloat scale, jint width, jint height)
 
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_setModelViewMatrix (JNIEnv *env, jobject obj, jfloatArray matriz)
 
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_setPanorama (JNIEnv *env, jobject obj, jint width, jint height, jintArray imagem)
 
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_getimage (JNIEnv *env, jobject obj, jint width, jint height, jintArray imagem)
 

Variables

GLuint program
 
Esfera esfera (1.0, 90, 180)
 
GLfloat projectionMatrix [16]
 
GLfloat modelViewMatrix [16]
 
GLuint textureId
 
GLuint gvSamplerHandle
 
GLubyte * panorama
 
GLubyte * imageContainer
 

Macro Definition Documentation

#define VERTEX_COLOR_INDX   1
#define VERTEX_POS_INDX   0
#define VERTEX_TEXTURE_INDX   2

Function Documentation

void habilitarTextura ( )
inline
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_Draw ( JNIEnv *  env,
jobject  obj 
)
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_getimage ( JNIEnv *  env,
jobject  obj,
jint  width,
jint  height,
jintArray  imagem 
)
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_Iniciar ( JNIEnv *  env,
jobject  obj 
)
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_scaleAngleOfView ( JNIEnv *  env,
jobject  obj,
jfloat  scale,
jint  width,
jint  height 
)
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_setModelViewMatrix ( JNIEnv *  env,
jobject  obj,
jfloatArray  matriz 
)
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_setPanorama ( JNIEnv *  env,
jobject  obj,
jint  width,
jint  height,
jintArray  imagem 
)
JNIEXPORT void JNICALL Java_br_visgraf_panoramaViewer_MyGLRenderer_surfaceChanged ( JNIEnv *  env,
jobject  obj,
jint  width,
jint  height 
)
GLuint LoadShader ( GLenum  type,
const char *  shaderSrc 
)
void perspectiveProj ( GLfloat *  matriz,
GLuint  width,
GLuint  height,
GLfloat  angleOfView 
)
inline

Funcoes que manipulam matriz. Serao, posteriormente encapsuladas na classe camera

Variable Documentation

Esfera esfera(1.0, 90, 180)
GLuint gvSamplerHandle
GLubyte* imageContainer
GLfloat modelViewMatrix[16]
Initial value:
= {
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
}
GLubyte* panorama
GLuint program
GLfloat projectionMatrix[16]
GLuint textureId