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

A sample to show how to enable AntiAliasing. More...

#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <jni.h>
#include <android/log.h>
#include <unistd.h>
#include "AntiAlias.h"
#include "Text.h"
#include "Shader.h"
#include "Matrix.h"
#include "AndroidPlatform.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_antialias_AntiAlias_init (JNIEnv *env, jclass jcls, jint width, jint height)
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_antialias_AntiAlias_step (JNIEnv *env, jclass jcls)
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_antialias_AntiAlias_uninit (JNIEnv *, jclass)
 

Variables

string resourceDirectory = "/data/data/com.arm.malideveloper.openglessdk.antialias/"
 
string vertexShaderFilename = "AntiAlias_triangle.vert"
 
string fragmentShaderFilename = "AntiAlias_triangle.frag"
 
GLuint programID = 0
 
GLint iLocPosition = -1
 
GLint iLocFillColor = -1
 
GLint iLocProjection = -1
 
int numberOfSamples = 0
 
Texttext
 

Detailed Description

A sample to show how to enable AntiAliasing.

Warning
AntiAliasing is disabled on Windows and Desktop Linux platforms. If your graphics card supports it, enable it in WindowsPlatform.cpp or DesktopLinux.cpp depending on your platform.

EGL_SAMPLES is used to specifiy the level of AntiAliasing to be used. On Mali platforms, 4x AntiAliasing incurs almost no performance penalty.

Definition in file AntiAlias.cpp.

Function Documentation

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

Definition at line 180 of file AntiAlias.cpp.

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

Definition at line 190 of file AntiAlias.cpp.

JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_antialias_AntiAlias_uninit ( JNIEnv *  ,
jclass   
)

Definition at line 196 of file AntiAlias.cpp.

static void renderFrame ( void  )

Definition at line 145 of file AntiAlias.cpp.

static void setupGraphics ( int  width,
int  height 
)

Definition at line 71 of file AntiAlias.cpp.

Variable Documentation

string fragmentShaderFilename = "AntiAlias_triangle.frag"

Definition at line 57 of file AntiAlias.cpp.

GLint iLocFillColor = -1

Definition at line 62 of file AntiAlias.cpp.

GLint iLocPosition = -1

Definition at line 61 of file AntiAlias.cpp.

GLint iLocProjection = -1

Definition at line 63 of file AntiAlias.cpp.

int numberOfSamples = 0

Definition at line 66 of file AntiAlias.cpp.

GLuint programID = 0

Definition at line 60 of file AntiAlias.cpp.

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

Definition at line 55 of file AntiAlias.cpp.

Text* text

Definition at line 69 of file AntiAlias.cpp.

string vertexShaderFilename = "AntiAlias_triangle.vert"

Definition at line 56 of file AntiAlias.cpp.