12 auto gl = std::shared_ptr<GlProcTable>(
new GlProcTable());
15 reinterpret_cast<GenTexturesProc
>(::eglGetProcAddress(
"glGenTextures"));
16 gl->delete_textures_ =
reinterpret_cast<DeleteTexturesProc
>(
17 ::eglGetProcAddress(
"glDeleteTextures"));
19 reinterpret_cast<BindTextureProc
>(::eglGetProcAddress(
"glBindTexture"));
20 gl->tex_parameteri_ =
reinterpret_cast<TexParameteriProc
>(
21 ::eglGetProcAddress(
"glTexParameteri"));
23 reinterpret_cast<TexImage2DProc
>(::eglGetProcAddress(
"glTexImage2D"));
25 if (!gl->gen_textures_ || !gl->delete_textures_ || !gl->bind_texture_ ||
26 !gl->tex_parameteri_ || !gl->tex_image_2d_) {
38 gen_textures_(n, textures);
42 delete_textures_(n, textures);
46 bind_texture_(target, texture);
52 tex_parameteri_(target, pname, param);
63 const void* data)
const {
64 tex_image_2d_(target, level, internalformat, width, height, border, format,