blob: 7849e7343792a6617068dc6cab19191ea629d652 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// This file is auto-generated from
// ui/gl/generate_bindings.py
// It's formatted by clang-format using chromium coding style:
// clang-format -i -style=chromium filename
// DO NOT EDIT!
#include <string>
#include "base/trace_event/trace_event.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_enums.h"
#include "ui/gl/gl_gl_api_implementation.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_version_info.h"
namespace gl {
void DriverGL::InitializeStaticBindings() {
// Ensure struct has been zero-initialized.
char* this_bytes = reinterpret_cast<char*>(this);
DCHECK(this_bytes[0] == 0);
DCHECK(memcmp(this_bytes, this_bytes + 1, sizeof(*this) - 1) == 0);
fn.glActiveTextureFn = reinterpret_cast<glActiveTextureProc>(
GetGLProcAddress("glActiveTexture"));
fn.glAttachShaderFn =
reinterpret_cast<glAttachShaderProc>(GetGLProcAddress("glAttachShader"));
fn.glBindAttribLocationFn = reinterpret_cast<glBindAttribLocationProc>(
GetGLProcAddress("glBindAttribLocation"));
fn.glBindBufferFn =
reinterpret_cast<glBindBufferProc>(GetGLProcAddress("glBindBuffer"));
fn.glBindTextureFn =
reinterpret_cast<glBindTextureProc>(GetGLProcAddress("glBindTexture"));
fn.glBlendColorFn =
reinterpret_cast<glBlendColorProc>(GetGLProcAddress("glBlendColor"));
fn.glBlendEquationFn = reinterpret_cast<glBlendEquationProc>(
GetGLProcAddress("glBlendEquation"));
fn.glBlendEquationSeparateFn = reinterpret_cast<glBlendEquationSeparateProc>(
GetGLProcAddress("glBlendEquationSeparate"));
fn.glBlendFuncFn =
reinterpret_cast<glBlendFuncProc>(GetGLProcAddress("glBlendFunc"));
fn.glBlendFuncSeparateFn = reinterpret_cast<glBlendFuncSeparateProc>(
GetGLProcAddress("glBlendFuncSeparate"));
fn.glBufferDataFn =
reinterpret_cast<glBufferDataProc>(GetGLProcAddress("glBufferData"));
fn.glBufferSubDataFn = reinterpret_cast<glBufferSubDataProc>(
GetGLProcAddress("glBufferSubData"));
fn.glClearFn = reinterpret_cast<glClearProc>(GetGLProcAddress("glClear"));
fn.glClearColorFn =
reinterpret_cast<glClearColorProc>(GetGLProcAddress("glClearColor"));
fn.glClearDepthFn =
reinterpret_cast<glClearDepthProc>(GetGLProcAddress("glClearDepth"));
fn.glClearStencilFn =
reinterpret_cast<glClearStencilProc>(GetGLProcAddress("glClearStencil"));
fn.glColorMaskFn =
reinterpret_cast<glColorMaskProc>(GetGLProcAddress("glColorMask"));
fn.glCompileShaderFn = reinterpret_cast<glCompileShaderProc>(
GetGLProcAddress("glCompileShader"));
fn.glCompressedTexImage2DFn = reinterpret_cast<glCompressedTexImage2DProc>(
GetGLProcAddress("glCompressedTexImage2D"));
fn.glCompressedTexSubImage2DFn =
reinterpret_cast<glCompressedTexSubImage2DProc>(
GetGLProcAddress("glCompressedTexSubImage2D"));
fn.glCopyTexImage2DFn = reinterpret_cast<glCopyTexImage2DProc>(
GetGLProcAddress("glCopyTexImage2D"));
fn.glCopyTexSubImage2DFn = reinterpret_cast<glCopyTexSubImage2DProc>(
GetGLProcAddress("glCopyTexSubImage2D"));
fn.glCreateProgramFn = reinterpret_cast<glCreateProgramProc>(
GetGLProcAddress("glCreateProgram"));
fn.glCreateShaderFn =
reinterpret_cast<glCreateShaderProc>(GetGLProcAddress("glCreateShader"));
fn.glCullFaceFn =
reinterpret_cast<glCullFaceProc>(GetGLProcAddress("glCullFace"));
fn.glDeleteBuffersARBFn = reinterpret_cast<glDeleteBuffersARBProc>(
GetGLProcAddress("glDeleteBuffers"));
fn.glDeleteProgramFn = reinterpret_cast<glDeleteProgramProc>(
GetGLProcAddress("glDeleteProgram"));
fn.glDeleteShaderFn =
reinterpret_cast<glDeleteShaderProc>(GetGLProcAddress("glDeleteShader"));
fn.glDeleteTexturesFn = reinterpret_cast<glDeleteTexturesProc>(
GetGLProcAddress("glDeleteTextures"));
fn.glDepthFuncFn =
reinterpret_cast<glDepthFuncProc>(GetGLProcAddress("glDepthFunc"));
fn.glDepthMaskFn =
reinterpret_cast<glDepthMaskProc>(GetGLProcAddress("glDepthMask"));
fn.glDepthRangeFn =
reinterpret_cast<glDepthRangeProc>(GetGLProcAddress("glDepthRange"));
fn.glDetachShaderFn =
reinterpret_cast<glDetachShaderProc>(GetGLProcAddress("glDetachShader"));
fn.glDisableFn =
reinterpret_cast<glDisableProc>(GetGLProcAddress("glDisable"));
fn.glDisableVertexAttribArrayFn =
reinterpret_cast<glDisableVertexAttribArrayProc>(
GetGLProcAddress("glDisableVertexAttribArray"));
fn.glDrawArraysFn =
reinterpret_cast<glDrawArraysProc>(GetGLProcAddress("glDrawArrays"));
fn.glDrawElementsFn =
reinterpret_cast<glDrawElementsProc>(GetGLProcAddress("glDrawElements"));
fn.glEnableFn = reinterpret_cast<glEnableProc>(GetGLProcAddress("glEnable"));
fn.glEnableVertexAttribArrayFn =
reinterpret_cast<glEnableVertexAttribArrayProc>(
GetGLProcAddress("glEnableVertexAttribArray"));
fn.glFinishFn = reinterpret_cast<glFinishProc>(GetGLProcAddress("glFinish"));
fn.glFlushFn = reinterpret_cast<glFlushProc>(GetGLProcAddress("glFlush"));
fn.glFrontFaceFn =
reinterpret_cast<glFrontFaceProc>(GetGLProcAddress("glFrontFace"));
fn.glGenBuffersARBFn =
reinterpret_cast<glGenBuffersARBProc>(GetGLProcAddress("glGenBuffers"));
fn.glGenTexturesFn =
reinterpret_cast<glGenTexturesProc>(GetGLProcAddress("glGenTextures"));
fn.glGetActiveAttribFn = reinterpret_cast<glGetActiveAttribProc>(
GetGLProcAddress("glGetActiveAttrib"));
fn.glGetActiveUniformFn = reinterpret_cast<glGetActiveUniformProc>(
GetGLProcAddress("glGetActiveUniform"));
fn.glGetAttachedShadersFn = reinterpret_cast<glGetAttachedShadersProc>(
GetGLProcAddress("glGetAttachedShaders"));
fn.glGetAttribLocationFn = reinterpret_cast<glGetAttribLocationProc>(
GetGLProcAddress("glGetAttribLocation"));
fn.glGetBooleanvFn =
reinterpret_cast<glGetBooleanvProc>(GetGLProcAddress("glGetBooleanv"));
fn.glGetBufferParameterivFn = reinterpret_cast<glGetBufferParameterivProc>(
GetGLProcAddress("glGetBufferParameteriv"));
fn.glGetErrorFn =
reinterpret_cast<glGetErrorProc>(GetGLProcAddress("glGetError"));
fn.glGetFloatvFn =
reinterpret_cast<glGetFloatvProc>(GetGLProcAddress("glGetFloatv"));
fn.glGetIntegervFn =
reinterpret_cast<glGetIntegervProc>(GetGLProcAddress("glGetIntegerv"));
fn.glGetProgramInfoLogFn = reinterpret_cast<glGetProgramInfoLogProc>(
GetGLProcAddress("glGetProgramInfoLog"));
fn.glGetProgramivFn =
reinterpret_cast<glGetProgramivProc>(GetGLProcAddress("glGetProgramiv"));
fn.glGetShaderInfoLogFn = reinterpret_cast<glGetShaderInfoLogProc>(
GetGLProcAddress("glGetShaderInfoLog"));
fn.glGetShaderivFn =
reinterpret_cast<glGetShaderivProc>(GetGLProcAddress("glGetShaderiv"));
fn.glGetShaderSourceFn = reinterpret_cast<glGetShaderSourceProc>(
GetGLProcAddress("glGetShaderSource"));
fn.glGetStringFn =
reinterpret_cast<glGetStringProc>(GetGLProcAddress("glGetString"));
fn.glGetStringiFn =
reinterpret_cast<glGetStringiProc>(GetGLProcAddress("glGetStringi"));
fn.glGetTexParameterfvFn = reinterpret_cast<glGetTexParameterfvProc>(
GetGLProcAddress("glGetTexParameterfv"));
fn.glGetTexParameterivFn = reinterpret_cast<glGetTexParameterivProc>(
GetGLProcAddress("glGetTexParameteriv"));
fn.glGetUniformfvFn =
reinterpret_cast<glGetUniformfvProc>(GetGLProcAddress("glGetUniformfv"));
fn.glGetUniformivFn =
reinterpret_cast<glGetUniformivProc>(GetGLProcAddress("glGetUniformiv"));
fn.glGetUniformLocationFn = reinterpret_cast<glGetUniformLocationProc>(
GetGLProcAddress("glGetUniformLocation"));
fn.glGetVertexAttribfvFn = reinterpret_cast<glGetVertexAttribfvProc>(
GetGLProcAddress("glGetVertexAttribfv"));
fn.glGetVertexAttribivFn = reinterpret_cast<glGetVertexAttribivProc>(
GetGLProcAddress("glGetVertexAttribiv"));
fn.glGetVertexAttribPointervFn =
reinterpret_cast<glGetVertexAttribPointervProc>(
GetGLProcAddress("glGetVertexAttribPointerv"));
fn.glHintFn = reinterpret_cast<glHintProc>(GetGLProcAddress("glHint"));
fn.glIsBufferFn =
reinterpret_cast<glIsBufferProc>(GetGLProcAddress("glIsBuffer"));
fn.glIsEnabledFn =
reinterpret_cast<glIsEnabledProc>(GetGLProcAddress("glIsEnabled"));
fn.glIsProgramFn =
reinterpret_cast<glIsProgramProc>(GetGLProcAddress("glIsProgram"));
fn.glIsShaderFn =
reinterpret_cast<glIsShaderProc>(GetGLProcAddress("glIsShader"));
fn.glIsTextureFn =
reinterpret_cast<glIsTextureProc>(GetGLProcAddress("glIsTexture"));
fn.glLineWidthFn =
reinterpret_cast<glLineWidthProc>(GetGLProcAddress("glLineWidth"));
fn.glLinkProgramFn =
reinterpret_cast<glLinkProgramProc>(GetGLProcAddress("glLinkProgram"));
fn.glPixelStoreiFn =
reinterpret_cast<glPixelStoreiProc>(GetGLProcAddress("glPixelStorei"));
fn.glPolygonOffsetFn = reinterpret_cast<glPolygonOffsetProc>(
GetGLProcAddress("glPolygonOffset"));
fn.glReadPixelsFn =
reinterpret_cast<glReadPixelsProc>(GetGLProcAddress("glReadPixels"));
fn.glSampleCoverageFn = reinterpret_cast<glSampleCoverageProc>(
GetGLProcAddress("glSampleCoverage"));
fn.glScissorFn =
reinterpret_cast<glScissorProc>(GetGLProcAddress("glScissor"));
fn.glShaderSourceFn =
reinterpret_cast<glShaderSourceProc>(GetGLProcAddress("glShaderSource"));
fn.glStencilFuncFn =
reinterpret_cast<glStencilFuncProc>(GetGLProcAddress("glStencilFunc"));
fn.glStencilFuncSeparateFn = reinterpret_cast<glStencilFuncSeparateProc>(
GetGLProcAddress("glStencilFuncSeparate"));
fn.glStencilMaskFn =
reinterpret_cast<glStencilMaskProc>(GetGLProcAddress("glStencilMask"));
fn.glStencilMaskSeparateFn = reinterpret_cast<glStencilMaskSeparateProc>(
GetGLProcAddress("glStencilMaskSeparate"));
fn.glStencilOpFn =
reinterpret_cast<glStencilOpProc>(GetGLProcAddress("glStencilOp"));
fn.glStencilOpSeparateFn = reinterpret_cast<glStencilOpSeparateProc>(
GetGLProcAddress("glStencilOpSeparate"));
fn.glTexImage2DFn =
reinterpret_cast<glTexImage2DProc>(GetGLProcAddress("glTexImage2D"));
fn.glTexParameterfFn = reinterpret_cast<glTexParameterfProc>(
GetGLProcAddress("glTexParameterf"));
fn.glTexParameterfvFn = reinterpret_cast<glTexParameterfvProc>(
GetGLProcAddress("glTexParameterfv"));
fn.glTexParameteriFn = reinterpret_cast<glTexParameteriProc>(
GetGLProcAddress("glTexParameteri"));
fn.glTexParameterivFn = reinterpret_cast<glTexParameterivProc>(
GetGLProcAddress("glTexParameteriv"));
fn.glTexSubImage2DFn = reinterpret_cast<glTexSubImage2DProc>(
GetGLProcAddress("glTexSubImage2D"));
fn.glUniform1fFn =
reinterpret_cast<glUniform1fProc>(GetGLProcAddress("glUniform1f"));
fn.glUniform1fvFn =
reinterpret_cast<glUniform1fvProc>(GetGLProcAddress("glUniform1fv"));
fn.glUniform1iFn =
reinterpret_cast<glUniform1iProc>(GetGLProcAddress("glUniform1i"));
fn.glUniform1ivFn =
reinterpret_cast<glUniform1ivProc>(GetGLProcAddress("glUniform1iv"));
fn.glUniform2fFn =
reinterpret_cast<glUniform2fProc>(GetGLProcAddress("glUniform2f"));
fn.glUniform2fvFn =
reinterpret_cast<glUniform2fvProc>(GetGLProcAddress("glUniform2fv"));
fn.glUniform2iFn =
reinterpret_cast<glUniform2iProc>(GetGLProcAddress("glUniform2i"));
fn.glUniform2ivFn =
reinterpret_cast<glUniform2ivProc>(GetGLProcAddress("glUniform2iv"));
fn.glUniform3fFn =
reinterpret_cast<glUniform3fProc>(GetGLProcAddress("glUniform3f"));
fn.glUniform3fvFn =
reinterpret_cast<glUniform3fvProc>(GetGLProcAddress("glUniform3fv"));
fn.glUniform3iFn =
reinterpret_cast<glUniform3iProc>(GetGLProcAddress("glUniform3i"));
fn.glUniform3ivFn =
reinterpret_cast<glUniform3ivProc>(GetGLProcAddress("glUniform3iv"));
fn.glUniform4fFn =
reinterpret_cast<glUniform4fProc>(GetGLProcAddress("glUniform4f"));
fn.glUniform4fvFn =
reinterpret_cast<glUniform4fvProc>(GetGLProcAddress("glUniform4fv"));
fn.glUniform4iFn =
reinterpret_cast<glUniform4iProc>(GetGLProcAddress("glUniform4i"));
fn.glUniform4ivFn =
reinterpret_cast<glUniform4ivProc>(GetGLProcAddress("glUniform4iv"));
fn.glUniformMatrix2fvFn = reinterpret_cast<glUniformMatrix2fvProc>(
GetGLProcAddress("glUniformMatrix2fv"));
fn.glUniformMatrix3fvFn = reinterpret_cast<glUniformMatrix3fvProc>(
GetGLProcAddress("glUniformMatrix3fv"));
fn.glUniformMatrix4fvFn = reinterpret_cast<glUniformMatrix4fvProc>(
GetGLProcAddress("glUniformMatrix4fv"));
fn.glUseProgramFn =
reinterpret_cast<glUseProgramProc>(GetGLProcAddress("glUseProgram"));
fn.glValidateProgramFn = reinterpret_cast<glValidateProgramProc>(
GetGLProcAddress("glValidateProgram"));
fn.glVertexAttrib1fFn = reinterpret_cast<glVertexAttrib1fProc>(
GetGLProcAddress("glVertexAttrib1f"));
fn.glVertexAttrib1fvFn = reinterpret_cast<glVertexAttrib1fvProc>(
GetGLProcAddress("glVertexAttrib1fv"));
fn.glVertexAttrib2fFn = reinterpret_cast<glVertexAttrib2fProc>(
GetGLProcAddress("glVertexAttrib2f"));
fn.glVertexAttrib2fvFn = reinterpret_cast<glVertexAttrib2fvProc>(
GetGLProcAddress("glVertexAttrib2fv"));
fn.glVertexAttrib3fFn = reinterpret_cast<glVertexAttrib3fProc>(
GetGLProcAddress("glVertexAttrib3f"));
fn.glVertexAttrib3fvFn = reinterpret_cast<glVertexAttrib3fvProc>(
GetGLProcAddress("glVertexAttrib3fv"));
fn.glVertexAttrib4fFn = reinterpret_cast<glVertexAttrib4fProc>(
GetGLProcAddress("glVertexAttrib4f"));
fn.glVertexAttrib4fvFn = reinterpret_cast<glVertexAttrib4fvProc>(
GetGLProcAddress("glVertexAttrib4fv"));
fn.glVertexAttribPointerFn = reinterpret_cast<glVertexAttribPointerProc>(
GetGLProcAddress("glVertexAttribPointer"));
fn.glViewportFn =
reinterpret_cast<glViewportProc>(GetGLProcAddress("glViewport"));
}
void DriverGL::InitializeDynamicBindings(const GLVersionInfo* ver,
const gfx::ExtensionSet& extensions) {
ext.b_GL_AMD_framebuffer_multisample_advanced =
gfx::HasExtension(extensions, "GL_AMD_framebuffer_multisample_advanced");
ext.b_GL_ANGLE_framebuffer_blit =
gfx::HasExtension(extensions, "GL_ANGLE_framebuffer_blit");
ext.b_GL_ANGLE_framebuffer_multisample =
gfx::HasExtension(extensions, "GL_ANGLE_framebuffer_multisample");
ext.b_GL_ANGLE_instanced_arrays =
gfx::HasExtension(extensions, "GL_ANGLE_instanced_arrays");
ext.b_GL_ANGLE_multi_draw =
gfx::HasExtension(extensions, "GL_ANGLE_multi_draw");
ext.b_GL_ANGLE_request_extension =
gfx::HasExtension(extensions, "GL_ANGLE_request_extension");
ext.b_GL_ANGLE_robust_client_memory =
gfx::HasExtension(extensions, "GL_ANGLE_robust_client_memory");
ext.b_GL_ANGLE_texture_external_update =
gfx::HasExtension(extensions, "GL_ANGLE_texture_external_update");
ext.b_GL_ANGLE_translated_shader_source =
gfx::HasExtension(extensions, "GL_ANGLE_translated_shader_source");
ext.b_GL_APPLE_fence = gfx::HasExtension(extensions, "GL_APPLE_fence");
ext.b_GL_APPLE_sync = gfx::HasExtension(extensions, "GL_APPLE_sync");
ext.b_GL_APPLE_vertex_array_object =
gfx::HasExtension(extensions, "GL_APPLE_vertex_array_object");
ext.b_GL_ARB_ES2_compatibility =
gfx::HasExtension(extensions, "GL_ARB_ES2_compatibility");
ext.b_GL_ARB_blend_func_extended =
gfx::HasExtension(extensions, "GL_ARB_blend_func_extended");
ext.b_GL_ARB_clear_texture =
gfx::HasExtension(extensions, "GL_ARB_clear_texture");
ext.b_GL_ARB_draw_buffers =
gfx::HasExtension(extensions, "GL_ARB_draw_buffers");
ext.b_GL_ARB_draw_instanced =
gfx::HasExtension(extensions, "GL_ARB_draw_instanced");
ext.b_GL_ARB_framebuffer_object =
gfx::HasExtension(extensions, "GL_ARB_framebuffer_object");
ext.b_GL_ARB_get_program_binary =
gfx::HasExtension(extensions, "GL_ARB_get_program_binary");
ext.b_GL_ARB_instanced_arrays =
gfx::HasExtension(extensions, "GL_ARB_instanced_arrays");
ext.b_GL_ARB_internalformat_query =
gfx::HasExtension(extensions, "GL_ARB_internalformat_query");
ext.b_GL_ARB_map_buffer_range =
gfx::HasExtension(extensions, "GL_ARB_map_buffer_range");
ext.b_GL_ARB_occlusion_query =
gfx::HasExtension(extensions, "GL_ARB_occlusion_query");
ext.b_GL_ARB_program_interface_query =
gfx::HasExtension(extensions, "GL_ARB_program_interface_query");
ext.b_GL_ARB_robustness = gfx::HasExtension(extensions, "GL_ARB_robustness");
ext.b_GL_ARB_sampler_objects =
gfx::HasExtension(extensions, "GL_ARB_sampler_objects");
ext.b_GL_ARB_shader_image_load_store =
gfx::HasExtension(extensions, "GL_ARB_shader_image_load_store");
ext.b_GL_ARB_sync = gfx::HasExtension(extensions, "GL_ARB_sync");
ext.b_GL_ARB_texture_multisample =
gfx::HasExtension(extensions, "GL_ARB_texture_multisample");
ext.b_GL_ARB_texture_storage =
gfx::HasExtension(extensions, "GL_ARB_texture_storage");
ext.b_GL_ARB_timer_query =
gfx::HasExtension(extensions, "GL_ARB_timer_query");
ext.b_GL_ARB_transform_feedback2 =
gfx::HasExtension(extensions, "GL_ARB_transform_feedback2");
ext.b_GL_ARB_vertex_array_object =
gfx::HasExtension(extensions, "GL_ARB_vertex_array_object");
ext.b_GL_CHROMIUM_bind_uniform_location =
gfx::HasExtension(extensions, "GL_CHROMIUM_bind_uniform_location");
ext.b_GL_CHROMIUM_copy_texture =
gfx::HasExtension(extensions, "GL_CHROMIUM_copy_texture");
ext.b_GL_CHROMIUM_framebuffer_mixed_samples =
gfx::HasExtension(extensions, "GL_CHROMIUM_framebuffer_mixed_samples");
ext.b_GL_CHROMIUM_gles_depth_binding_hack =
gfx::HasExtension(extensions, "GL_CHROMIUM_gles_depth_binding_hack");
ext.b_GL_CHROMIUM_glgetstringi_hack =
gfx::HasExtension(extensions, "GL_CHROMIUM_glgetstringi_hack");
ext.b_GL_CHROMIUM_path_rendering =
gfx::HasExtension(extensions, "GL_CHROMIUM_path_rendering");
ext.b_GL_EXT_blend_func_extended =
gfx::HasExtension(extensions, "GL_EXT_blend_func_extended");
ext.b_GL_EXT_clear_texture =
gfx::HasExtension(extensions, "GL_EXT_clear_texture");
ext.b_GL_EXT_debug_marker =
gfx::HasExtension(extensions, "GL_EXT_debug_marker");
ext.b_GL_EXT_direct_state_access =
gfx::HasExtension(extensions, "GL_EXT_direct_state_access");
ext.b_GL_EXT_discard_framebuffer =
gfx::HasExtension(extensions, "GL_EXT_discard_framebuffer");
ext.b_GL_EXT_disjoint_timer_query =
gfx::HasExtension(extensions, "GL_EXT_disjoint_timer_query");
ext.b_GL_EXT_draw_buffers =
gfx::HasExtension(extensions, "GL_EXT_draw_buffers");
ext.b_GL_EXT_framebuffer_blit =
gfx::HasExtension(extensions, "GL_EXT_framebuffer_blit");
ext.b_GL_EXT_framebuffer_multisample =
gfx::HasExtension(extensions, "GL_EXT_framebuffer_multisample");
ext.b_GL_EXT_framebuffer_object =
gfx::HasExtension(extensions, "GL_EXT_framebuffer_object");
ext.b_GL_EXT_gpu_shader4 =
gfx::HasExtension(extensions, "GL_EXT_gpu_shader4");
ext.b_GL_EXT_instanced_arrays =
gfx::HasExtension(extensions, "GL_EXT_instanced_arrays");
ext.b_GL_EXT_map_buffer_range =
gfx::HasExtension(extensions, "GL_EXT_map_buffer_range");
ext.b_GL_EXT_memory_object =
gfx::HasExtension(extensions, "GL_EXT_memory_object");
ext.b_GL_EXT_memory_object_fd =
gfx::HasExtension(extensions, "GL_EXT_memory_object_fd");
ext.b_GL_EXT_multisampled_render_to_texture =
gfx::HasExtension(extensions, "GL_EXT_multisampled_render_to_texture");
ext.b_GL_EXT_occlusion_query_boolean =
gfx::HasExtension(extensions, "GL_EXT_occlusion_query_boolean");
ext.b_GL_EXT_robustness = gfx::HasExtension(extensions, "GL_EXT_robustness");
ext.b_GL_EXT_semaphore = gfx::HasExtension(extensions, "GL_EXT_semaphore");
ext.b_GL_EXT_semaphore_fd =
gfx::HasExtension(extensions, "GL_EXT_semaphore_fd");
ext.b_GL_EXT_shader_image_load_store =
gfx::HasExtension(extensions, "GL_EXT_shader_image_load_store");
ext.b_GL_EXT_texture_buffer =
gfx::HasExtension(extensions, "GL_EXT_texture_buffer");
ext.b_GL_EXT_texture_buffer_object =
gfx::HasExtension(extensions, "GL_EXT_texture_buffer_object");
ext.b_GL_EXT_texture_storage =
gfx::HasExtension(extensions, "GL_EXT_texture_storage");
ext.b_GL_EXT_timer_query =
gfx::HasExtension(extensions, "GL_EXT_timer_query");
ext.b_GL_EXT_transform_feedback =
gfx::HasExtension(extensions, "GL_EXT_transform_feedback");
ext.b_GL_EXT_unpack_subimage =
gfx::HasExtension(extensions, "GL_EXT_unpack_subimage");
ext.b_GL_EXT_window_rectangles =
gfx::HasExtension(extensions, "GL_EXT_window_rectangles");
ext.b_GL_IMG_multisampled_render_to_texture =
gfx::HasExtension(extensions, "GL_IMG_multisampled_render_to_texture");
ext.b_GL_INTEL_framebuffer_CMAA =
gfx::HasExtension(extensions, "GL_INTEL_framebuffer_CMAA");
ext.b_GL_KHR_blend_equation_advanced =
gfx::HasExtension(extensions, "GL_KHR_blend_equation_advanced");
ext.b_GL_KHR_debug = gfx::HasExtension(extensions, "GL_KHR_debug");
ext.b_GL_KHR_parallel_shader_compile =
gfx::HasExtension(extensions, "GL_KHR_parallel_shader_compile");
ext.b_GL_KHR_robustness = gfx::HasExtension(extensions, "GL_KHR_robustness");
ext.b_GL_NV_blend_equation_advanced =
gfx::HasExtension(extensions, "GL_NV_blend_equation_advanced");
ext.b_GL_NV_fence = gfx::HasExtension(extensions, "GL_NV_fence");
ext.b_GL_NV_framebuffer_mixed_samples =
gfx::HasExtension(extensions, "GL_NV_framebuffer_mixed_samples");
ext.b_GL_NV_internalformat_sample_query =
gfx::HasExtension(extensions, "GL_NV_internalformat_sample_query");
ext.b_GL_NV_path_rendering =
gfx::HasExtension(extensions, "GL_NV_path_rendering");
ext.b_GL_OES_EGL_image = gfx::HasExtension(extensions, "GL_OES_EGL_image");
ext.b_GL_OES_get_program_binary =
gfx::HasExtension(extensions, "GL_OES_get_program_binary");
ext.b_GL_OES_mapbuffer = gfx::HasExtension(extensions, "GL_OES_mapbuffer");
ext.b_GL_OES_texture_buffer =
gfx::HasExtension(extensions, "GL_OES_texture_buffer");
ext.b_GL_OES_vertex_array_object =
gfx::HasExtension(extensions, "GL_OES_vertex_array_object");
ext.b_GL_OVR_multiview = gfx::HasExtension(extensions, "GL_OVR_multiview");
ext.b_GL_OVR_multiview2 = gfx::HasExtension(extensions, "GL_OVR_multiview2");
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glActiveShaderProgramFn = reinterpret_cast<glActiveShaderProgramProc>(
GetGLProcAddress("glActiveShaderProgram"));
}
if (ext.b_GL_INTEL_framebuffer_CMAA) {
fn.glApplyFramebufferAttachmentCMAAINTELFn =
reinterpret_cast<glApplyFramebufferAttachmentCMAAINTELProc>(
GetGLProcAddress("glApplyFramebufferAttachmentCMAAINTEL"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glBeginQueryFn =
reinterpret_cast<glBeginQueryProc>(GetGLProcAddress("glBeginQuery"));
} else if (ext.b_GL_ARB_occlusion_query) {
fn.glBeginQueryFn =
reinterpret_cast<glBeginQueryProc>(GetGLProcAddress("glBeginQueryARB"));
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
fn.glBeginQueryFn =
reinterpret_cast<glBeginQueryProc>(GetGLProcAddress("glBeginQueryEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glBeginTransformFeedbackFn =
reinterpret_cast<glBeginTransformFeedbackProc>(
GetGLProcAddress("glBeginTransformFeedback"));
} else if (ext.b_GL_EXT_transform_feedback) {
fn.glBeginTransformFeedbackFn =
reinterpret_cast<glBeginTransformFeedbackProc>(
GetGLProcAddress("glBeginTransformFeedbackEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glBindBufferBaseFn = reinterpret_cast<glBindBufferBaseProc>(
GetGLProcAddress("glBindBufferBase"));
} else if (ext.b_GL_EXT_transform_feedback) {
fn.glBindBufferBaseFn = reinterpret_cast<glBindBufferBaseProc>(
GetGLProcAddress("glBindBufferBaseEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glBindBufferRangeFn = reinterpret_cast<glBindBufferRangeProc>(
GetGLProcAddress("glBindBufferRange"));
} else if (ext.b_GL_EXT_transform_feedback) {
fn.glBindBufferRangeFn = reinterpret_cast<glBindBufferRangeProc>(
GetGLProcAddress("glBindBufferRangeEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ext.b_GL_ARB_blend_func_extended) {
fn.glBindFragDataLocationFn = reinterpret_cast<glBindFragDataLocationProc>(
GetGLProcAddress("glBindFragDataLocation"));
} else if (ext.b_GL_EXT_gpu_shader4 || ext.b_GL_EXT_blend_func_extended) {
fn.glBindFragDataLocationFn = reinterpret_cast<glBindFragDataLocationProc>(
GetGLProcAddress("glBindFragDataLocationEXT"));
}
if (ver->IsAtLeastGL(3u, 3u) || ext.b_GL_ARB_blend_func_extended) {
fn.glBindFragDataLocationIndexedFn =
reinterpret_cast<glBindFragDataLocationIndexedProc>(
GetGLProcAddress("glBindFragDataLocationIndexed"));
} else if (ext.b_GL_EXT_blend_func_extended) {
fn.glBindFragDataLocationIndexedFn =
reinterpret_cast<glBindFragDataLocationIndexedProc>(
GetGLProcAddress("glBindFragDataLocationIndexedEXT"));
}
if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glBindFragmentInputLocationCHROMIUMFn =
reinterpret_cast<glBindFragmentInputLocationCHROMIUMProc>(
GetGLProcAddress("glBindFragmentInputLocationCHROMIUM"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glBindFramebufferEXTFn = reinterpret_cast<glBindFramebufferEXTProc>(
GetGLProcAddress("glBindFramebuffer"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glBindFramebufferEXTFn = reinterpret_cast<glBindFramebufferEXTProc>(
GetGLProcAddress("glBindFramebufferEXT"));
}
if (ver->IsAtLeastGL(4u, 2u) || ver->IsAtLeastGLES(3u, 1u) ||
ext.b_GL_ARB_shader_image_load_store) {
fn.glBindImageTextureEXTFn = reinterpret_cast<glBindImageTextureEXTProc>(
GetGLProcAddress("glBindImageTexture"));
} else if (ext.b_GL_EXT_shader_image_load_store) {
fn.glBindImageTextureEXTFn = reinterpret_cast<glBindImageTextureEXTProc>(
GetGLProcAddress("glBindImageTextureEXT"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glBindProgramPipelineFn = reinterpret_cast<glBindProgramPipelineProc>(
GetGLProcAddress("glBindProgramPipeline"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glBindRenderbufferEXTFn = reinterpret_cast<glBindRenderbufferEXTProc>(
GetGLProcAddress("glBindRenderbuffer"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glBindRenderbufferEXTFn = reinterpret_cast<glBindRenderbufferEXTProc>(
GetGLProcAddress("glBindRenderbufferEXT"));
}
if (ver->IsAtLeastGL(3u, 3u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sampler_objects) {
fn.glBindSamplerFn =
reinterpret_cast<glBindSamplerProc>(GetGLProcAddress("glBindSampler"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(4u, 0u) ||
ext.b_GL_ARB_transform_feedback2) {
fn.glBindTransformFeedbackFn =
reinterpret_cast<glBindTransformFeedbackProc>(
GetGLProcAddress("glBindTransformFeedback"));
}
if (ext.b_GL_CHROMIUM_bind_uniform_location) {
fn.glBindUniformLocationCHROMIUMFn =
reinterpret_cast<glBindUniformLocationCHROMIUMProc>(
GetGLProcAddress("glBindUniformLocationCHROMIUM"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_vertex_array_object) {
fn.glBindVertexArrayOESFn = reinterpret_cast<glBindVertexArrayOESProc>(
GetGLProcAddress("glBindVertexArray"));
} else if (ext.b_GL_OES_vertex_array_object) {
fn.glBindVertexArrayOESFn = reinterpret_cast<glBindVertexArrayOESProc>(
GetGLProcAddress("glBindVertexArrayOES"));
} else if (ext.b_GL_APPLE_vertex_array_object) {
fn.glBindVertexArrayOESFn = reinterpret_cast<glBindVertexArrayOESProc>(
GetGLProcAddress("glBindVertexArrayAPPLE"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glBindVertexBufferFn = reinterpret_cast<glBindVertexBufferProc>(
GetGLProcAddress("glBindVertexBuffer"));
}
if (ext.b_GL_NV_blend_equation_advanced) {
fn.glBlendBarrierKHRFn = reinterpret_cast<glBlendBarrierKHRProc>(
GetGLProcAddress("glBlendBarrierNV"));
} else if (ext.b_GL_KHR_blend_equation_advanced) {
fn.glBlendBarrierKHRFn = reinterpret_cast<glBlendBarrierKHRProc>(
GetGLProcAddress("glBlendBarrierKHR"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_framebuffer_object) {
fn.glBlitFramebufferFn = reinterpret_cast<glBlitFramebufferProc>(
GetGLProcAddress("glBlitFramebuffer"));
} else if (ext.b_GL_ANGLE_framebuffer_blit) {
fn.glBlitFramebufferFn = reinterpret_cast<glBlitFramebufferProc>(
GetGLProcAddress("glBlitFramebufferANGLE"));
} else if (ext.b_GL_EXT_framebuffer_blit) {
fn.glBlitFramebufferFn = reinterpret_cast<glBlitFramebufferProc>(
GetGLProcAddress("glBlitFramebufferEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glCheckFramebufferStatusEXTFn =
reinterpret_cast<glCheckFramebufferStatusEXTProc>(
GetGLProcAddress("glCheckFramebufferStatus"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glCheckFramebufferStatusEXTFn =
reinterpret_cast<glCheckFramebufferStatusEXTProc>(
GetGLProcAddress("glCheckFramebufferStatusEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glClearBufferfiFn = reinterpret_cast<glClearBufferfiProc>(
GetGLProcAddress("glClearBufferfi"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glClearBufferfvFn = reinterpret_cast<glClearBufferfvProc>(
GetGLProcAddress("glClearBufferfv"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glClearBufferivFn = reinterpret_cast<glClearBufferivProc>(
GetGLProcAddress("glClearBufferiv"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glClearBufferuivFn = reinterpret_cast<glClearBufferuivProc>(
GetGLProcAddress("glClearBufferuiv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->is_es) {
fn.glClearDepthfFn =
reinterpret_cast<glClearDepthfProc>(GetGLProcAddress("glClearDepthf"));
}
if (ver->IsAtLeastGL(4u, 4u) || ext.b_GL_ARB_clear_texture) {
fn.glClearTexImageFn = reinterpret_cast<glClearTexImageProc>(
GetGLProcAddress("glClearTexImage"));
} else if (ext.b_GL_EXT_clear_texture) {
fn.glClearTexImageFn = reinterpret_cast<glClearTexImageProc>(
GetGLProcAddress("glClearTexImageEXT"));
}
if (ver->IsAtLeastGL(4u, 4u) || ext.b_GL_EXT_clear_texture) {
fn.glClearTexSubImageFn = reinterpret_cast<glClearTexSubImageProc>(
GetGLProcAddress("glClearTexSubImage"));
} else if (ext.b_GL_EXT_clear_texture) {
fn.glClearTexSubImageFn = reinterpret_cast<glClearTexSubImageProc>(
GetGLProcAddress("glClearTexSubImageEXT"));
}
if (ver->IsAtLeastGL(3u, 2u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sync) {
fn.glClientWaitSyncFn = reinterpret_cast<glClientWaitSyncProc>(
GetGLProcAddress("glClientWaitSync"));
}
if (ext.b_GL_APPLE_sync) {
fn.glClientWaitSyncAPPLEFn = reinterpret_cast<glClientWaitSyncAPPLEProc>(
GetGLProcAddress("glClientWaitSyncAPPLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glCompressedTexImage2DRobustANGLEFn =
reinterpret_cast<glCompressedTexImage2DRobustANGLEProc>(
GetGLProcAddress("glCompressedTexImage2DRobustANGLE"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glCompressedTexImage3DFn = reinterpret_cast<glCompressedTexImage3DProc>(
GetGLProcAddress("glCompressedTexImage3D"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glCompressedTexImage3DRobustANGLEFn =
reinterpret_cast<glCompressedTexImage3DRobustANGLEProc>(
GetGLProcAddress("glCompressedTexImage3DRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glCompressedTexSubImage2DRobustANGLEFn =
reinterpret_cast<glCompressedTexSubImage2DRobustANGLEProc>(
GetGLProcAddress("glCompressedTexSubImage2DRobustANGLE"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glCompressedTexSubImage3DFn =
reinterpret_cast<glCompressedTexSubImage3DProc>(
GetGLProcAddress("glCompressedTexSubImage3D"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glCompressedTexSubImage3DRobustANGLEFn =
reinterpret_cast<glCompressedTexSubImage3DRobustANGLEProc>(
GetGLProcAddress("glCompressedTexSubImage3DRobustANGLE"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(3u, 1u)) {
fn.glCopyBufferSubDataFn = reinterpret_cast<glCopyBufferSubDataProc>(
GetGLProcAddress("glCopyBufferSubData"));
}
if (ext.b_GL_CHROMIUM_copy_texture) {
fn.glCopySubTextureCHROMIUMFn =
reinterpret_cast<glCopySubTextureCHROMIUMProc>(
GetGLProcAddress("glCopySubTextureCHROMIUM"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glCopyTexSubImage3DFn = reinterpret_cast<glCopyTexSubImage3DProc>(
GetGLProcAddress("glCopyTexSubImage3D"));
}
if (ext.b_GL_CHROMIUM_copy_texture) {
fn.glCopyTextureCHROMIUMFn = reinterpret_cast<glCopyTextureCHROMIUMProc>(
GetGLProcAddress("glCopyTextureCHROMIUM"));
}
if (ext.b_GL_NV_framebuffer_mixed_samples) {
fn.glCoverageModulationNVFn = reinterpret_cast<glCoverageModulationNVProc>(
GetGLProcAddress("glCoverageModulationNV"));
} else if (ext.b_GL_CHROMIUM_framebuffer_mixed_samples) {
fn.glCoverageModulationNVFn = reinterpret_cast<glCoverageModulationNVProc>(
GetGLProcAddress("glCoverageModulationCHROMIUM"));
}
if (ext.b_GL_NV_path_rendering) {
fn.glCoverFillPathInstancedNVFn =
reinterpret_cast<glCoverFillPathInstancedNVProc>(
GetGLProcAddress("glCoverFillPathInstancedNV"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glCoverFillPathInstancedNVFn =
reinterpret_cast<glCoverFillPathInstancedNVProc>(
GetGLProcAddress("glCoverFillPathInstancedCHROMIUM"));
}
if (ext.b_GL_NV_path_rendering) {
fn.glCoverFillPathNVFn = reinterpret_cast<glCoverFillPathNVProc>(
GetGLProcAddress("glCoverFillPathNV"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glCoverFillPathNVFn = reinterpret_cast<glCoverFillPathNVProc>(
GetGLProcAddress("glCoverFillPathCHROMIUM"));
}
if (ext.b_GL_NV_path_rendering) {
fn.glCoverStrokePathInstancedNVFn =
reinterpret_cast<glCoverStrokePathInstancedNVProc>(
GetGLProcAddress("glCoverStrokePathInstancedNV"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glCoverStrokePathInstancedNVFn =
reinterpret_cast<glCoverStrokePathInstancedNVProc>(
GetGLProcAddress("glCoverStrokePathInstancedCHROMIUM"));
}
if (ext.b_GL_NV_path_rendering) {
fn.glCoverStrokePathNVFn = reinterpret_cast<glCoverStrokePathNVProc>(
GetGLProcAddress("glCoverStrokePathNV"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glCoverStrokePathNVFn = reinterpret_cast<glCoverStrokePathNVProc>(
GetGLProcAddress("glCoverStrokePathCHROMIUM"));
}
if (ext.b_GL_EXT_memory_object) {
fn.glCreateMemoryObjectsEXTFn =
reinterpret_cast<glCreateMemoryObjectsEXTProc>(
GetGLProcAddress("glCreateMemoryObjectsEXT"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glCreateShaderProgramvFn = reinterpret_cast<glCreateShaderProgramvProc>(
GetGLProcAddress("glCreateShaderProgramv"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 2u)) {
fn.glDebugMessageCallbackFn = reinterpret_cast<glDebugMessageCallbackProc>(
GetGLProcAddress("glDebugMessageCallback"));
} else if (ext.b_GL_KHR_debug) {
fn.glDebugMessageCallbackFn = reinterpret_cast<glDebugMessageCallbackProc>(
GetGLProcAddress("glDebugMessageCallbackKHR"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 2u)) {
fn.glDebugMessageControlFn = reinterpret_cast<glDebugMessageControlProc>(
GetGLProcAddress("glDebugMessageControl"));
} else if (ext.b_GL_KHR_debug) {
fn.glDebugMessageControlFn = reinterpret_cast<glDebugMessageControlProc>(
GetGLProcAddress("glDebugMessageControlKHR"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 2u)) {
fn.glDebugMessageInsertFn = reinterpret_cast<glDebugMessageInsertProc>(
GetGLProcAddress("glDebugMessageInsert"));
} else if (ext.b_GL_KHR_debug) {
fn.glDebugMessageInsertFn = reinterpret_cast<glDebugMessageInsertProc>(
GetGLProcAddress("glDebugMessageInsertKHR"));
}
if (ext.b_GL_APPLE_fence) {
fn.glDeleteFencesAPPLEFn = reinterpret_cast<glDeleteFencesAPPLEProc>(
GetGLProcAddress("glDeleteFencesAPPLE"));
}
if (ext.b_GL_NV_fence) {
fn.glDeleteFencesNVFn = reinterpret_cast<glDeleteFencesNVProc>(
GetGLProcAddress("glDeleteFencesNV"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glDeleteFramebuffersEXTFn =
reinterpret_cast<glDeleteFramebuffersEXTProc>(
GetGLProcAddress("glDeleteFramebuffers"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glDeleteFramebuffersEXTFn =
reinterpret_cast<glDeleteFramebuffersEXTProc>(
GetGLProcAddress("glDeleteFramebuffersEXT"));
}
if (ext.b_GL_NV_path_rendering) {
fn.glDeletePathsNVFn = reinterpret_cast<glDeletePathsNVProc>(
GetGLProcAddress("glDeletePathsNV"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glDeletePathsNVFn = reinterpret_cast<glDeletePathsNVProc>(
GetGLProcAddress("glDeletePathsCHROMIUM"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glDeleteProgramPipelinesFn =
reinterpret_cast<glDeleteProgramPipelinesProc>(
GetGLProcAddress("glDeleteProgramPipelines"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glDeleteQueriesFn = reinterpret_cast<glDeleteQueriesProc>(
GetGLProcAddress("glDeleteQueries"));
} else if (ext.b_GL_ARB_occlusion_query) {
fn.glDeleteQueriesFn = reinterpret_cast<glDeleteQueriesProc>(
GetGLProcAddress("glDeleteQueriesARB"));
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
fn.glDeleteQueriesFn = reinterpret_cast<glDeleteQueriesProc>(
GetGLProcAddress("glDeleteQueriesEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glDeleteRenderbuffersEXTFn =
reinterpret_cast<glDeleteRenderbuffersEXTProc>(
GetGLProcAddress("glDeleteRenderbuffers"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glDeleteRenderbuffersEXTFn =
reinterpret_cast<glDeleteRenderbuffersEXTProc>(
GetGLProcAddress("glDeleteRenderbuffersEXT"));
}
if (ver->IsAtLeastGL(3u, 3u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sampler_objects) {
fn.glDeleteSamplersFn = reinterpret_cast<glDeleteSamplersProc>(
GetGLProcAddress("glDeleteSamplers"));
}
if (ext.b_GL_EXT_semaphore) {
fn.glDeleteSemaphoresEXTFn = reinterpret_cast<glDeleteSemaphoresEXTProc>(
GetGLProcAddress("glDeleteSemaphoresEXT"));
}
if (ver->IsAtLeastGL(3u, 2u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sync) {
fn.glDeleteSyncFn =
reinterpret_cast<glDeleteSyncProc>(GetGLProcAddress("glDeleteSync"));
}
if (ext.b_GL_APPLE_sync) {
fn.glDeleteSyncAPPLEFn = reinterpret_cast<glDeleteSyncAPPLEProc>(
GetGLProcAddress("glDeleteSyncAPPLE"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(4u, 0u) ||
ext.b_GL_ARB_transform_feedback2) {
fn.glDeleteTransformFeedbacksFn =
reinterpret_cast<glDeleteTransformFeedbacksProc>(
GetGLProcAddress("glDeleteTransformFeedbacks"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_vertex_array_object) {
fn.glDeleteVertexArraysOESFn =
reinterpret_cast<glDeleteVertexArraysOESProc>(
GetGLProcAddress("glDeleteVertexArrays"));
} else if (ext.b_GL_OES_vertex_array_object) {
fn.glDeleteVertexArraysOESFn =
reinterpret_cast<glDeleteVertexArraysOESProc>(
GetGLProcAddress("glDeleteVertexArraysOES"));
} else if (ext.b_GL_APPLE_vertex_array_object) {
fn.glDeleteVertexArraysOESFn =
reinterpret_cast<glDeleteVertexArraysOESProc>(
GetGLProcAddress("glDeleteVertexArraysAPPLE"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->is_es) {
fn.glDepthRangefFn =
reinterpret_cast<glDepthRangefProc>(GetGLProcAddress("glDepthRangef"));
}
if (ext.b_GL_EXT_discard_framebuffer) {
fn.glDiscardFramebufferEXTFn =
reinterpret_cast<glDiscardFramebufferEXTProc>(
GetGLProcAddress("glDiscardFramebufferEXT"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glDispatchComputeFn = reinterpret_cast<glDispatchComputeProc>(
GetGLProcAddress("glDispatchCompute"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glDispatchComputeIndirectFn =
reinterpret_cast<glDispatchComputeIndirectProc>(
GetGLProcAddress("glDispatchComputeIndirect"));
}
if (ver->IsAtLeastGLES(3u, 1u) || ver->IsAtLeastGL(4u, 0u)) {
fn.glDrawArraysIndirectFn = reinterpret_cast<glDrawArraysIndirectProc>(
GetGLProcAddress("glDrawArraysIndirect"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(3u, 1u)) {
fn.glDrawArraysInstancedANGLEFn =
reinterpret_cast<glDrawArraysInstancedANGLEProc>(
GetGLProcAddress("glDrawArraysInstanced"));
} else if (ext.b_GL_ARB_draw_instanced) {
fn.glDrawArraysInstancedANGLEFn =
reinterpret_cast<glDrawArraysInstancedANGLEProc>(
GetGLProcAddress("glDrawArraysInstancedARB"));
} else if (ext.b_GL_ANGLE_instanced_arrays) {
fn.glDrawArraysInstancedANGLEFn =
reinterpret_cast<glDrawArraysInstancedANGLEProc>(
GetGLProcAddress("glDrawArraysInstancedANGLE"));
}
if (!ver->is_es) {
fn.glDrawBufferFn =
reinterpret_cast<glDrawBufferProc>(GetGLProcAddress("glDrawBuffer"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glDrawBuffersARBFn = reinterpret_cast<glDrawBuffersARBProc>(
GetGLProcAddress("glDrawBuffers"));
} else if (ext.b_GL_ARB_draw_buffers) {
fn.glDrawBuffersARBFn = reinterpret_cast<glDrawBuffersARBProc>(
GetGLProcAddress("glDrawBuffersARB"));
} else if (ext.b_GL_EXT_draw_buffers) {
fn.glDrawBuffersARBFn = reinterpret_cast<glDrawBuffersARBProc>(
GetGLProcAddress("glDrawBuffersEXT"));
}
if (ver->IsAtLeastGLES(3u, 1u) || ver->IsAtLeastGL(4u, 0u)) {
fn.glDrawElementsIndirectFn = reinterpret_cast<glDrawElementsIndirectProc>(
GetGLProcAddress("glDrawElementsIndirect"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(3u, 1u)) {
fn.glDrawElementsInstancedANGLEFn =
reinterpret_cast<glDrawElementsInstancedANGLEProc>(
GetGLProcAddress("glDrawElementsInstanced"));
} else if (ext.b_GL_ARB_draw_instanced) {
fn.glDrawElementsInstancedANGLEFn =
reinterpret_cast<glDrawElementsInstancedANGLEProc>(
GetGLProcAddress("glDrawElementsInstancedARB"));
} else if (ext.b_GL_ANGLE_instanced_arrays) {
fn.glDrawElementsInstancedANGLEFn =
reinterpret_cast<glDrawElementsInstancedANGLEProc>(
GetGLProcAddress("glDrawElementsInstancedANGLE"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glDrawRangeElementsFn = reinterpret_cast<glDrawRangeElementsProc>(
GetGLProcAddress("glDrawRangeElements"));
}
if (ext.b_GL_OES_EGL_image) {
fn.glEGLImageTargetRenderbufferStorageOESFn =
reinterpret_cast<glEGLImageTargetRenderbufferStorageOESProc>(
GetGLProcAddress("glEGLImageTargetRenderbufferStorageOES"));
}
if (ext.b_GL_OES_EGL_image) {
fn.glEGLImageTargetTexture2DOESFn =
reinterpret_cast<glEGLImageTargetTexture2DOESProc>(
GetGLProcAddress("glEGLImageTargetTexture2DOES"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glEndQueryFn =
reinterpret_cast<glEndQueryProc>(GetGLProcAddress("glEndQuery"));
} else if (ext.b_GL_ARB_occlusion_query) {
fn.glEndQueryFn =
reinterpret_cast<glEndQueryProc>(GetGLProcAddress("glEndQueryARB"));
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
fn.glEndQueryFn =
reinterpret_cast<glEndQueryProc>(GetGLProcAddress("glEndQueryEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glEndTransformFeedbackFn = reinterpret_cast<glEndTransformFeedbackProc>(
GetGLProcAddress("glEndTransformFeedback"));
} else if (ext.b_GL_EXT_transform_feedback) {
fn.glEndTransformFeedbackFn = reinterpret_cast<glEndTransformFeedbackProc>(
GetGLProcAddress("glEndTransformFeedbackEXT"));
}
if (ver->IsAtLeastGL(3u, 2u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sync) {
fn.glFenceSyncFn =
reinterpret_cast<glFenceSyncProc>(GetGLProcAddress("glFenceSync"));
}
if (ext.b_GL_APPLE_sync) {
fn.glFenceSyncAPPLEFn = reinterpret_cast<glFenceSyncAPPLEProc>(
GetGLProcAddress("glFenceSyncAPPLE"));
}
if (ext.b_GL_APPLE_fence) {
fn.glFinishFenceAPPLEFn = reinterpret_cast<glFinishFenceAPPLEProc>(
GetGLProcAddress("glFinishFenceAPPLE"));
}
if (ext.b_GL_NV_fence) {
fn.glFinishFenceNVFn = reinterpret_cast<glFinishFenceNVProc>(
GetGLProcAddress("glFinishFenceNV"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_map_buffer_range) {
fn.glFlushMappedBufferRangeFn =
reinterpret_cast<glFlushMappedBufferRangeProc>(
GetGLProcAddress("glFlushMappedBufferRange"));
} else if (ext.b_GL_EXT_map_buffer_range) {
fn.glFlushMappedBufferRangeFn =
reinterpret_cast<glFlushMappedBufferRangeProc>(
GetGLProcAddress("glFlushMappedBufferRangeEXT"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glFramebufferParameteriFn =
reinterpret_cast<glFramebufferParameteriProc>(
GetGLProcAddress("glFramebufferParameteri"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glFramebufferRenderbufferEXTFn =
reinterpret_cast<glFramebufferRenderbufferEXTProc>(
GetGLProcAddress("glFramebufferRenderbuffer"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glFramebufferRenderbufferEXTFn =
reinterpret_cast<glFramebufferRenderbufferEXTProc>(
GetGLProcAddress("glFramebufferRenderbufferEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glFramebufferTexture2DEXTFn =
reinterpret_cast<glFramebufferTexture2DEXTProc>(
GetGLProcAddress("glFramebufferTexture2D"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glFramebufferTexture2DEXTFn =
reinterpret_cast<glFramebufferTexture2DEXTProc>(
GetGLProcAddress("glFramebufferTexture2DEXT"));
}
if (ext.b_GL_EXT_multisampled_render_to_texture) {
fn.glFramebufferTexture2DMultisampleEXTFn =
reinterpret_cast<glFramebufferTexture2DMultisampleEXTProc>(
GetGLProcAddress("glFramebufferTexture2DMultisampleEXT"));
} else if (ext.b_GL_IMG_multisampled_render_to_texture) {
fn.glFramebufferTexture2DMultisampleEXTFn =
reinterpret_cast<glFramebufferTexture2DMultisampleEXTProc>(
GetGLProcAddress("glFramebufferTexture2DMultisampleIMG"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glFramebufferTextureLayerFn =
reinterpret_cast<glFramebufferTextureLayerProc>(
GetGLProcAddress("glFramebufferTextureLayer"));
}
if (ext.b_GL_OVR_multiview2 || ext.b_GL_OVR_multiview) {
fn.glFramebufferTextureMultiviewOVRFn =
reinterpret_cast<glFramebufferTextureMultiviewOVRProc>(
GetGLProcAddress("glFramebufferTextureMultiviewOVR"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glGenerateMipmapEXTFn = reinterpret_cast<glGenerateMipmapEXTProc>(
GetGLProcAddress("glGenerateMipmap"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glGenerateMipmapEXTFn = reinterpret_cast<glGenerateMipmapEXTProc>(
GetGLProcAddress("glGenerateMipmapEXT"));
}
if (ext.b_GL_APPLE_fence) {
fn.glGenFencesAPPLEFn = reinterpret_cast<glGenFencesAPPLEProc>(
GetGLProcAddress("glGenFencesAPPLE"));
}
if (ext.b_GL_NV_fence) {
fn.glGenFencesNVFn =
reinterpret_cast<glGenFencesNVProc>(GetGLProcAddress("glGenFencesNV"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glGenFramebuffersEXTFn = reinterpret_cast<glGenFramebuffersEXTProc>(
GetGLProcAddress("glGenFramebuffers"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glGenFramebuffersEXTFn = reinterpret_cast<glGenFramebuffersEXTProc>(
GetGLProcAddress("glGenFramebuffersEXT"));
}
if (ext.b_GL_NV_path_rendering) {
fn.glGenPathsNVFn =
reinterpret_cast<glGenPathsNVProc>(GetGLProcAddress("glGenPathsNV"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glGenPathsNVFn = reinterpret_cast<glGenPathsNVProc>(
GetGLProcAddress("glGenPathsCHROMIUM"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glGenProgramPipelinesFn = reinterpret_cast<glGenProgramPipelinesProc>(
GetGLProcAddress("glGenProgramPipelines"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glGenQueriesFn =
reinterpret_cast<glGenQueriesProc>(GetGLProcAddress("glGenQueries"));
} else if (ext.b_GL_ARB_occlusion_query) {
fn.glGenQueriesFn =
reinterpret_cast<glGenQueriesProc>(GetGLProcAddress("glGenQueriesARB"));
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
fn.glGenQueriesFn =
reinterpret_cast<glGenQueriesProc>(GetGLProcAddress("glGenQueriesEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glGenRenderbuffersEXTFn = reinterpret_cast<glGenRenderbuffersEXTProc>(
GetGLProcAddress("glGenRenderbuffers"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glGenRenderbuffersEXTFn = reinterpret_cast<glGenRenderbuffersEXTProc>(
GetGLProcAddress("glGenRenderbuffersEXT"));
}
if (ver->IsAtLeastGL(3u, 3u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sampler_objects) {
fn.glGenSamplersFn =
reinterpret_cast<glGenSamplersProc>(GetGLProcAddress("glGenSamplers"));
}
if (ext.b_GL_EXT_semaphore) {
fn.glGenSemaphoresEXTFn = reinterpret_cast<glGenSemaphoresEXTProc>(
GetGLProcAddress("glGenSemaphoresEXT"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(4u, 0u) ||
ext.b_GL_ARB_transform_feedback2) {
fn.glGenTransformFeedbacksFn =
reinterpret_cast<glGenTransformFeedbacksProc>(
GetGLProcAddress("glGenTransformFeedbacks"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_vertex_array_object) {
fn.glGenVertexArraysOESFn = reinterpret_cast<glGenVertexArraysOESProc>(
GetGLProcAddress("glGenVertexArrays"));
} else if (ext.b_GL_OES_vertex_array_object) {
fn.glGenVertexArraysOESFn = reinterpret_cast<glGenVertexArraysOESProc>(
GetGLProcAddress("glGenVertexArraysOES"));
} else if (ext.b_GL_APPLE_vertex_array_object) {
fn.glGenVertexArraysOESFn = reinterpret_cast<glGenVertexArraysOESProc>(
GetGLProcAddress("glGenVertexArraysAPPLE"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(3u, 1u)) {
fn.glGetActiveUniformBlockivFn =
reinterpret_cast<glGetActiveUniformBlockivProc>(
GetGLProcAddress("glGetActiveUniformBlockiv"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetActiveUniformBlockivRobustANGLEFn =
reinterpret_cast<glGetActiveUniformBlockivRobustANGLEProc>(
GetGLProcAddress("glGetActiveUniformBlockivRobustANGLE"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(3u, 1u)) {
fn.glGetActiveUniformBlockNameFn =
reinterpret_cast<glGetActiveUniformBlockNameProc>(
GetGLProcAddress("glGetActiveUniformBlockName"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(3u, 1u)) {
fn.glGetActiveUniformsivFn = reinterpret_cast<glGetActiveUniformsivProc>(
GetGLProcAddress("glGetActiveUniformsiv"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glGetBooleani_vFn = reinterpret_cast<glGetBooleani_vProc>(
GetGLProcAddress("glGetBooleani_v"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetBooleani_vRobustANGLEFn =
reinterpret_cast<glGetBooleani_vRobustANGLEProc>(
GetGLProcAddress("glGetBooleani_vRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetBooleanvRobustANGLEFn =
reinterpret_cast<glGetBooleanvRobustANGLEProc>(
GetGLProcAddress("glGetBooleanvRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetBufferParameteri64vRobustANGLEFn =
reinterpret_cast<glGetBufferParameteri64vRobustANGLEProc>(
GetGLProcAddress("glGetBufferParameteri64vRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetBufferParameterivRobustANGLEFn =
reinterpret_cast<glGetBufferParameterivRobustANGLEProc>(
GetGLProcAddress("glGetBufferParameterivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetBufferPointervRobustANGLEFn =
reinterpret_cast<glGetBufferPointervRobustANGLEProc>(
GetGLProcAddress("glGetBufferPointervRobustANGLE"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 2u)) {
fn.glGetDebugMessageLogFn = reinterpret_cast<glGetDebugMessageLogProc>(
GetGLProcAddress("glGetDebugMessageLog"));
} else if (ext.b_GL_KHR_debug) {
fn.glGetDebugMessageLogFn = reinterpret_cast<glGetDebugMessageLogProc>(
GetGLProcAddress("glGetDebugMessageLogKHR"));
}
if (ext.b_GL_NV_fence) {
fn.glGetFenceivNVFn = reinterpret_cast<glGetFenceivNVProc>(
GetGLProcAddress("glGetFenceivNV"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetFloatvRobustANGLEFn = reinterpret_cast<glGetFloatvRobustANGLEProc>(
GetGLProcAddress("glGetFloatvRobustANGLE"));
}
if (ver->IsAtLeastGL(3u, 3u) || ext.b_GL_ARB_blend_func_extended) {
fn.glGetFragDataIndexFn = reinterpret_cast<glGetFragDataIndexProc>(
GetGLProcAddress("glGetFragDataIndex"));
} else if (ext.b_GL_EXT_blend_func_extended) {
fn.glGetFragDataIndexFn = reinterpret_cast<glGetFragDataIndexProc>(
GetGLProcAddress("glGetFragDataIndexEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glGetFragDataLocationFn = reinterpret_cast<glGetFragDataLocationProc>(
GetGLProcAddress("glGetFragDataLocation"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glGetFramebufferAttachmentParameterivEXTFn =
reinterpret_cast<glGetFramebufferAttachmentParameterivEXTProc>(
GetGLProcAddress("glGetFramebufferAttachmentParameteriv"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glGetFramebufferAttachmentParameterivEXTFn =
reinterpret_cast<glGetFramebufferAttachmentParameterivEXTProc>(
GetGLProcAddress("glGetFramebufferAttachmentParameterivEXT"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetFramebufferAttachmentParameterivRobustANGLEFn =
reinterpret_cast<glGetFramebufferAttachmentParameterivRobustANGLEProc>(
GetGLProcAddress(
"glGetFramebufferAttachmentParameterivRobustANGLE"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glGetFramebufferParameterivFn =
reinterpret_cast<glGetFramebufferParameterivProc>(
GetGLProcAddress("glGetFramebufferParameteriv"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetFramebufferParameterivRobustANGLEFn =
reinterpret_cast<glGetFramebufferParameterivRobustANGLEProc>(
GetGLProcAddress("glGetFramebufferParameterivRobustANGLE"));
}
if (ver->IsAtLeastGL(4u, 5u) || ver->IsAtLeastGLES(3u, 2u)) {
fn.glGetGraphicsResetStatusARBFn =
reinterpret_cast<glGetGraphicsResetStatusARBProc>(
GetGLProcAddress("glGetGraphicsResetStatus"));
} else if (ext.b_GL_ARB_robustness) {
fn.glGetGraphicsResetStatusARBFn =
reinterpret_cast<glGetGraphicsResetStatusARBProc>(
GetGLProcAddress("glGetGraphicsResetStatusARB"));
} else if (ext.b_GL_KHR_robustness) {
fn.glGetGraphicsResetStatusARBFn =
reinterpret_cast<glGetGraphicsResetStatusARBProc>(
GetGLProcAddress("glGetGraphicsResetStatusKHR"));
} else if (ext.b_GL_EXT_robustness) {
fn.glGetGraphicsResetStatusARBFn =
reinterpret_cast<glGetGraphicsResetStatusARBProc>(
GetGLProcAddress("glGetGraphicsResetStatusEXT"));
}
if (ver->IsAtLeastGL(3u, 2u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glGetInteger64i_vFn = reinterpret_cast<glGetInteger64i_vProc>(
GetGLProcAddress("glGetInteger64i_v"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetInteger64i_vRobustANGLEFn =
reinterpret_cast<glGetInteger64i_vRobustANGLEProc>(
GetGLProcAddress("glGetInteger64i_vRobustANGLE"));
}
if (ver->IsAtLeastGL(3u, 2u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glGetInteger64vFn = reinterpret_cast<glGetInteger64vProc>(
GetGLProcAddress("glGetInteger64v"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetInteger64vRobustANGLEFn =
reinterpret_cast<glGetInteger64vRobustANGLEProc>(
GetGLProcAddress("glGetInteger64vRobustANGLE"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glGetIntegeri_vFn = reinterpret_cast<glGetIntegeri_vProc>(
GetGLProcAddress("glGetIntegeri_v"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetIntegeri_vRobustANGLEFn =
reinterpret_cast<glGetIntegeri_vRobustANGLEProc>(
GetGLProcAddress("glGetIntegeri_vRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetIntegervRobustANGLEFn =
reinterpret_cast<glGetIntegervRobustANGLEProc>(
GetGLProcAddress("glGetIntegervRobustANGLE"));
}
if (ver->IsAtLeastGL(4u, 2u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_internalformat_query) {
fn.glGetInternalformativFn = reinterpret_cast<glGetInternalformativProc>(
GetGLProcAddress("glGetInternalformativ"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetInternalformativRobustANGLEFn =
reinterpret_cast<glGetInternalformativRobustANGLEProc>(
GetGLProcAddress("glGetInternalformativRobustANGLE"));
}
if (ext.b_GL_NV_internalformat_sample_query) {
fn.glGetInternalformatSampleivNVFn =
reinterpret_cast<glGetInternalformatSampleivNVProc>(
GetGLProcAddress("glGetInternalformatSampleivNV"));
}
if (ver->IsAtLeastGL(3u, 2u) || ver->IsAtLeastGLES(3u, 1u) ||
ext.b_GL_ARB_texture_multisample) {
fn.glGetMultisamplefvFn = reinterpret_cast<glGetMultisamplefvProc>(
GetGLProcAddress("glGetMultisamplefv"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetMultisamplefvRobustANGLEFn =
reinterpret_cast<glGetMultisamplefvRobustANGLEProc>(
GetGLProcAddress("glGetMultisamplefvRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetnUniformfvRobustANGLEFn =
reinterpret_cast<glGetnUniformfvRobustANGLEProc>(
GetGLProcAddress("glGetnUniformfvRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetnUniformivRobustANGLEFn =
reinterpret_cast<glGetnUniformivRobustANGLEProc>(
GetGLProcAddress("glGetnUniformivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetnUniformuivRobustANGLEFn =
reinterpret_cast<glGetnUniformuivRobustANGLEProc>(
GetGLProcAddress("glGetnUniformuivRobustANGLE"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 2u)) {
fn.glGetObjectLabelFn = reinterpret_cast<glGetObjectLabelProc>(
GetGLProcAddress("glGetObjectLabel"));
} else if (ext.b_GL_KHR_debug) {
fn.glGetObjectLabelFn = reinterpret_cast<glGetObjectLabelProc>(
GetGLProcAddress("glGetObjectLabelKHR"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 2u)) {
fn.glGetObjectPtrLabelFn = reinterpret_cast<glGetObjectPtrLabelProc>(
GetGLProcAddress("glGetObjectPtrLabel"));
} else if (ext.b_GL_KHR_debug) {
fn.glGetObjectPtrLabelFn = reinterpret_cast<glGetObjectPtrLabelProc>(
GetGLProcAddress("glGetObjectPtrLabelKHR"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 2u)) {
fn.glGetPointervFn =
reinterpret_cast<glGetPointervProc>(GetGLProcAddress("glGetPointerv"));
} else if (ext.b_GL_KHR_debug) {
fn.glGetPointervFn = reinterpret_cast<glGetPointervProc>(
GetGLProcAddress("glGetPointervKHR"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetPointervRobustANGLERobustANGLEFn =
reinterpret_cast<glGetPointervRobustANGLERobustANGLEProc>(
GetGLProcAddress("glGetPointervRobustANGLERobustANGLE"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_get_program_binary) {
fn.glGetProgramBinaryFn = reinterpret_cast<glGetProgramBinaryProc>(
GetGLProcAddress("glGetProgramBinary"));
} else if (ext.b_GL_OES_get_program_binary) {
fn.glGetProgramBinaryFn = reinterpret_cast<glGetProgramBinaryProc>(
GetGLProcAddress("glGetProgramBinaryOES"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 1u) ||
ext.b_GL_ARB_program_interface_query) {
fn.glGetProgramInterfaceivFn =
reinterpret_cast<glGetProgramInterfaceivProc>(
GetGLProcAddress("glGetProgramInterfaceiv"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetProgramInterfaceivRobustANGLEFn =
reinterpret_cast<glGetProgramInterfaceivRobustANGLEProc>(
GetGLProcAddress("glGetProgramInterfaceivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetProgramivRobustANGLEFn =
reinterpret_cast<glGetProgramivRobustANGLEProc>(
GetGLProcAddress("glGetProgramivRobustANGLE"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glGetProgramPipelineInfoLogFn =
reinterpret_cast<glGetProgramPipelineInfoLogProc>(
GetGLProcAddress("glGetProgramPipelineInfoLog"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glGetProgramPipelineivFn = reinterpret_cast<glGetProgramPipelineivProc>(
GetGLProcAddress("glGetProgramPipelineiv"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 1u) ||
ext.b_GL_ARB_program_interface_query) {
fn.glGetProgramResourceIndexFn =
reinterpret_cast<glGetProgramResourceIndexProc>(
GetGLProcAddress("glGetProgramResourceIndex"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 1u) ||
ext.b_GL_ARB_program_interface_query) {
fn.glGetProgramResourceivFn = reinterpret_cast<glGetProgramResourceivProc>(
GetGLProcAddress("glGetProgramResourceiv"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 1u) ||
ext.b_GL_ARB_program_interface_query) {
fn.glGetProgramResourceLocationFn =
reinterpret_cast<glGetProgramResourceLocationProc>(
GetGLProcAddress("glGetProgramResourceLocation"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 1u) ||
ext.b_GL_ARB_program_interface_query) {
fn.glGetProgramResourceNameFn =
reinterpret_cast<glGetProgramResourceNameProc>(
GetGLProcAddress("glGetProgramResourceName"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glGetQueryivFn =
reinterpret_cast<glGetQueryivProc>(GetGLProcAddress("glGetQueryiv"));
} else if (ext.b_GL_ARB_occlusion_query) {
fn.glGetQueryivFn =
reinterpret_cast<glGetQueryivProc>(GetGLProcAddress("glGetQueryivARB"));
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
fn.glGetQueryivFn =
reinterpret_cast<glGetQueryivProc>(GetGLProcAddress("glGetQueryivEXT"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetQueryivRobustANGLEFn =
reinterpret_cast<glGetQueryivRobustANGLEProc>(
GetGLProcAddress("glGetQueryivRobustANGLE"));
}
if (ver->IsAtLeastGL(3u, 3u) || ext.b_GL_ARB_timer_query) {
fn.glGetQueryObjecti64vFn = reinterpret_cast<glGetQueryObjecti64vProc>(
GetGLProcAddress("glGetQueryObjecti64v"));
} else if (ext.b_GL_EXT_timer_query || ext.b_GL_EXT_disjoint_timer_query) {
fn.glGetQueryObjecti64vFn = reinterpret_cast<glGetQueryObjecti64vProc>(
GetGLProcAddress("glGetQueryObjecti64vEXT"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetQueryObjecti64vRobustANGLEFn =
reinterpret_cast<glGetQueryObjecti64vRobustANGLEProc>(
GetGLProcAddress("glGetQueryObjecti64vRobustANGLE"));
}
if (!ver->is_es) {
fn.glGetQueryObjectivFn = reinterpret_cast<glGetQueryObjectivProc>(
GetGLProcAddress("glGetQueryObjectiv"));
} else if (ext.b_GL_ARB_occlusion_query) {
fn.glGetQueryObjectivFn = reinterpret_cast<glGetQueryObjectivProc>(
GetGLProcAddress("glGetQueryObjectivARB"));
} else if (ext.b_GL_EXT_disjoint_timer_query) {
fn.glGetQueryObjectivFn = reinterpret_cast<glGetQueryObjectivProc>(
GetGLProcAddress("glGetQueryObjectivEXT"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetQueryObjectivRobustANGLEFn =
reinterpret_cast<glGetQueryObjectivRobustANGLEProc>(
GetGLProcAddress("glGetQueryObjectivRobustANGLE"));
}
if (ver->IsAtLeastGL(3u, 3u) || ext.b_GL_ARB_timer_query) {
fn.glGetQueryObjectui64vFn = reinterpret_cast<glGetQueryObjectui64vProc>(
GetGLProcAddress("glGetQueryObjectui64v"));
} else if (ext.b_GL_EXT_timer_query || ext.b_GL_EXT_disjoint_timer_query) {
fn.glGetQueryObjectui64vFn = reinterpret_cast<glGetQueryObjectui64vProc>(
GetGLProcAddress("glGetQueryObjectui64vEXT"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetQueryObjectui64vRobustANGLEFn =
reinterpret_cast<glGetQueryObjectui64vRobustANGLEProc>(
GetGLProcAddress("glGetQueryObjectui64vRobustANGLE"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glGetQueryObjectuivFn = reinterpret_cast<glGetQueryObjectuivProc>(
GetGLProcAddress("glGetQueryObjectuiv"));
} else if (ext.b_GL_ARB_occlusion_query) {
fn.glGetQueryObjectuivFn = reinterpret_cast<glGetQueryObjectuivProc>(
GetGLProcAddress("glGetQueryObjectuivARB"));
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
fn.glGetQueryObjectuivFn = reinterpret_cast<glGetQueryObjectuivProc>(
GetGLProcAddress("glGetQueryObjectuivEXT"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetQueryObjectuivRobustANGLEFn =
reinterpret_cast<glGetQueryObjectuivRobustANGLEProc>(
GetGLProcAddress("glGetQueryObjectuivRobustANGLE"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glGetRenderbufferParameterivEXTFn =
reinterpret_cast<glGetRenderbufferParameterivEXTProc>(
GetGLProcAddress("glGetRenderbufferParameteriv"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glGetRenderbufferParameterivEXTFn =
reinterpret_cast<glGetRenderbufferParameterivEXTProc>(
GetGLProcAddress("glGetRenderbufferParameterivEXT"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetRenderbufferParameterivRobustANGLEFn =
reinterpret_cast<glGetRenderbufferParameterivRobustANGLEProc>(
GetGLProcAddress("glGetRenderbufferParameterivRobustANGLE"));
}
if (ver->IsAtLeastGL(3u, 3u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sampler_objects) {
fn.glGetSamplerParameterfvFn =
reinterpret_cast<glGetSamplerParameterfvProc>(
GetGLProcAddress("glGetSamplerParameterfv"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetSamplerParameterfvRobustANGLEFn =
reinterpret_cast<glGetSamplerParameterfvRobustANGLEProc>(
GetGLProcAddress("glGetSamplerParameterfvRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetSamplerParameterIivRobustANGLEFn =
reinterpret_cast<glGetSamplerParameterIivRobustANGLEProc>(
GetGLProcAddress("glGetSamplerParameterIivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetSamplerParameterIuivRobustANGLEFn =
reinterpret_cast<glGetSamplerParameterIuivRobustANGLEProc>(
GetGLProcAddress("glGetSamplerParameterIuivRobustANGLE"));
}
if (ver->IsAtLeastGL(3u, 3u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sampler_objects) {
fn.glGetSamplerParameterivFn =
reinterpret_cast<glGetSamplerParameterivProc>(
GetGLProcAddress("glGetSamplerParameteriv"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetSamplerParameterivRobustANGLEFn =
reinterpret_cast<glGetSamplerParameterivRobustANGLEProc>(
GetGLProcAddress("glGetSamplerParameterivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetShaderivRobustANGLEFn =
reinterpret_cast<glGetShaderivRobustANGLEProc>(
GetGLProcAddress("glGetShaderivRobustANGLE"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->is_es ||
ext.b_GL_ARB_ES2_compatibility) {
fn.glGetShaderPrecisionFormatFn =
reinterpret_cast<glGetShaderPrecisionFormatProc>(
GetGLProcAddress("glGetShaderPrecisionFormat"));
}
if (ver->IsAtLeastGL(3u, 2u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sync) {
fn.glGetSyncivFn =
reinterpret_cast<glGetSyncivProc>(GetGLProcAddress("glGetSynciv"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 1u)) {
fn.glGetTexLevelParameterfvFn =
reinterpret_cast<glGetTexLevelParameterfvProc>(
GetGLProcAddress("glGetTexLevelParameterfv"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetTexLevelParameterfvRobustANGLEFn =
reinterpret_cast<glGetTexLevelParameterfvRobustANGLEProc>(
GetGLProcAddress("glGetTexLevelParameterfvRobustANGLE"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 1u)) {
fn.glGetTexLevelParameterivFn =
reinterpret_cast<glGetTexLevelParameterivProc>(
GetGLProcAddress("glGetTexLevelParameteriv"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetTexLevelParameterivRobustANGLEFn =
reinterpret_cast<glGetTexLevelParameterivRobustANGLEProc>(
GetGLProcAddress("glGetTexLevelParameterivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetTexParameterfvRobustANGLEFn =
reinterpret_cast<glGetTexParameterfvRobustANGLEProc>(
GetGLProcAddress("glGetTexParameterfvRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetTexParameterIivRobustANGLEFn =
reinterpret_cast<glGetTexParameterIivRobustANGLEProc>(
GetGLProcAddress("glGetTexParameterIivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetTexParameterIuivRobustANGLEFn =
reinterpret_cast<glGetTexParameterIuivRobustANGLEProc>(
GetGLProcAddress("glGetTexParameterIuivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetTexParameterivRobustANGLEFn =
reinterpret_cast<glGetTexParameterivRobustANGLEProc>(
GetGLProcAddress("glGetTexParameterivRobustANGLE"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glGetTransformFeedbackVaryingFn =
reinterpret_cast<glGetTransformFeedbackVaryingProc>(
GetGLProcAddress("glGetTransformFeedbackVarying"));
} else if (ext.b_GL_EXT_transform_feedback) {
fn.glGetTransformFeedbackVaryingFn =
reinterpret_cast<glGetTransformFeedbackVaryingProc>(
GetGLProcAddress("glGetTransformFeedbackVaryingEXT"));
}
if (ext.b_GL_ANGLE_translated_shader_source) {
fn.glGetTranslatedShaderSourceANGLEFn =
reinterpret_cast<glGetTranslatedShaderSourceANGLEProc>(
GetGLProcAddress("glGetTranslatedShaderSourceANGLE"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(3u, 1u)) {
fn.glGetUniformBlockIndexFn = reinterpret_cast<glGetUniformBlockIndexProc>(
GetGLProcAddress("glGetUniformBlockIndex"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetUniformfvRobustANGLEFn =
reinterpret_cast<glGetUniformfvRobustANGLEProc>(
GetGLProcAddress("glGetUniformfvRobustANGLE"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(3u, 1u)) {
fn.glGetUniformIndicesFn = reinterpret_cast<glGetUniformIndicesProc>(
GetGLProcAddress("glGetUniformIndices"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetUniformivRobustANGLEFn =
reinterpret_cast<glGetUniformivRobustANGLEProc>(
GetGLProcAddress("glGetUniformivRobustANGLE"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glGetUniformuivFn = reinterpret_cast<glGetUniformuivProc>(
GetGLProcAddress("glGetUniformuiv"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetUniformuivRobustANGLEFn =
reinterpret_cast<glGetUniformuivRobustANGLEProc>(
GetGLProcAddress("glGetUniformuivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetVertexAttribfvRobustANGLEFn =
reinterpret_cast<glGetVertexAttribfvRobustANGLEProc>(
GetGLProcAddress("glGetVertexAttribfvRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetVertexAttribIivRobustANGLEFn =
reinterpret_cast<glGetVertexAttribIivRobustANGLEProc>(
GetGLProcAddress("glGetVertexAttribIivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetVertexAttribIuivRobustANGLEFn =
reinterpret_cast<glGetVertexAttribIuivRobustANGLEProc>(
GetGLProcAddress("glGetVertexAttribIuivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetVertexAttribivRobustANGLEFn =
reinterpret_cast<glGetVertexAttribivRobustANGLEProc>(
GetGLProcAddress("glGetVertexAttribivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glGetVertexAttribPointervRobustANGLEFn =
reinterpret_cast<glGetVertexAttribPointervRobustANGLEProc>(
GetGLProcAddress("glGetVertexAttribPointervRobustANGLE"));
}
if (ext.b_GL_EXT_memory_object_fd) {
fn.glImportMemoryFdEXTFn = reinterpret_cast<glImportMemoryFdEXTProc>(
GetGLProcAddress("glImportMemoryFdEXT"));
}
if (ext.b_GL_EXT_semaphore_fd) {
fn.glImportSemaphoreFdEXTFn = reinterpret_cast<glImportSemaphoreFdEXTProc>(
GetGLProcAddress("glImportSemaphoreFdEXT"));
}
if (ext.b_GL_EXT_debug_marker) {
fn.glInsertEventMarkerEXTFn = reinterpret_cast<glInsertEventMarkerEXTProc>(
GetGLProcAddress("glInsertEventMarkerEXT"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glInvalidateFramebufferFn =
reinterpret_cast<glInvalidateFramebufferProc>(
GetGLProcAddress("glInvalidateFramebuffer"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 0u)) {
fn.glInvalidateSubFramebufferFn =
reinterpret_cast<glInvalidateSubFramebufferProc>(
GetGLProcAddress("glInvalidateSubFramebuffer"));
}
if (ext.b_GL_ANGLE_texture_external_update) {
fn.glInvalidateTextureANGLEFn =
reinterpret_cast<glInvalidateTextureANGLEProc>(
GetGLProcAddress("glInvalidateTextureANGLE"));
}
if (ext.b_GL_APPLE_fence) {
fn.glIsFenceAPPLEFn = reinterpret_cast<glIsFenceAPPLEProc>(
GetGLProcAddress("glIsFenceAPPLE"));
}
if (ext.b_GL_NV_fence) {
fn.glIsFenceNVFn =
reinterpret_cast<glIsFenceNVProc>(GetGLProcAddress("glIsFenceNV"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glIsFramebufferEXTFn = reinterpret_cast<glIsFramebufferEXTProc>(
GetGLProcAddress("glIsFramebuffer"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glIsFramebufferEXTFn = reinterpret_cast<glIsFramebufferEXTProc>(
GetGLProcAddress("glIsFramebufferEXT"));
}
if (ext.b_GL_NV_path_rendering) {
fn.glIsPathNVFn =
reinterpret_cast<glIsPathNVProc>(GetGLProcAddress("glIsPathNV"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glIsPathNVFn =
reinterpret_cast<glIsPathNVProc>(GetGLProcAddress("glIsPathCHROMIUM"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glIsProgramPipelineFn = reinterpret_cast<glIsProgramPipelineProc>(
GetGLProcAddress("glIsProgramPipeline"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glIsQueryFn =
reinterpret_cast<glIsQueryProc>(GetGLProcAddress("glIsQuery"));
} else if (ext.b_GL_ARB_occlusion_query) {
fn.glIsQueryFn =
reinterpret_cast<glIsQueryProc>(GetGLProcAddress("glIsQueryARB"));
} else if (ext.b_GL_EXT_disjoint_timer_query ||
ext.b_GL_EXT_occlusion_query_boolean) {
fn.glIsQueryFn =
reinterpret_cast<glIsQueryProc>(GetGLProcAddress("glIsQueryEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glIsRenderbufferEXTFn = reinterpret_cast<glIsRenderbufferEXTProc>(
GetGLProcAddress("glIsRenderbuffer"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glIsRenderbufferEXTFn = reinterpret_cast<glIsRenderbufferEXTProc>(
GetGLProcAddress("glIsRenderbufferEXT"));
}
if (ver->IsAtLeastGL(3u, 3u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sampler_objects) {
fn.glIsSamplerFn =
reinterpret_cast<glIsSamplerProc>(GetGLProcAddress("glIsSampler"));
}
if (ver->IsAtLeastGL(3u, 2u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sync) {
fn.glIsSyncFn =
reinterpret_cast<glIsSyncProc>(GetGLProcAddress("glIsSync"));
}
if (ext.b_GL_APPLE_sync) {
fn.glIsSyncAPPLEFn =
reinterpret_cast<glIsSyncAPPLEProc>(GetGLProcAddress("glIsSyncAPPLE"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(4u, 0u) ||
ext.b_GL_ARB_transform_feedback2) {
fn.glIsTransformFeedbackFn = reinterpret_cast<glIsTransformFeedbackProc>(
GetGLProcAddress("glIsTransformFeedback"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_vertex_array_object) {
fn.glIsVertexArrayOESFn = reinterpret_cast<glIsVertexArrayOESProc>(
GetGLProcAddress("glIsVertexArray"));
} else if (ext.b_GL_OES_vertex_array_object) {
fn.glIsVertexArrayOESFn = reinterpret_cast<glIsVertexArrayOESProc>(
GetGLProcAddress("glIsVertexArrayOES"));
} else if (ext.b_GL_APPLE_vertex_array_object) {
fn.glIsVertexArrayOESFn = reinterpret_cast<glIsVertexArrayOESProc>(
GetGLProcAddress("glIsVertexArrayAPPLE"));
}
if (!ver->is_es) {
fn.glMapBufferFn =
reinterpret_cast<glMapBufferProc>(GetGLProcAddress("glMapBuffer"));
} else if (ext.b_GL_OES_mapbuffer) {
fn.glMapBufferFn =
reinterpret_cast<glMapBufferProc>(GetGLProcAddress("glMapBufferOES"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_map_buffer_range) {
fn.glMapBufferRangeFn = reinterpret_cast<glMapBufferRangeProc>(
GetGLProcAddress("glMapBufferRange"));
} else if (ext.b_GL_EXT_map_buffer_range) {
fn.glMapBufferRangeFn = reinterpret_cast<glMapBufferRangeProc>(
GetGLProcAddress("glMapBufferRangeEXT"));
}
if (ext.b_GL_EXT_direct_state_access || ext.b_GL_NV_path_rendering) {
fn.glMatrixLoadfEXTFn = reinterpret_cast<glMatrixLoadfEXTProc>(
GetGLProcAddress("glMatrixLoadfEXT"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glMatrixLoadfEXTFn = reinterpret_cast<glMatrixLoadfEXTProc>(
GetGLProcAddress("glMatrixLoadfCHROMIUM"));
}
if (ext.b_GL_EXT_direct_state_access || ext.b_GL_NV_path_rendering) {
fn.glMatrixLoadIdentityEXTFn =
reinterpret_cast<glMatrixLoadIdentityEXTProc>(
GetGLProcAddress("glMatrixLoadIdentityEXT"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glMatrixLoadIdentityEXTFn =
reinterpret_cast<glMatrixLoadIdentityEXTProc>(
GetGLProcAddress("glMatrixLoadIdentityCHROMIUM"));
}
if (ext.b_GL_KHR_parallel_shader_compile) {
fn.glMaxShaderCompilerThreadsKHRFn =
reinterpret_cast<glMaxShaderCompilerThreadsKHRProc>(
GetGLProcAddress("glMaxShaderCompilerThreadsKHR"));
}
if (ver->IsAtLeastGLES(3u, 1u) || ver->IsAtLeastGL(4u, 5u)) {
fn.glMemoryBarrierByRegionFn =
reinterpret_cast<glMemoryBarrierByRegionProc>(
GetGLProcAddress("glMemoryBarrierByRegion"));
}
if (ver->IsAtLeastGL(4u, 2u) || ver->IsAtLeastGLES(3u, 1u) ||
ext.b_GL_ARB_shader_image_load_store) {
fn.glMemoryBarrierEXTFn = reinterpret_cast<glMemoryBarrierEXTProc>(
GetGLProcAddress("glMemoryBarrier"));
} else if (ext.b_GL_EXT_shader_image_load_store) {
fn.glMemoryBarrierEXTFn = reinterpret_cast<glMemoryBarrierEXTProc>(
GetGLProcAddress("glMemoryBarrierEXT"));
}
if (ver->IsAtLeastGLES(3u, 2u) || ver->IsAtLeastGL(4u, 0u)) {
fn.glMinSampleShadingFn = reinterpret_cast<glMinSampleShadingProc>(
GetGLProcAddress("glMinSampleShading"));
}
if (ext.b_GL_ANGLE_multi_draw) {
fn.glMultiDrawArraysANGLEFn = reinterpret_cast<glMultiDrawArraysANGLEProc>(
GetGLProcAddress("glMultiDrawArraysANGLE"));
}
if (ext.b_GL_ANGLE_multi_draw) {
fn.glMultiDrawArraysInstancedANGLEFn =
reinterpret_cast<glMultiDrawArraysInstancedANGLEProc>(
GetGLProcAddress("glMultiDrawArraysInstancedANGLE"));
}
if (ext.b_GL_ANGLE_multi_draw) {
fn.glMultiDrawElementsANGLEFn =
reinterpret_cast<glMultiDrawElementsANGLEProc>(
GetGLProcAddress("glMultiDrawElementsANGLE"));
}
if (ext.b_GL_ANGLE_multi_draw) {
fn.glMultiDrawElementsInstancedANGLEFn =
reinterpret_cast<glMultiDrawElementsInstancedANGLEProc>(
GetGLProcAddress("glMultiDrawElementsInstancedANGLE"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 2u)) {
fn.glObjectLabelFn =
reinterpret_cast<glObjectLabelProc>(GetGLProcAddress("glObjectLabel"));
} else if (ext.b_GL_KHR_debug) {
fn.glObjectLabelFn = reinterpret_cast<glObjectLabelProc>(
GetGLProcAddress("glObjectLabelKHR"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 2u)) {
fn.glObjectPtrLabelFn = reinterpret_cast<glObjectPtrLabelProc>(
GetGLProcAddress("glObjectPtrLabel"));
} else if (ext.b_GL_KHR_debug) {
fn.glObjectPtrLabelFn = reinterpret_cast<glObjectPtrLabelProc>(
GetGLProcAddress("glObjectPtrLabelKHR"));
}
if (ext.b_GL_NV_path_rendering) {
fn.glPathCommandsNVFn = reinterpret_cast<glPathCommandsNVProc>(
GetGLProcAddress("glPathCommandsNV"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glPathCommandsNVFn = reinterpret_cast<glPathCommandsNVProc>(
GetGLProcAddress("glPathCommandsCHROMIUM"));
}
if (ext.b_GL_NV_path_rendering) {
fn.glPathParameterfNVFn = reinterpret_cast<glPathParameterfNVProc>(
GetGLProcAddress("glPathParameterfNV"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glPathParameterfNVFn = reinterpret_cast<glPathParameterfNVProc>(
GetGLProcAddress("glPathParameterfCHROMIUM"));
}
if (ext.b_GL_NV_path_rendering) {
fn.glPathParameteriNVFn = reinterpret_cast<glPathParameteriNVProc>(
GetGLProcAddress("glPathParameteriNV"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glPathParameteriNVFn = reinterpret_cast<glPathParameteriNVProc>(
GetGLProcAddress("glPathParameteriCHROMIUM"));
}
if (ext.b_GL_NV_path_rendering) {
fn.glPathStencilFuncNVFn = reinterpret_cast<glPathStencilFuncNVProc>(
GetGLProcAddress("glPathStencilFuncNV"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glPathStencilFuncNVFn = reinterpret_cast<glPathStencilFuncNVProc>(
GetGLProcAddress("glPathStencilFuncCHROMIUM"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(4u, 0u) ||
ext.b_GL_ARB_transform_feedback2) {
fn.glPauseTransformFeedbackFn =
reinterpret_cast<glPauseTransformFeedbackProc>(
GetGLProcAddress("glPauseTransformFeedback"));
}
if (!ver->is_es) {
fn.glPointParameteriFn = reinterpret_cast<glPointParameteriProc>(
GetGLProcAddress("glPointParameteri"));
}
if (!ver->is_es) {
fn.glPolygonModeFn =
reinterpret_cast<glPolygonModeProc>(GetGLProcAddress("glPolygonMode"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 2u)) {
fn.glPopDebugGroupFn = reinterpret_cast<glPopDebugGroupProc>(
GetGLProcAddress("glPopDebugGroup"));
} else if (ext.b_GL_KHR_debug) {
fn.glPopDebugGroupFn = reinterpret_cast<glPopDebugGroupProc>(
GetGLProcAddress("glPopDebugGroupKHR"));
}
if (ext.b_GL_EXT_debug_marker) {
fn.glPopGroupMarkerEXTFn = reinterpret_cast<glPopGroupMarkerEXTProc>(
GetGLProcAddress("glPopGroupMarkerEXT"));
}
if (ver->IsAtLeastGL(3u, 1u)) {
fn.glPrimitiveRestartIndexFn =
reinterpret_cast<glPrimitiveRestartIndexProc>(
GetGLProcAddress("glPrimitiveRestartIndex"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_get_program_binary) {
fn.glProgramBinaryFn = reinterpret_cast<glProgramBinaryProc>(
GetGLProcAddress("glProgramBinary"));
} else if (ext.b_GL_OES_get_program_binary) {
fn.glProgramBinaryFn = reinterpret_cast<glProgramBinaryProc>(
GetGLProcAddress("glProgramBinaryOES"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_get_program_binary) {
fn.glProgramParameteriFn = reinterpret_cast<glProgramParameteriProc>(
GetGLProcAddress("glProgramParameteri"));
}
if (ext.b_GL_NV_path_rendering) {
fn.glProgramPathFragmentInputGenNVFn =
reinterpret_cast<glProgramPathFragmentInputGenNVProc>(
GetGLProcAddress("glProgramPathFragmentInputGenNV"));
} else if (ext.b_GL_CHROMIUM_path_rendering) {
fn.glProgramPathFragmentInputGenNVFn =
reinterpret_cast<glProgramPathFragmentInputGenNVProc>(
GetGLProcAddress("glProgramPathFragmentInputGenCHROMIUM"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform1fFn = reinterpret_cast<glProgramUniform1fProc>(
GetGLProcAddress("glProgramUniform1f"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform1fvFn = reinterpret_cast<glProgramUniform1fvProc>(
GetGLProcAddress("glProgramUniform1fv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform1iFn = reinterpret_cast<glProgramUniform1iProc>(
GetGLProcAddress("glProgramUniform1i"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform1ivFn = reinterpret_cast<glProgramUniform1ivProc>(
GetGLProcAddress("glProgramUniform1iv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform1uiFn = reinterpret_cast<glProgramUniform1uiProc>(
GetGLProcAddress("glProgramUniform1ui"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform1uivFn = reinterpret_cast<glProgramUniform1uivProc>(
GetGLProcAddress("glProgramUniform1uiv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform2fFn = reinterpret_cast<glProgramUniform2fProc>(
GetGLProcAddress("glProgramUniform2f"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform2fvFn = reinterpret_cast<glProgramUniform2fvProc>(
GetGLProcAddress("glProgramUniform2fv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform2iFn = reinterpret_cast<glProgramUniform2iProc>(
GetGLProcAddress("glProgramUniform2i"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform2ivFn = reinterpret_cast<glProgramUniform2ivProc>(
GetGLProcAddress("glProgramUniform2iv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform2uiFn = reinterpret_cast<glProgramUniform2uiProc>(
GetGLProcAddress("glProgramUniform2ui"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform2uivFn = reinterpret_cast<glProgramUniform2uivProc>(
GetGLProcAddress("glProgramUniform2uiv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform3fFn = reinterpret_cast<glProgramUniform3fProc>(
GetGLProcAddress("glProgramUniform3f"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform3fvFn = reinterpret_cast<glProgramUniform3fvProc>(
GetGLProcAddress("glProgramUniform3fv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform3iFn = reinterpret_cast<glProgramUniform3iProc>(
GetGLProcAddress("glProgramUniform3i"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform3ivFn = reinterpret_cast<glProgramUniform3ivProc>(
GetGLProcAddress("glProgramUniform3iv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform3uiFn = reinterpret_cast<glProgramUniform3uiProc>(
GetGLProcAddress("glProgramUniform3ui"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform3uivFn = reinterpret_cast<glProgramUniform3uivProc>(
GetGLProcAddress("glProgramUniform3uiv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform4fFn = reinterpret_cast<glProgramUniform4fProc>(
GetGLProcAddress("glProgramUniform4f"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform4fvFn = reinterpret_cast<glProgramUniform4fvProc>(
GetGLProcAddress("glProgramUniform4fv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform4iFn = reinterpret_cast<glProgramUniform4iProc>(
GetGLProcAddress("glProgramUniform4i"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform4ivFn = reinterpret_cast<glProgramUniform4ivProc>(
GetGLProcAddress("glProgramUniform4iv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform4uiFn = reinterpret_cast<glProgramUniform4uiProc>(
GetGLProcAddress("glProgramUniform4ui"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniform4uivFn = reinterpret_cast<glProgramUniform4uivProc>(
GetGLProcAddress("glProgramUniform4uiv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniformMatrix2fvFn =
reinterpret_cast<glProgramUniformMatrix2fvProc>(
GetGLProcAddress("glProgramUniformMatrix2fv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniformMatrix2x3fvFn =
reinterpret_cast<glProgramUniformMatrix2x3fvProc>(
GetGLProcAddress("glProgramUniformMatrix2x3fv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniformMatrix2x4fvFn =
reinterpret_cast<glProgramUniformMatrix2x4fvProc>(
GetGLProcAddress("glProgramUniformMatrix2x4fv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniformMatrix3fvFn =
reinterpret_cast<glProgramUniformMatrix3fvProc>(
GetGLProcAddress("glProgramUniformMatrix3fv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniformMatrix3x2fvFn =
reinterpret_cast<glProgramUniformMatrix3x2fvProc>(
GetGLProcAddress("glProgramUniformMatrix3x2fv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniformMatrix3x4fvFn =
reinterpret_cast<glProgramUniformMatrix3x4fvProc>(
GetGLProcAddress("glProgramUniformMatrix3x4fv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniformMatrix4fvFn =
reinterpret_cast<glProgramUniformMatrix4fvProc>(
GetGLProcAddress("glProgramUniformMatrix4fv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniformMatrix4x2fvFn =
reinterpret_cast<glProgramUniformMatrix4x2fvProc>(
GetGLProcAddress("glProgramUniformMatrix4x2fv"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glProgramUniformMatrix4x3fvFn =
reinterpret_cast<glProgramUniformMatrix4x3fvProc>(
GetGLProcAddress("glProgramUniformMatrix4x3fv"));
}
if (ver->IsAtLeastGL(4u, 3u) || ver->IsAtLeastGLES(3u, 2u)) {
fn.glPushDebugGroupFn = reinterpret_cast<glPushDebugGroupProc>(
GetGLProcAddress("glPushDebugGroup"));
} else if (ext.b_GL_KHR_debug) {
fn.glPushDebugGroupFn = reinterpret_cast<glPushDebugGroupProc>(
GetGLProcAddress("glPushDebugGroupKHR"));
}
if (ext.b_GL_EXT_debug_marker) {
fn.glPushGroupMarkerEXTFn = reinterpret_cast<glPushGroupMarkerEXTProc>(
GetGLProcAddress("glPushGroupMarkerEXT"));
}
if (ver->IsAtLeastGL(3u, 3u) || ext.b_GL_ARB_timer_query) {
fn.glQueryCounterFn = reinterpret_cast<glQueryCounterProc>(
GetGLProcAddress("glQueryCounter"));
} else if (ext.b_GL_EXT_disjoint_timer_query) {
fn.glQueryCounterFn = reinterpret_cast<glQueryCounterProc>(
GetGLProcAddress("glQueryCounterEXT"));
}
if (!ver->is_es || ver->IsAtLeastGLES(3u, 0u)) {
fn.glReadBufferFn =
reinterpret_cast<glReadBufferProc>(GetGLProcAddress("glReadBuffer"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glReadnPixelsRobustANGLEFn =
reinterpret_cast<glReadnPixelsRobustANGLEProc>(
GetGLProcAddress("glReadnPixelsRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glReadPixelsRobustANGLEFn =
reinterpret_cast<glReadPixelsRobustANGLEProc>(
GetGLProcAddress("glReadPixelsRobustANGLE"));
}
if (ver->IsAtLeastGL(4u, 1u) || ver->is_es) {
fn.glReleaseShaderCompilerFn =
reinterpret_cast<glReleaseShaderCompilerProc>(
GetGLProcAddress("glReleaseShaderCompiler"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->is_es) {
fn.glRenderbufferStorageEXTFn =
reinterpret_cast<glRenderbufferStorageEXTProc>(
GetGLProcAddress("glRenderbufferStorage"));
} else if (ext.b_GL_EXT_framebuffer_object) {
fn.glRenderbufferStorageEXTFn =
reinterpret_cast<glRenderbufferStorageEXTProc>(
GetGLProcAddress("glRenderbufferStorageEXT"));
}
if (ver->IsAtLeastGL(3u, 0u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_framebuffer_object) {
fn.glRenderbufferStorageMultisampleFn =
reinterpret_cast<glRenderbufferStorageMultisampleProc>(
GetGLProcAddress("glRenderbufferStorageMultisample"));
} else if (ext.b_GL_ANGLE_framebuffer_multisample) {
fn.glRenderbufferStorageMultisampleFn =
reinterpret_cast<glRenderbufferStorageMultisampleProc>(
GetGLProcAddress("glRenderbufferStorageMultisampleANGLE"));
} else if (ext.b_GL_EXT_framebuffer_multisample) {
fn.glRenderbufferStorageMultisampleFn =
reinterpret_cast<glRenderbufferStorageMultisampleProc>(
GetGLProcAddress("glRenderbufferStorageMultisampleEXT"));
}
if (ext.b_GL_AMD_framebuffer_multisample_advanced) {
fn.glRenderbufferStorageMultisampleAdvancedAMDFn =
reinterpret_cast<glRenderbufferStorageMultisampleAdvancedAMDProc>(
GetGLProcAddress("glRenderbufferStorageMultisampleAdvancedAMD"));
}
if (ext.b_GL_EXT_multisampled_render_to_texture) {
fn.glRenderbufferStorageMultisampleEXTFn =
reinterpret_cast<glRenderbufferStorageMultisampleEXTProc>(
GetGLProcAddress("glRenderbufferStorageMultisampleEXT"));
} else if (ext.b_GL_IMG_multisampled_render_to_texture) {
fn.glRenderbufferStorageMultisampleEXTFn =
reinterpret_cast<glRenderbufferStorageMultisampleEXTProc>(
GetGLProcAddress("glRenderbufferStorageMultisampleIMG"));
}
if (ext.b_GL_ANGLE_request_extension) {
fn.glRequestExtensionANGLEFn =
reinterpret_cast<glRequestExtensionANGLEProc>(
GetGLProcAddress("glRequestExtensionANGLE"));
}
if (ver->IsAtLeastGLES(3u, 0u) || ver->IsAtLeastGL(4u, 0u) ||
ext.b_GL_ARB_transform_feedback2) {
fn.glResumeTransformFeedbackFn =
reinterpret_cast<glResumeTransformFeedbackProc>(
GetGLProcAddress("glResumeTransformFeedback"));
}
if (ver->IsAtLeastGL(3u, 2u) || ver->IsAtLeastGLES(3u, 1u)) {
fn.glSampleMaskiFn =
reinterpret_cast<glSampleMaskiProc>(GetGLProcAddress("glSampleMaski"));
}
if (ver->IsAtLeastGL(3u, 3u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sampler_objects) {
fn.glSamplerParameterfFn = reinterpret_cast<glSamplerParameterfProc>(
GetGLProcAddress("glSamplerParameterf"));
}
if (ver->IsAtLeastGL(3u, 3u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sampler_objects) {
fn.glSamplerParameterfvFn = reinterpret_cast<glSamplerParameterfvProc>(
GetGLProcAddress("glSamplerParameterfv"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glSamplerParameterfvRobustANGLEFn =
reinterpret_cast<glSamplerParameterfvRobustANGLEProc>(
GetGLProcAddress("glSamplerParameterfvRobustANGLE"));
}
if (ver->IsAtLeastGL(3u, 3u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sampler_objects) {
fn.glSamplerParameteriFn = reinterpret_cast<glSamplerParameteriProc>(
GetGLProcAddress("glSamplerParameteri"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glSamplerParameterIivRobustANGLEFn =
reinterpret_cast<glSamplerParameterIivRobustANGLEProc>(
GetGLProcAddress("glSamplerParameterIivRobustANGLE"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glSamplerParameterIuivRobustANGLEFn =
reinterpret_cast<glSamplerParameterIuivRobustANGLEProc>(
GetGLProcAddress("glSamplerParameterIuivRobustANGLE"));
}
if (ver->IsAtLeastGL(3u, 3u) || ver->IsAtLeastGLES(3u, 0u) ||
ext.b_GL_ARB_sampler_objects) {
fn.glSamplerParameterivFn = reinterpret_cast<glSamplerParameterivProc>(
GetGLProcAddress("glSamplerParameteriv"));
}
if (ext.b_GL_ANGLE_robust_client_memory) {
fn.glSamplerParameterivRobustANGLEFn =
reinterpret_cast<glSamplerParameterivRobustANGLEProc>(
GetGLProcAddress("glSamplerParameterivRobustANGLE"));
}
if (ext.b_GL_APPLE_fence) {
fn.glSetFenceAPPLEFn = reinterpret_cast<glSetFenceAPPLEProc>(
GetGLProcAddress("glSetFenceAPPLE"));