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

A sample which prints out the list of available EGL configurations on the current platform. More...

#include <EGL/egl.h>
#include <cstdlib>
#include <cstdio>
#include <jni.h>
#include <android/log.h>
#include "Platform.h"
#include "AndroidPlatform.h"

Go to the source code of this file.

Classes

struct  query
 

Typedefs

typedef const char *(* decodeToken )(EGLint)
 

Functions

const char * decodeColorBuffer (EGLint value)
 
const char * decodeCaveat (EGLint value)
 
const char * decodeSurface (EGLint value)
 
const char * decodeAPISupport (EGLint value)
 
void describeConfig (EGLDisplay display, EGLConfig *configs, int configIndex)
 
bool listConfigs (void)
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_listeglconfigs_ListEGLConfigs_init (JNIEnv *env, jclass jcls, jint width, jint height)
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_listeglconfigs_ListEGLConfigs_step (JNIEnv *env, jclass jcls)
 
JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_listeglconfigs_ListEGLConfigs_uninit (JNIEnv *, jclass)
 

Variables

query queryList []
 
const char * decodeSurfaceStrings []
 
const char * decodeAPISupportStrings []
 

Detailed Description

A sample which prints out the list of available EGL configurations on the current platform.

Shows how to use eglGetConfigs to view the availiable configurations on a system.

Definition in file ListEGLConfigs.cpp.

Typedef Documentation

typedef const char*(* decodeToken)(EGLint)

Definition at line 46 of file ListEGLConfigs.cpp.

Function Documentation

const char * decodeAPISupport ( EGLint  value)

Definition at line 200 of file ListEGLConfigs.cpp.

const char * decodeCaveat ( EGLint  value)

Definition at line 152 of file ListEGLConfigs.cpp.

const char * decodeColorBuffer ( EGLint  value)

Definition at line 172 of file ListEGLConfigs.cpp.

const char * decodeSurface ( EGLint  value)

Definition at line 145 of file ListEGLConfigs.cpp.

void describeConfig ( EGLDisplay  display,
EGLConfig *  configs,
int  configIndex 
)

Definition at line 95 of file ListEGLConfigs.cpp.

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

Definition at line 278 of file ListEGLConfigs.cpp.

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

Definition at line 284 of file ListEGLConfigs.cpp.

JNIEXPORT void JNICALL Java_com_arm_malideveloper_openglessdk_listeglconfigs_ListEGLConfigs_uninit ( JNIEnv *  ,
jclass   
)

Definition at line 290 of file ListEGLConfigs.cpp.

bool listConfigs ( void  )

Definition at line 206 of file ListEGLConfigs.cpp.

Variable Documentation

const char* decodeAPISupportStrings[]
Initial value:
= {
"No API support(?)",
"OpenGL ES",
"OpenVG",
"OpenGL ES, OpenVG",
"OpenGL ES 2.0",
"OpenGL ES, OpenGL ES 2.0",
"OpenGL ES 2.0, OpenVG",
"OpenGL ES, OpenGL ES 2.0, OpenVG"
}

Definition at line 189 of file ListEGLConfigs.cpp.

const char* decodeSurfaceStrings[]
Initial value:
= {
"None!",
"PBuffer",
"Pixmap",
"PBuffer+Pixmap",
"Window",
"Window+PBuffer",
"Window+Pixmap",
"Window+Pixmap+PBuffer"
}

Definition at line 134 of file ListEGLConfigs.cpp.

query queryList[]
Initial value:
= {
{EGL_CONFIG_ID, " EGL_CONFIG_ID %d\n", NULL},
{EGL_CONFIG_CAVEAT, " Config caveat: %s ", decodeCaveat},
{EGL_COLOR_BUFFER_TYPE, " Colour buffer type: %s\n", decodeColorBuffer},
{EGL_BUFFER_SIZE, " Colour depth: %d", NULL},
{EGL_RED_SIZE, " Red %d ", NULL},
{EGL_GREEN_SIZE, " Green %d ", NULL},
{EGL_BLUE_SIZE, " Blue %d ", NULL},
{EGL_ALPHA_SIZE, " Alpha %d\n", NULL},
{EGL_DEPTH_SIZE, " Z-buffer bits: %d\n", NULL},
{EGL_SAMPLES, " %dx anti-aliasing\n", NULL},
{EGL_SURFACE_TYPE, " Surfaces: %s\n ", decodeSurface},
{EGL_RENDERABLE_TYPE, " API support: %s\n", decodeAPISupport},
{EGL_NONE, NULL, NULL}
}
const char * decodeCaveat(EGLint value)
const char * decodeAPISupport(EGLint value)
const char * decodeColorBuffer(EGLint value)
const char * decodeSurface(EGLint value)

Definition at line 73 of file ListEGLConfigs.cpp.