0

I'm dealing with some compatibility issues on my Xperia Play phone while trying to run my game, and because of that I must find all references to OpenGL ES extensions that are used within my app. This leads us to my question: Are there ways to use extensions other than via eglGetProcAddress() function?

Best regards, Buyuk.

Buyuk
  • 1,094
  • 1
  • 8
  • 23

2 Answers2

0

The answer is yes. The normal way to use extensions is to call them directly by name, which will contain one of these strings:

OES, ARB, IMG, PVR, EXT, AMD, VIV or NV

The names are defined in these header files:

#include <EGL/eglext.h>
#include <GLES2/gl2ext.h>

The names returned from a query are different. They typically look like this:

GL_AMD_compressed_3DC_texture GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_AMD_tiled_rendering GL_EXT_texture_filter_anisotropic GL_EXT_texture_type_2_10_10_10_REV GL_EXT_bgra GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_NV_fence

ClayMontgomery
  • 2,786
  • 1
  • 15
  • 14
0

No, not all extensions define new api calls, so eglGetProcAddress is not used for all of them. The good example is http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt - see there are new tokens (enums) here, but no new functions.

However compiling without *gl*ext.h headers, tracing out eglGetProcAddress and "#extension" strings in ESSL will give you at least some info on used non-core functionalities.

sacygan
  • 99
  • 4