summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgpu/command_buffer/build_gles2_cmd_buffer.py1
-rw-r--r--ppapi/c/ppb_opengles2.h2
-rw-r--r--ppapi/lib/gl/gles2/gles2.c1
-rw-r--r--ppapi/lib/gl/include/GLES2/gl2.h178
-rw-r--r--ppapi/lib/gl/include/GLES2/gl2ext.h1226
-rw-r--r--ppapi/native_client/src/shared/ppapi/nacl.scons2
-rw-r--r--ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.cc4
-rw-r--r--ppapi/native_client/tests/ppapi/nacl.scons2
-rw-r--r--ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/nacl.scons2
-rw-r--r--ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.cc34
-rw-r--r--ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.html3
-rw-r--r--ppapi/native_client/tests/ppapi_gles_book/nacl.scons2
12 files changed, 1420 insertions, 37 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index a279798..abc2e69 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -6089,6 +6089,7 @@ const size_t GLES2Util::enum_to_string_table_len_ =
file.Write(_DO_NOT_EDIT_WARNING)
file.Write("#include <GLES2/gl2.h>\n")
+ file.Write("#include <GLES2/gl2ext.h>\n")
file.Write("#include \"ppapi/lib/gl/gles2/gl2ext_ppapi.h\"\n\n")
for func in self.original_functions:
diff --git a/ppapi/c/ppb_opengles2.h b/ppapi/c/ppb_opengles2.h
index ec3204a..8d7367b 100644
--- a/ppapi/c/ppb_opengles2.h
+++ b/ppapi/c/ppb_opengles2.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
diff --git a/ppapi/lib/gl/gles2/gles2.c b/ppapi/lib/gl/gles2/gles2.c
index db589ac..884127c 100644
--- a/ppapi/lib/gl/gles2/gles2.c
+++ b/ppapi/lib/gl/gles2/gles2.c
@@ -7,6 +7,7 @@
// DO NOT EDIT!
#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
#include "ppapi/lib/gl/gles2/gl2ext_ppapi.h"
void GL_APIENTRY glActiveTexture(GLenum texture) {
diff --git a/ppapi/lib/gl/include/GLES2/gl2.h b/ppapi/lib/gl/include/GLES2/gl2.h
index e1d3b87..db04b148 100644
--- a/ppapi/lib/gl/include/GLES2/gl2.h
+++ b/ppapi/lib/gl/include/GLES2/gl2.h
@@ -5,10 +5,6 @@
#include <GLES2/gl2platform.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* This document is licensed under the SGI Free Software B License Version
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
@@ -159,6 +155,7 @@ typedef khronos_ssize_t GLsizeiptr;
#define GL_INVALID_VALUE 0x0501
#define GL_INVALID_OPERATION 0x0502
#define GL_OUT_OF_MEMORY 0x0505
+#define GL_CONTEXT_LOST 0x300E // TODO(gman): What value?
/* FrontFaceDirection */
#define GL_CW 0x0900
@@ -467,10 +464,178 @@ typedef khronos_ssize_t GLsizeiptr;
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
+// Note: If your program is written in C++ you can define
+// GLES2_INLINE_OPTIMIZATION to get an inline version of the OpenGL ES 2.0
+// code for your program. The advantage is a program compiled with high
+// optimization settings can generate very efficient code for issuing OpenGL ES
+// commands. The disadvantage is there is a small possibility of conflicts with
+// your code as we need to include lots of class definitions and a few
+// macros.
+
+#if defined(__cplusplus) && defined(GLES2_INLINE_OPTIMIZATION)
+#include "../command_buffer/client/gles2_lib.h"
+#define GLES2_USE_CPP_BINDINGS
+#endif
+
+#if defined(GLES2_USE_CPP_BINDINGS)
+#define GLES2_GET_FUN(name) gles2::GetGLContext()->name
+#else
+#define GLES2_GET_FUN(name) GLES2 ## name
+#endif
+
/*-------------------------------------------------------------------------
* GL core functions.
*-----------------------------------------------------------------------*/
+#define glActiveTexture GLES2_GET_FUN(ActiveTexture)
+#define glAttachShader GLES2_GET_FUN(AttachShader)
+#define glBindAttribLocation GLES2_GET_FUN(BindAttribLocation)
+#define glBindBuffer GLES2_GET_FUN(BindBuffer)
+#define glBindFramebuffer GLES2_GET_FUN(BindFramebuffer)
+#define glBindRenderbuffer GLES2_GET_FUN(BindRenderbuffer)
+#define glBindTexture GLES2_GET_FUN(BindTexture)
+#define glBlendColor GLES2_GET_FUN(BlendColor)
+#define glBlendEquation GLES2_GET_FUN(BlendEquation)
+#define glBlendEquationSeparate GLES2_GET_FUN(BlendEquationSeparate)
+#define glBlendFunc GLES2_GET_FUN(BlendFunc)
+#define glBlendFuncSeparate GLES2_GET_FUN(BlendFuncSeparate)
+#define glBufferData GLES2_GET_FUN(BufferData)
+#define glBufferSubData GLES2_GET_FUN(BufferSubData)
+#define glCheckFramebufferStatus GLES2_GET_FUN(CheckFramebufferStatus)
+#define glClear GLES2_GET_FUN(Clear)
+#define glClearColor GLES2_GET_FUN(ClearColor)
+#define glClearDepthf GLES2_GET_FUN(ClearDepthf)
+#define glClearStencil GLES2_GET_FUN(ClearStencil)
+#define glColorMask GLES2_GET_FUN(ColorMask)
+#define glCompileShader GLES2_GET_FUN(CompileShader)
+#define glCompressedTexImage2D GLES2_GET_FUN(CompressedTexImage2D)
+#define glCompressedTexSubImage2D GLES2_GET_FUN(CompressedTexSubImage2D)
+#define glCopyTexImage2D GLES2_GET_FUN(CopyTexImage2D)
+#define glCopyTexSubImage2D GLES2_GET_FUN(CopyTexSubImage2D)
+#define glCreateProgram GLES2_GET_FUN(CreateProgram)
+#define glCreateShader GLES2_GET_FUN(CreateShader)
+#define glCullFace GLES2_GET_FUN(CullFace)
+#define glDeleteBuffers GLES2_GET_FUN(DeleteBuffers)
+#define glDeleteFramebuffers GLES2_GET_FUN(DeleteFramebuffers)
+#define glDeleteProgram GLES2_GET_FUN(DeleteProgram)
+#define glDeleteRenderbuffers GLES2_GET_FUN(DeleteRenderbuffers)
+#define glDeleteShader GLES2_GET_FUN(DeleteShader)
+#define glDeleteTextures GLES2_GET_FUN(DeleteTextures)
+#define glDepthFunc GLES2_GET_FUN(DepthFunc)
+#define glDepthMask GLES2_GET_FUN(DepthMask)
+#define glDepthRangef GLES2_GET_FUN(DepthRangef)
+#define glDetachShader GLES2_GET_FUN(DetachShader)
+#define glDisable GLES2_GET_FUN(Disable)
+#define glDisableVertexAttribArray GLES2_GET_FUN(DisableVertexAttribArray)
+#define glDrawArrays GLES2_GET_FUN(DrawArrays)
+#define glDrawElements GLES2_GET_FUN(DrawElements)
+#define glEnable GLES2_GET_FUN(Enable)
+#define glEnableVertexAttribArray GLES2_GET_FUN(EnableVertexAttribArray)
+#define glFinish GLES2_GET_FUN(Finish)
+#define glFlush GLES2_GET_FUN(Flush)
+#define glFramebufferRenderbuffer GLES2_GET_FUN(FramebufferRenderbuffer)
+#define glFramebufferTexture2D GLES2_GET_FUN(FramebufferTexture2D)
+#define glFrontFace GLES2_GET_FUN(FrontFace)
+#define glGenBuffers GLES2_GET_FUN(GenBuffers)
+#define glGenerateMipmap GLES2_GET_FUN(GenerateMipmap)
+#define glGenFramebuffers GLES2_GET_FUN(GenFramebuffers)
+#define glGenRenderbuffers GLES2_GET_FUN(GenRenderbuffers)
+#define glGenTextures GLES2_GET_FUN(GenTextures)
+#define glGetActiveAttrib GLES2_GET_FUN(GetActiveAttrib)
+#define glGetActiveUniform GLES2_GET_FUN(GetActiveUniform)
+#define glGetAttachedShaders GLES2_GET_FUN(GetAttachedShaders)
+#define glGetAttribLocation GLES2_GET_FUN(GetAttribLocation)
+#define glGetBooleanv GLES2_GET_FUN(GetBooleanv)
+#define glGetBufferParameteriv GLES2_GET_FUN(GetBufferParameteriv)
+#define glGetError GLES2_GET_FUN(GetError)
+#define glGetFloatv GLES2_GET_FUN(GetFloatv)
+#define glGetFramebufferAttachmentParameteriv GLES2_GET_FUN(GetFramebufferAttachmentParameteriv)
+#define glGetIntegerv GLES2_GET_FUN(GetIntegerv)
+#define glGetProgramiv GLES2_GET_FUN(GetProgramiv)
+#define glGetProgramInfoLog GLES2_GET_FUN(GetProgramInfoLog)
+#define glGetRenderbufferParameteriv GLES2_GET_FUN(GetRenderbufferParameteriv)
+#define glGetShaderiv GLES2_GET_FUN(GetShaderiv)
+#define glGetShaderInfoLog GLES2_GET_FUN(GetShaderInfoLog)
+#define glGetShaderPrecisionFormat GLES2_GET_FUN(GetShaderPrecisionFormat)
+#define glGetShaderSource GLES2_GET_FUN(GetShaderSource)
+#define glGetString GLES2_GET_FUN(GetString)
+#define glGetTexParameterfv GLES2_GET_FUN(GetTexParameterfv)
+#define glGetTexParameteriv GLES2_GET_FUN(GetTexParameteriv)
+#define glGetUniformfv GLES2_GET_FUN(GetUniformfv)
+#define glGetUniformiv GLES2_GET_FUN(GetUniformiv)
+#define glGetUniformLocation GLES2_GET_FUN(GetUniformLocation)
+#define glGetVertexAttribfv GLES2_GET_FUN(GetVertexAttribfv)
+#define glGetVertexAttribiv GLES2_GET_FUN(GetVertexAttribiv)
+#define glGetVertexAttribPointerv GLES2_GET_FUN(GetVertexAttribPointerv)
+#define glHint GLES2_GET_FUN(Hint)
+#define glIsBuffer GLES2_GET_FUN(IsBuffer)
+#define glIsEnabled GLES2_GET_FUN(IsEnabled)
+#define glIsFramebuffer GLES2_GET_FUN(IsFramebuffer)
+#define glIsProgram GLES2_GET_FUN(IsProgram)
+#define glIsRenderbuffer GLES2_GET_FUN(IsRenderbuffer)
+#define glIsShader GLES2_GET_FUN(IsShader)
+#define glIsTexture GLES2_GET_FUN(IsTexture)
+#define glLineWidth GLES2_GET_FUN(LineWidth)
+#define glLinkProgram GLES2_GET_FUN(LinkProgram)
+#define glPixelStorei GLES2_GET_FUN(PixelStorei)
+#define glPolygonOffset GLES2_GET_FUN(PolygonOffset)
+#define glReadPixels GLES2_GET_FUN(ReadPixels)
+#define glReleaseShaderCompiler GLES2_GET_FUN(ReleaseShaderCompiler)
+#define glRenderbufferStorage GLES2_GET_FUN(RenderbufferStorage)
+#define glSampleCoverage GLES2_GET_FUN(SampleCoverage)
+#define glScissor GLES2_GET_FUN(Scissor)
+#define glShaderBinary GLES2_GET_FUN(ShaderBinary)
+#define glShaderSource GLES2_GET_FUN(ShaderSource)
+#define glStencilFunc GLES2_GET_FUN(StencilFunc)
+#define glStencilFuncSeparate GLES2_GET_FUN(StencilFuncSeparate)
+#define glStencilMask GLES2_GET_FUN(StencilMask)
+#define glStencilMaskSeparate GLES2_GET_FUN(StencilMaskSeparate)
+#define glStencilOp GLES2_GET_FUN(StencilOp)
+#define glStencilOpSeparate GLES2_GET_FUN(StencilOpSeparate)
+#define glTexImage2D GLES2_GET_FUN(TexImage2D)
+#define glTexParameterf GLES2_GET_FUN(TexParameterf)
+#define glTexParameterfv GLES2_GET_FUN(TexParameterfv)
+#define glTexParameteri GLES2_GET_FUN(TexParameteri)
+#define glTexParameteriv GLES2_GET_FUN(TexParameteriv)
+#define glTexSubImage2D GLES2_GET_FUN(TexSubImage2D)
+#define glUniform1f GLES2_GET_FUN(Uniform1f)
+#define glUniform1fv GLES2_GET_FUN(Uniform1fv)
+#define glUniform1i GLES2_GET_FUN(Uniform1i)
+#define glUniform1iv GLES2_GET_FUN(Uniform1iv)
+#define glUniform2f GLES2_GET_FUN(Uniform2f)
+#define glUniform2fv GLES2_GET_FUN(Uniform2fv)
+#define glUniform2i GLES2_GET_FUN(Uniform2i)
+#define glUniform2iv GLES2_GET_FUN(Uniform2iv)
+#define glUniform3f GLES2_GET_FUN(Uniform3f)
+#define glUniform3fv GLES2_GET_FUN(Uniform3fv)
+#define glUniform3i GLES2_GET_FUN(Uniform3i)
+#define glUniform3iv GLES2_GET_FUN(Uniform3iv)
+#define glUniform4f GLES2_GET_FUN(Uniform4f)
+#define glUniform4fv GLES2_GET_FUN(Uniform4fv)
+#define glUniform4i GLES2_GET_FUN(Uniform4i)
+#define glUniform4iv GLES2_GET_FUN(Uniform4iv)
+#define glUniformMatrix2fv GLES2_GET_FUN(UniformMatrix2fv)
+#define glUniformMatrix3fv GLES2_GET_FUN(UniformMatrix3fv)
+#define glUniformMatrix4fv GLES2_GET_FUN(UniformMatrix4fv)
+#define glUseProgram GLES2_GET_FUN(UseProgram)
+#define glValidateProgram GLES2_GET_FUN(ValidateProgram)
+#define glVertexAttrib1f GLES2_GET_FUN(VertexAttrib1f)
+#define glVertexAttrib1fv GLES2_GET_FUN(VertexAttrib1fv)
+#define glVertexAttrib2f GLES2_GET_FUN(VertexAttrib2f)
+#define glVertexAttrib2fv GLES2_GET_FUN(VertexAttrib2fv)
+#define glVertexAttrib3f GLES2_GET_FUN(VertexAttrib3f)
+#define glVertexAttrib3fv GLES2_GET_FUN(VertexAttrib3fv)
+#define glVertexAttrib4f GLES2_GET_FUN(VertexAttrib4f)
+#define glVertexAttrib4fv GLES2_GET_FUN(VertexAttrib4fv)
+#define glVertexAttribPointer GLES2_GET_FUN(VertexAttribPointer)
+#define glViewport GLES2_GET_FUN(Viewport)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
@@ -614,8 +779,11 @@ GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloa
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
-#ifdef __cplusplus
+#if defined(__cplusplus)
}
#endif
+#endif // !GLES2_USE_CPP_BINDINGS
+
#endif /* __gl2_h_ */
+
diff --git a/ppapi/lib/gl/include/GLES2/gl2ext.h b/ppapi/lib/gl/include/GLES2/gl2ext.h
index 05c3f3f..8effd30 100644
--- a/ppapi/lib/gl/include/GLES2/gl2ext.h
+++ b/ppapi/lib/gl/include/GLES2/gl2ext.h
@@ -1,7 +1,7 @@
#ifndef __gl2ext_h_
#define __gl2ext_h_
-/* $Revision: 10969 $ on $Date:: 2010-04-09 02:27:15 -0700 #$ */
+/* $Revision: 16619 $ on $Date:: 2012-01-18 10:00:14 -0800 #$ */
#ifdef __cplusplus
extern "C" {
@@ -57,6 +57,15 @@ extern "C" {
typedef void* GLeglImageOES;
#endif
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+/* GLeglImageOES defined in GL_OES_EGL_image already. */
+#define GL_TEXTURE_EXTERNAL_OES 0x8D65
+#define GL_SAMPLER_EXTERNAL_OES 0x8D66
+#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
+#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
+#endif
+
/* GL_OES_element_index_uint */
#ifndef GL_OES_element_index_uint
#define GL_UNSIGNED_INT 0x1405
@@ -180,6 +189,85 @@ typedef void* GLeglImageOES;
#endif
/*------------------------------------------------------------------------*
+ * ANGLE extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_ANGLE_framebuffer_blit */
+#ifndef GL_ANGLE_framebuffer_blit
+#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
+#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
+#endif
+
+/* GL_ANGLE_framebuffer_multisample */
+#ifndef GL_ANGLE_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
+#define GL_MAX_SAMPLES_ANGLE 0x8D57
+#endif
+
+/* GL_ANGLE_pack_reverse_row_order */
+#ifndef GL_ANGLE_pack_reverse_row_order
+#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
+#endif
+
+/* GL_ANGLE_texture_usage */
+#ifndef GL_ANGLE_texture_usage
+#define GL_TEXTURE_USAGE_ANGLE 0x93A2
+#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
+#endif
+
+/* GL_ANGLE_instanced_arrays */
+#ifndef GL_ANGLE_instanced_arrays
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
+#endif
+
+/*------------------------------------------------------------------------*
+ * APPLE extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_rgb_422 */
+#ifndef GL_APPLE_rgb_422
+#define GL_RGB_422_APPLE 0x8A1F
+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
+#endif
+
+/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
+#define GL_MAX_SAMPLES_APPLE 0x8D57
+#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
+#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
+#endif
+
+/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_texture_format_BGRA8888
+#define GL_BGRA_EXT 0x80E1
+#endif
+
+/* GL_APPLE_texture_max_level */
+#ifndef GL_APPLE_texture_max_level
+#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
+#endif
+
+/*------------------------------------------------------------------------*
+ * ARM extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_ARM_mali_shader_binary */
+#ifndef GL_ARM_mali_shader_binary
+#define GL_MALI_SHADER_BINARY_ARM 0x8F60
+#endif
+
+/* GL_ARM_rgba8 */
+/* No new tokens introduced by this extension. */
+
+/*------------------------------------------------------------------------*
* EXT extension tokens
*------------------------------------------------------------------------*/
@@ -189,6 +277,29 @@ typedef void* GLeglImageOES;
#define GL_MAX_EXT 0x8008
#endif
+/* GL_EXT_color_buffer_half_float */
+#ifndef GL_EXT_color_buffer_half_float
+#define GL_RGBA16F_EXT 0x881A
+#define GL_RGB16F_EXT 0x881B
+#define GL_RG16F_EXT 0x822F
+#define GL_R16F_EXT 0x822D
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
+#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
+#endif
+
+/* GL_EXT_debug_label */
+#ifndef GL_EXT_debug_label
+#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
+#define GL_PROGRAM_OBJECT_EXT 0x8B40
+#define GL_SHADER_OBJECT_EXT 0x8B48
+#define GL_BUFFER_OBJECT_EXT 0x9151
+#define GL_QUERY_OBJECT_EXT 0x9153
+#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
+#endif
+
+/* GL_EXT_debug_marker */
+/* No new tokens introduced by this extension. */
+
/* GL_EXT_discard_framebuffer */
#ifndef GL_EXT_discard_framebuffer
#define GL_COLOR_EXT 0x1800
@@ -196,9 +307,26 @@ typedef void* GLeglImageOES;
#define GL_STENCIL_EXT 0x1802
#endif
+/* GL_EXT_multisampled_render_to_texture */
+#ifndef GL_EXT_multisampled_render_to_texture
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
+#define GL_RENDERBUFFER_SAMPLES_EXT 0x9133
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x9134
+#define GL_MAX_SAMPLES_EXT 0x9135
+#endif
+
/* GL_EXT_multi_draw_arrays */
/* No new tokens introduced by this extension. */
+/* GL_EXT_occlusion_query_boolean */
+#ifndef GL_EXT_occlusion_query_boolean
+#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F
+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
+#define GL_CURRENT_QUERY_EXT 0x8865
+#define GL_QUERY_RESULT_EXT 0x8866
+#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
+#endif
+
/* GL_EXT_read_format_bgra */
#ifndef GL_EXT_read_format_bgra
#define GL_BGRA_EXT 0x80E1
@@ -206,6 +334,53 @@ typedef void* GLeglImageOES;
#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
#endif
+/* GL_EXT_robustness */
+#ifndef GL_EXT_robustness
+/* reuse GL_NO_ERROR */
+#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
+#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
+#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
+#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
+#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
+#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
+#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
+#endif
+
+/* GL_EXT_separate_shader_objects */
+#ifndef GL_EXT_separate_shader_objects
+#define GL_VERTEX_SHADER_BIT_EXT 0x00000001
+#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002
+#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF
+#define GL_PROGRAM_SEPARABLE_EXT 0x8258
+#define GL_ACTIVE_PROGRAM_EXT 0x8259
+#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
+#endif
+
+/* GL_EXT_shader_texture_lod */
+/* No new tokens introduced by this extension. */
+
+/* GL_EXT_shadow_samplers */
+#ifndef GL_EXT_shadow_samplers
+#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C
+#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D
+#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E
+#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62
+#endif
+
+/* GL_EXT_sRGB */
+#ifndef GL_EXT_sRGB
+#define GL_SRGB_EXT 0x8C40
+#define GL_SRGB_ALPHA_EXT 0x8C42
+#define GL_SRGB8_ALPHA8_EXT 0x8C43
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
+#endif
+
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
@@ -217,15 +392,54 @@ typedef void* GLeglImageOES;
#define GL_BGRA_EXT 0x80E1
#endif
+/* GL_EXT_texture_rg */
+#ifndef GL_EXT_texture_rg
+#define GL_RED_EXT 0x1903
+#define GL_RG_EXT 0x8227
+#define GL_R8_EXT 0x8229
+#define GL_RG8_EXT 0x822B
+#endif
+
+/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_storage
+#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
+#define GL_ALPHA8_EXT 0x803C
+#define GL_LUMINANCE8_EXT 0x8040
+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
+#define GL_RGBA32F_EXT 0x8814
+#define GL_RGB32F_EXT 0x8815
+#define GL_ALPHA32F_EXT 0x8816
+#define GL_LUMINANCE32F_EXT 0x8818
+#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
+/* reuse GL_RGBA16F_EXT */
+#define GL_RGB16F_EXT 0x881B
+#define GL_ALPHA16F_EXT 0x881C
+#define GL_LUMINANCE16F_EXT 0x881E
+#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
+#define GL_RGB10_A2_EXT 0x8059
+#define GL_RGB10_EXT 0x8052
+#define GL_BGRA8_EXT 0x93A1
+#endif
+
/* GL_EXT_texture_type_2_10_10_10_REV */
#ifndef GL_EXT_texture_type_2_10_10_10_REV
#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
#endif
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+/* GL_EXT_unpack_subimage */
+#ifndef GL_EXT_unpack_subimage
+#define GL_UNPACK_ROW_LENGTH 0x0CF2
+#define GL_UNPACK_SKIP_ROWS 0x0CF3
+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
+#endif
+
+/*------------------------------------------------------------------------*
+ * DMP extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_DMP_shader_binary */
+#ifndef GL_DMP_shader_binary
+#define GL_SHADER_BINARY_DMP 0x9250
#endif
/*------------------------------------------------------------------------*
@@ -268,13 +482,6 @@ typedef void* GLeglImageOES;
* NV extension tokens
*------------------------------------------------------------------------*/
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_ALL_COMPLETED_NV 0x84F2
-#define GL_FENCE_STATUS_NV 0x84F3
-#define GL_FENCE_CONDITION_NV 0x84F4
-#endif
-
/* GL_NV_coverage_sample */
#ifndef GL_NV_coverage_sample
#define GL_COVERAGE_COMPONENT_NV 0x8ED0
@@ -293,10 +500,90 @@ typedef void* GLeglImageOES;
#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
#endif
+/* GL_NV_draw_buffers */
+#ifndef GL_NV_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_NV 0x8824
+#define GL_DRAW_BUFFER0_NV 0x8825
+#define GL_DRAW_BUFFER1_NV 0x8826
+#define GL_DRAW_BUFFER2_NV 0x8827
+#define GL_DRAW_BUFFER3_NV 0x8828
+#define GL_DRAW_BUFFER4_NV 0x8829
+#define GL_DRAW_BUFFER5_NV 0x882A
+#define GL_DRAW_BUFFER6_NV 0x882B
+#define GL_DRAW_BUFFER7_NV 0x882C
+#define GL_DRAW_BUFFER8_NV 0x882D
+#define GL_DRAW_BUFFER9_NV 0x882E
+#define GL_DRAW_BUFFER10_NV 0x882F
+#define GL_DRAW_BUFFER11_NV 0x8830
+#define GL_DRAW_BUFFER12_NV 0x8831
+#define GL_DRAW_BUFFER13_NV 0x8832
+#define GL_DRAW_BUFFER14_NV 0x8833
+#define GL_DRAW_BUFFER15_NV 0x8834
+#define GL_COLOR_ATTACHMENT0_NV 0x8CE0
+#define GL_COLOR_ATTACHMENT1_NV 0x8CE1
+#define GL_COLOR_ATTACHMENT2_NV 0x8CE2
+#define GL_COLOR_ATTACHMENT3_NV 0x8CE3
+#define GL_COLOR_ATTACHMENT4_NV 0x8CE4
+#define GL_COLOR_ATTACHMENT5_NV 0x8CE5
+#define GL_COLOR_ATTACHMENT6_NV 0x8CE6
+#define GL_COLOR_ATTACHMENT7_NV 0x8CE7
+#define GL_COLOR_ATTACHMENT8_NV 0x8CE8
+#define GL_COLOR_ATTACHMENT9_NV 0x8CE9
+#define GL_COLOR_ATTACHMENT10_NV 0x8CEA
+#define GL_COLOR_ATTACHMENT11_NV 0x8CEB
+#define GL_COLOR_ATTACHMENT12_NV 0x8CEC
+#define GL_COLOR_ATTACHMENT13_NV 0x8CED
+#define GL_COLOR_ATTACHMENT14_NV 0x8CEE
+#define GL_COLOR_ATTACHMENT15_NV 0x8CEF
+#endif
+
+/* GL_NV_fbo_color_attachments */
+#ifndef GL_NV_fbo_color_attachments
+#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
+/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
+#endif
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV 0x84F2
+#define GL_FENCE_STATUS_NV 0x84F3
+#define GL_FENCE_CONDITION_NV 0x84F4
+#endif
+
+/* GL_NV_read_buffer */
+#ifndef GL_NV_read_buffer
+#define GL_READ_BUFFER_NV 0x0C02
+#endif
+
+/* GL_NV_read_buffer_front */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_depth */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_depth_stencil */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_stencil */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_texture_compression_s3tc_update */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_texture_npot_2D_mipmap */
+/* No new tokens introduced by this extension. */
+
/*------------------------------------------------------------------------*
* QCOM extension tokens
*------------------------------------------------------------------------*/
+/* GL_QCOM_alpha_test */
+#ifndef GL_QCOM_alpha_test
+#define GL_ALPHA_TEST_QCOM 0x0BC0
+#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
+#define GL_ALPHA_TEST_REF_QCOM 0x0BC2
+#endif
+
/* GL_QCOM_driver_control */
/* No new tokens introduced by this extension. */
@@ -365,6 +652,15 @@ typedef void* GLeglImageOES;
#endif
/*------------------------------------------------------------------------*
+ * VIV extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_VIV_shader_binary */
+#ifndef GL_VIV_shader_binary
+#define GL_SHADER_BINARY_VIV 0x8FC4
+#endif
+
+/*------------------------------------------------------------------------*
* End of extension tokens, start of corresponding extension functions
*------------------------------------------------------------------------*/
@@ -401,13 +697,23 @@ typedef void* GLeglImageOES;
#ifndef GL_OES_EGL_image
#define GL_OES_EGL_image 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glEGLImageTargetTexture2DOES GLES2_GET_FUN(EGLImageTargetTexture2DOES)
+#define glEGLImageTargetRenderbufferStorageOES GLES2_GET_FUN(EGLImageTargetRenderbufferStorageOES)
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
#endif
+#endif
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
#endif
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+#define GL_OES_EGL_image_external 1
+/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
+#endif
+
/* GL_OES_element_index_uint */
#ifndef GL_OES_element_index_uint
#define GL_OES_element_index_uint 1
@@ -427,9 +733,13 @@ typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenu
#ifndef GL_OES_get_program_binary
#define GL_OES_get_program_binary 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glGetProgramBinaryOES GLES2_GET_FUN(GetProgramBinaryOES)
+#define glProgramBinaryOES GLES2_GET_FUN(ProgramBinaryOES)
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
#endif
+#endif
typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
#endif
@@ -438,10 +748,15 @@ typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum bi
#ifndef GL_OES_mapbuffer
#define GL_OES_mapbuffer 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glMapBufferOES GLES2_GET_FUN(MapBufferOES)
+#define glUnmapBufferOES GLES2_GET_FUN(UnmapBufferOES)
+#define glGetBufferPointervOES GLES2_GET_FUN(GetBufferPointervOES)
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params);
#endif
+#endif
typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params);
@@ -476,6 +791,13 @@ typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum
#ifndef GL_OES_texture_3D
#define GL_OES_texture_3D 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glTexImage3DOES GLES2_GET_FUN(TexImage3DOES)
+#define glTexSubImage3DOES GLES2_GET_FUN(TexSubImage3DOES)
+#define glCopyTexSubImage3DOES GLES2_GET_FUN(CopyTexSubImage3DOES)
+#define glCompressedTexImage3DOES GLES2_GET_FUN(CompressedTexImage3DOES)
+#define glCompressedTexSubImage3DOES GLES2_GET_FUN(CompressedTexSubImage3DOES)
+#define glFramebufferTexture3DOES GLES2_GET_FUN(FramebufferTexture3DOES)
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
@@ -483,6 +805,7 @@ GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint leve
GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
#endif
+#endif
typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
@@ -520,11 +843,17 @@ typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum
#ifndef GL_OES_vertex_array_object
#define GL_OES_vertex_array_object 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glBindVertexArrayOES GLES2_GET_FUN(BindVertexArrayOES)
+#define glDeleteVertexArraysOES GLES2_GET_FUN(DeleteVertexArraysOES)
+#define glGenVertexArraysOES GLES2_GET_FUN(GenVertexArraysOES)
+#define glIsVertexArrayOES GLES2_GET_FUN(IsVertexArrayOES)
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
#endif
+#endif
typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
@@ -559,6 +888,19 @@ typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
#ifndef GL_AMD_performance_monitor
#define GL_AMD_performance_monitor 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glGetPerfMonitorGroupsAMD GLES2_GET_FUN(GetPerfMonitorGroupsAMD)
+#define glGetPerfMonitorCountersAMD GLES2_GET_FUN(GetPerfMonitorCountersAMD)
+#define glGetPerfMonitorGroupStringAMD GLES2_GET_FUN(GetPerfMonitorGroupStringAMD)
+#define glGetPerfMonitorCounterStringAMD GLES2_GET_FUN(GetPerfMonitorCounterStringAMD)
+#define glGetPerfMonitorCounterInfoAMD GLES2_GET_FUN(GetPerfMonitorCounterInfoAMD)
+#define glGenPerfMonitorsAMD GLES2_GET_FUN(GenPerfMonitorsAMD)
+#define glDeletePerfMonitorsAMD GLES2_GET_FUN(DeletePerfMonitorsAMD)
+#define glSelectPerfMonitorCountersAMD GLES2_GET_FUN(SelectPerfMonitorCountersAMD)
+#define glBeginPerfMonitorAMD GLES2_GET_FUN(BeginPerfMonitorAMD)
+#define glEndPerfMonitorAMD GLES2_GET_FUN(EndPerfMonitorAMD)
+#define glGetPerfMonitorCounterDataAMD GLES2_GET_FUN(GetPerfMonitorCounterDataAMD)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
@@ -571,6 +913,7 @@ GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
#endif
+#endif
typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
@@ -590,6 +933,96 @@ typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monito
#endif
/*------------------------------------------------------------------------*
+ * ANGLE extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_ANGLE_framebuffer_blit */
+#ifndef GL_ANGLE_framebuffer_blit
+#define GL_ANGLE_framebuffer_blit 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glBlitFramebufferANGLE GLES2_GET_FUN(BlitFramebufferANGLE)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+#endif
+typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+
+/* GL_ANGLE_framebuffer_multisample */
+#ifndef GL_ANGLE_framebuffer_multisample
+#define GL_ANGLE_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glRenderbufferStorageMultisampleANGLE GLES2_GET_FUN(RenderbufferStorageMultisampleANGLE)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+
+/* GL_ANGLE_instanced_arrays */
+#ifndef GL_ANGLE_instanced_arrays
+#define GL_ANGLE_instanced_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor);
+GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+#endif
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+#endif
+
+/*------------------------------------------------------------------------*
+ * APPLE extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_rgb_422 */
+#ifndef GL_APPLE_rgb_422
+#define GL_APPLE_rgb_422 1
+#endif
+
+/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_framebuffer_multisample
+#define GL_APPLE_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glRenderbufferStorageMultisampleAPPLE GLES2_GET_FUN(RenderbufferStorageMultisampleAPPLE)
+#define glResolveMultisampleFramebufferAPPLE GLES2_GET_FUN(ResolveMultisampleFramebufferAPPLE)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
+#endif
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
+#endif
+
+/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_texture_format_BGRA8888
+#define GL_APPLE_texture_format_BGRA8888 1
+#endif
+
+/* GL_APPLE_texture_max_level */
+#ifndef GL_APPLE_texture_max_level
+#define GL_APPLE_texture_max_level 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * ARM extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_ARM_mali_shader_binary */
+#ifndef GL_ARM_mali_shader_binary
+#define GL_ARM_mali_shader_binary 1
+#endif
+
+/* GL_ARM_rgba8 */
+#ifndef GL_ARM_rgba8
+#define GL_ARM_rgba8 1
+#endif
+
+/*------------------------------------------------------------------------*
* EXT extension functions
*------------------------------------------------------------------------*/
@@ -598,30 +1031,263 @@ typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monito
#define GL_EXT_blend_minmax 1
#endif
+/* GL_EXT_color_buffer_half_float */
+#ifndef GL_EXT_color_buffer_half_float
+#define GL_EXT_color_buffer_half_float 1
+#endif
+
+/* GL_EXT_debug_label */
+#ifndef GL_EXT_debug_label
+#define GL_EXT_debug_label 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glLabelObjectEXT GLES2_GET_FUN(LabelObjectEXT)
+#define glGetObjectLabelEXT GLES2_GET_FUN(GetObjectLabelEXT)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
+GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
+#endif
+#endif
+typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
+#endif
+
+/* GL_EXT_debug_marker */
+#ifndef GL_EXT_debug_marker
+#define GL_EXT_debug_marker 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glInsertEventMarkerEXT GLES2_GET_FUN(InsertEventMarkerEXT)
+#define glPushGroupMarkerEXT GLES2_GET_FUN(PushGroupMarkerEXT)
+#define glPopGroupMarkerEXT GLES2_GET_FUN(PopGroupMarkerEXT)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
+GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
+GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
+#endif
+#endif
+typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
+typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
+typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
+#endif
+
/* GL_EXT_discard_framebuffer */
#ifndef GL_EXT_discard_framebuffer
#define GL_EXT_discard_framebuffer 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glDiscardFramebufferEXT GLES2_GET_FUN(DiscardFramebufferEXT)
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
#endif
+#endif
typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
#endif
+/* GL_EXT_multisampled_render_to_texture */
+#ifndef GL_EXT_multisampled_render_to_texture
+#define GL_EXT_multisampled_render_to_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glRenderbufferStorageMultisampleEXT GLES2_GET_FUN(RenderbufferStorageMultisampleEXT)
+#define glFramebufferTexture2DMultisampleEXT GLES2_GET_FUN(FramebufferTexture2DMultisampleEXT)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
+#endif
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+
#ifndef GL_EXT_multi_draw_arrays
#define GL_EXT_multi_draw_arrays 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glMultiDrawArraysEXT GLES2_GET_FUN(MultiDrawArraysEXT)
+#define glMultiDrawElementsEXT GLES2_GET_FUN(MultiDrawElementsEXT)
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
+#endif
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
#endif
+/* GL_EXT_occlusion_query_boolean */
+#ifndef GL_EXT_occlusion_query_boolean
+#define GL_EXT_occlusion_query_boolean 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glGenQueriesEXT GLES2_GET_FUN(GenQueriesEXT)
+#define glDeleteQueriesEXT GLES2_GET_FUN(DeleteQueriesEXT)
+#define glIsQueryEXT GLES2_GET_FUN(IsQueryEXT)
+#define glBeginQueryEXT GLES2_GET_FUN(BeginQueryEXT)
+#define glEndQueryEXT GLES2_GET_FUN(EndQueryEXT)
+#define glGetQueryivEXT GLES2_GET_FUN(GetQueryivEXT)
+#define glGetQueryObjectuivEXT GLES2_GET_FUN(GetQueryObjectuivEXT)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
+GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
+GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
+GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
+GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
+GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
+#endif
+#endif
+typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
+typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
+typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
+typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
+#endif
+
/* GL_EXT_read_format_bgra */
#ifndef GL_EXT_read_format_bgra
#define GL_EXT_read_format_bgra 1
#endif
+/* GL_EXT_robustness */
+#ifndef GL_EXT_robustness
+#define GL_EXT_robustness 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glGetGraphicsResetStatusEXT GLES2_GET_FUN(GetGraphicsResetStatusEXT)
+#define glReadnPixelsEXT GLES2_GET_FUN(ReadnPixelsEXT)
+#define glGetnUniformfvEXT GLES2_GET_FUN(GetnUniformfvEXT)
+#define glGetnUniformivEXT GLES2_GET_FUN(GetnUniformivEXT)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
+GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
+GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+#endif
+#endif
+typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
+typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+#endif
+
+/* GL_EXT_separate_shader_objects */
+#ifndef GL_EXT_separate_shader_objects
+#define GL_EXT_separate_shader_objects 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glUseProgramStagesEXT GLES2_GET_FUN(UseProgramStagesEXT)
+#define glActiveShaderProgramEXT GLES2_GET_FUN(ActiveShaderProgramEXT)
+#define glCreateShaderProgramvEXT GLES2_GET_FUN(CreateShaderProgramvEXT)
+#define glBindProgramPipelineEXT GLES2_GET_FUN(BindProgramPipelineEXT)
+#define glDeleteProgramPipelinesEXT GLES2_GET_FUN(DeleteProgramPipelinesEXT)
+#define glGenProgramPipelinesEXT GLES2_GET_FUN(GenProgramPipelinesEXT)
+#define glIsProgramPipelineEXT GLES2_GET_FUN(IsProgramPipelineEXT)
+#define glProgramParameteriEXT GLES2_GET_FUN(ProgramParameteriEXT)
+#define glGetProgramPipelineivEXT GLES2_GET_FUN(GetProgramPipelineivEXT)
+#define glProgramUniform1iEXT GLES2_GET_FUN(ProgramUniform1iEXT)
+#define glProgramUniform2iEXT GLES2_GET_FUN(ProgramUniform2iEXT)
+#define glProgramUniform3iEXT GLES2_GET_FUN(ProgramUniform3iEXT)
+#define glProgramUniform4iEXT GLES2_GET_FUN(ProgramUniform4iEXT)
+#define glProgramUniform1fEXT GLES2_GET_FUN(ProgramUniform1fEXT)
+#define glProgramUniform2fEXT GLES2_GET_FUN(ProgramUniform2fEXT)
+#define glProgramUniform3fEXT GLES2_GET_FUN(ProgramUniform3fEXT)
+#define glProgramUniform4fEXT GLES2_GET_FUN(ProgramUniform4fEXT)
+#define glProgramUniform1ivEXT GLES2_GET_FUN(ProgramUniform1ivEXT)
+#define glProgramUniform2ivEXT GLES2_GET_FUN(ProgramUniform2ivEXT)
+#define glProgramUniform3ivEXT GLES2_GET_FUN(ProgramUniform3ivEXT)
+#define glProgramUniform4ivEXT GLES2_GET_FUN(ProgramUniform4ivEXT)
+#define glProgramUniform1fvEXT GLES2_GET_FUN(ProgramUniform1fvEXT)
+#define glProgramUniform2fvEXT GLES2_GET_FUN(ProgramUniform2fvEXT)
+#define glProgramUniform3fvEXT GLES2_GET_FUN(ProgramUniform3fvEXT)
+#define glProgramUniform4fvEXT GLES2_GET_FUN(ProgramUniform4fvEXT)
+#define glProgramUniformMatrix2fvEXT GLES2_GET_FUN(ProgramUniformMatrix2fvEXT)
+#define glProgramUniformMatrix3fvEXT GLES2_GET_FUN(ProgramUniformMatrix3fvEXT)
+#define glProgramUniformMatrix4fvEXT GLES2_GET_FUN(ProgramUniformMatrix4fvEXT)
+#define glValidateProgramPipelineEXT GLES2_GET_FUN(ValidateProgramPipelineEXT)
+#define glGetProgramPipelineInfoLogEXT GLES2_GET_FUN(GetProgramPipelineInfoLogEXT)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
+GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
+GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
+GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
+GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
+GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
+GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
+GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
+GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
+GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
+GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+#endif
+#endif
+typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
+typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
+typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
+typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
+typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
+typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+#endif
+
+/* GL_EXT_shader_texture_lod */
+#ifndef GL_EXT_shader_texture_lod
+#define GL_EXT_shader_texture_lod 1
+#endif
+
+/* GL_EXT_shadow_samplers */
+#ifndef GL_EXT_shadow_samplers
+#define GL_EXT_shadow_samplers 1
+#endif
+
+/* GL_EXT_sRGB */
+#ifndef GL_EXT_sRGB
+#define GL_EXT_sRGB 1
+#endif
+
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_EXT_texture_compression_dxt1 1
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_EXT_texture_filter_anisotropic 1
@@ -632,14 +1298,56 @@ typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GL
#define GL_EXT_texture_format_BGRA8888 1
#endif
+/* GL_EXT_texture_rg */
+#ifndef GL_EXT_texture_rg
+#define GL_EXT_texture_rg 1
+#endif
+
+/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_storage
+#define GL_EXT_texture_storage 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glTexStorage1DEXT GLES2_GET_FUN(TexStorage1DEXT)
+#define glTexStorage2DEXT GLES2_GET_FUN(TexStorage2DEXT)
+#define glTexStorage3DEXT GLES2_GET_FUN(TexStorage3DEXT)
+#define glTextureStorage1DEXT GLES2_GET_FUN(TextureStorage1DEXT)
+#define glTextureStorage2DEXT GLES2_GET_FUN(TextureStorage2DEXT)
+#define glTextureStorage3DEXT GLES2_GET_FUN(TextureStorage3DEXT)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+#endif
+#endif
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+#endif
+
/* GL_EXT_texture_type_2_10_10_10_REV */
#ifndef GL_EXT_texture_type_2_10_10_10_REV
#define GL_EXT_texture_type_2_10_10_10_REV 1
#endif
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_EXT_texture_compression_dxt1 1
+/* GL_EXT_unpack_subimage */
+#ifndef GL_EXT_unpack_subimage
+#define GL_EXT_unpack_subimage 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * DMP extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_DMP_shader_binary */
+#ifndef GL_DMP_shader_binary
+#define GL_DMP_shader_binary 1
#endif
/*------------------------------------------------------------------------*
@@ -670,21 +1378,73 @@ typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GL
#ifndef GL_IMG_multisampled_render_to_texture
#define GL_IMG_multisampled_render_to_texture 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glRenderbufferStorageMultisampleIMG GLES2_GET_FUN(RenderbufferStorageMultisampleIMG)
+#define glFramebufferTexture2DMultisampleIMG GLES2_GET_FUN(FramebufferTexture2DMultisampleIMG)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
#endif
+#endif
typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
#endif
/*------------------------------------------------------------------------*
* NV extension functions
*------------------------------------------------------------------------*/
+/* GL_NV_coverage_sample */
+#ifndef GL_NV_coverage_sample
+#define GL_NV_coverage_sample 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glCoverageMaskNV GLES2_GET_FUN(CoverageMaskNV)
+#define glCoverageOperationNV GLES2_GET_FUN(CoverageOperationNV)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
+GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
+#endif
+#endif
+typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
+typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
+#endif
+
+/* GL_NV_depth_nonlinear */
+#ifndef GL_NV_depth_nonlinear
+#define GL_NV_depth_nonlinear 1
+#endif
+
+/* GL_NV_draw_buffers */
+#ifndef GL_NV_draw_buffers
+#define GL_NV_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glDrawBuffersNV GLES2_GET_FUN(DrawBuffersNV)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
+#endif
+#endif
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
+/* GL_NV_fbo_color_attachments */
+#ifndef GL_NV_fbo_color_attachments
+#define GL_NV_fbo_color_attachments 1
+#endif
+
/* GL_NV_fence */
#ifndef GL_NV_fence
#define GL_NV_fence 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glDeleteFencesNV GLES2_GET_FUN(DeleteFencesNV)
+#define glGenFencesNV GLES2_GET_FUN(GenFencesNV)
+#define glIsFenceNV GLES2_GET_FUN(IsFenceNV)
+#define glTestFenceNV GLES2_GET_FUN(TestFenceNV)
+#define glGetFenceivNV GLES2_GET_FUN(GetFenceivNV)
+#define glFinishFenceNV GLES2_GET_FUN(FinishFenceNV)
+#define glSetFenceNV GLES2_GET_FUN(SetFenceNV)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *);
GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint);
@@ -693,6 +1453,7 @@ GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint);
GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum);
#endif
+#endif
typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
@@ -702,35 +1463,80 @@ typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
#endif
-/* GL_NV_coverage_sample */
-#ifndef GL_NV_coverage_sample
-#define GL_NV_coverage_sample 1
+/* GL_NV_read_buffer */
+#ifndef GL_NV_read_buffer
+#define GL_NV_read_buffer 1
#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
-GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
+#define glReadBufferNV GLES2_GET_FUN(ReadBufferNV)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
#endif
-typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
-typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
+#endif
+typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
#endif
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_NV_depth_nonlinear 1
+/* GL_NV_read_buffer_front */
+#ifndef GL_NV_read_buffer_front
+#define GL_NV_read_buffer_front 1
+#endif
+
+/* GL_NV_read_depth */
+#ifndef GL_NV_read_depth
+#define GL_NV_read_depth 1
+#endif
+
+/* GL_NV_read_depth_stencil */
+#ifndef GL_NV_read_depth_stencil
+#define GL_NV_read_depth_stencil 1
+#endif
+
+/* GL_NV_read_stencil */
+#ifndef GL_NV_read_stencil
+#define GL_NV_read_stencil 1
+#endif
+
+/* GL_NV_texture_compression_s3tc_update */
+#ifndef GL_NV_texture_compression_s3tc_update
+#define GL_NV_texture_compression_s3tc_update 1
+#endif
+
+/* GL_NV_texture_npot_2D_mipmap */
+#ifndef GL_NV_texture_npot_2D_mipmap
+#define GL_NV_texture_npot_2D_mipmap 1
#endif
/*------------------------------------------------------------------------*
* QCOM extension functions
*------------------------------------------------------------------------*/
+/* GL_QCOM_alpha_test */
+#ifndef GL_QCOM_alpha_test
+#define GL_QCOM_alpha_test 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glAlphaFuncQCOM GLES2_GET_FUN(AlphaFuncQCOM)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
+#endif
+#endif
+typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
+#endif
+
/* GL_QCOM_driver_control */
#ifndef GL_QCOM_driver_control
#define GL_QCOM_driver_control 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glGetDriverControlsQCOM GLES2_GET_FUN(GetDriverControlsQCOM)
+#define glGetDriverControlStringQCOM GLES2_GET_FUN(GetDriverControlStringQCOM)
+#define glEnableDriverControlQCOM GLES2_GET_FUN(EnableDriverControlQCOM)
+#define glDisableDriverControlQCOM GLES2_GET_FUN(DisableDriverControlQCOM)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
#endif
+#endif
typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
@@ -741,6 +1547,16 @@ typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverCont
#ifndef GL_QCOM_extended_get
#define GL_QCOM_extended_get 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glExtGetTexturesQCOM GLES2_GET_FUN(ExtGetTexturesQCOM)
+#define glExtGetBuffersQCOM GLES2_GET_FUN(ExtGetBuffersQCOM)
+#define glExtGetRenderbuffersQCOM GLES2_GET_FUN(ExtGetRenderbuffersQCOM)
+#define glExtGetFramebuffersQCOM GLES2_GET_FUN(ExtGetFramebuffersQCOM)
+#define glExtGetTexLevelParameterivQCOM GLES2_GET_FUN(ExtGetTexLevelParameterivQCOM)
+#define glExtTexObjectStateOverrideiQCOM GLES2_GET_FUN(ExtTexObjectStateOverrideiQCOM)
+#define glExtGetTexSubImageQCOM GLES2_GET_FUN(ExtGetTexSubImageQCOM)
+#define glExtGetBufferPointervQCOM GLES2_GET_FUN(ExtGetBufferPointervQCOM)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
@@ -750,6 +1566,7 @@ GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLe
GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
#endif
+#endif
typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
@@ -764,11 +1581,18 @@ typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GL
#ifndef GL_QCOM_extended_get2
#define GL_QCOM_extended_get2 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glExtGetShadersQCOM GLES2_GET_FUN(ExtGetShadersQCOM)
+#define glExtGetProgramsQCOM GLES2_GET_FUN(ExtGetProgramsQCOM)
+#define glExtIsProgramBinaryQCOM GLES2_GET_FUN(ExtIsProgramBinaryQCOM)
+#define glExtGetProgramBinarySourceQCOM GLES2_GET_FUN(ExtGetProgramBinarySourceQCOM)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
#endif
+#endif
typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
@@ -789,13 +1613,226 @@ typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint progr
#ifndef GL_QCOM_tiled_rendering
#define GL_QCOM_tiled_rendering 1
#ifdef GL_GLEXT_PROTOTYPES
+#define glStartTilingQCOM GLES2_GET_FUN(StartTilingQCOM)
+#define glEndTilingQCOM GLES2_GET_FUN(EndTilingQCOM)
+
+#if !defined(GLES2_USE_CPP_BINDINGS)
GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
#endif
+#endif
typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
#endif
+/*------------------------------------------------------------------------*
+ * VIV extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_VIV_shader_binary */
+#ifndef GL_VIV_shader_binary
+#define GL_VIV_shader_binary 1
+#endif
+
+/* GL_EXT_framebuffer_multisample */
+#ifndef GL_EXT_framebuffer_multisample
+#define GL_EXT_framebuffer_multisample 1
+
+#ifndef GL_DRAW_FRAMEBUFFER_BINDING
+#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6
+#endif
+#ifndef GL_DRAW_FRAMEBUFFER_BINDING_EXT
+#define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_DRAW_FRAMEBUFFER_BINDING
+#endif
+#ifndef GL_FRAMEBUFFER_BINDING
+#define GL_FRAMEBUFFER_BINDING 0x8CA6
+#endif
+#ifndef GL_FRAMEBUFFER_BINDING_EXT
+#define GL_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING
+#endif
+#ifndef GL_RENDERBUFFER_BINDING
+#define GL_RENDERBUFFER_BINDING 0x8CA7
+#endif
+#ifndef GL_RENDERBUFFER_BINDING_EXT
+#define GL_RENDERBUFFER_BINDING_EXT GL_RENDERBUFFER_BINDING
+#endif
+#ifndef GL_READ_FRAMEBUFFER
+#define GL_READ_FRAMEBUFFER 0x8CA8
+#endif
+#ifndef GL_READ_FRAMEBUFFER_EXT
+#define GL_READ_FRAMEBUFFER_EXT GL_READ_FRAMEBUFFER
+#endif
+#ifndef GL_DRAW_FRAMEBUFFER
+#define GL_DRAW_FRAMEBUFFER 0x8CA9
+#endif
+#ifndef GL_DRAW_FRAMEBUFFER_EXT
+#define GL_DRAW_FRAMEBUFFER_EXT GL_DRAW_FRAMEBUFFER
+#endif
+#ifndef GL_READ_FRAMEBUFFER_BINDING
+#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
+#endif
+#ifndef GL_READ_FRAMEBUFFER_BINDING_EXT
+#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_READ_FRAMEBUFFER_BINDING
+#endif
+#ifndef GL_RENDERBUFFER_SAMPLES
+#define GL_RENDERBUFFER_SAMPLES 0x8CAB
+#endif
+#ifndef GL_RENDERBUFFER_SAMPLES_EXT
+#define GL_RENDERBUFFER_SAMPLES_EXT GL_RENDERBUFFER_SAMPLES
+#endif
+#ifndef GL_MAX_SAMPLES
+#define GL_MAX_SAMPLES 0x8D57
+#endif
+#ifndef GL_MAX_SAMPLES_EXT
+#define GL_MAX_SAMPLES_EXT GL_MAX_SAMPLES
+#endif
+#ifndef GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
+#endif
+#ifndef GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
+#endif
+
+#if 0 // Defined in GL_EXT_multisampled_render_to_texture
+#ifdef GL_GLEXT_PROTOTYPES
+#define glRenderbufferStorageMultisampleEXT GLES2_GET_FUN(RenderbufferStorageMultisampleEXT)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+#endif
+
+#ifndef GL_EXT_framebuffer_blit
+#define GL_EXT_framebuffer_blit 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glBlitFramebufferEXT GLES2_GET_FUN(BlitFramebufferEXT)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+
+/* GL_CHROMIUM_map_sub */
+#ifndef GL_CHROMIUM_map_sub
+#define GL_CHROMIUM_map_sub 1
+#ifndef GL_READ_ONLY
+#define GL_READ_ONLY 0x88B8
+#endif
+#ifndef GL_WRITE_ONLY
+#define GL_WRITE_ONLY 0x88B9
+#endif
+#ifdef GL_GLEXT_PROTOTYPES
+#define glMapBufferSubDataCHROMIUM GLES2_GET_FUN(MapBufferSubDataCHROMIUM)
+#define glUnmapBufferSubDataCHROMIUM GLES2_GET_FUN(UnmapBufferSubDataCHROMIUM)
+#define glMapTexSubImage2DCHROMIUM GLES2_GET_FUN(MapTexSubImage2DCHROMIUM)
+#define glUnmapTexSubImage2DCHROMIUM GLES2_GET_FUN(UnmapTexSubImage2DCHROMIUM)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void* GL_APIENTRY glMapBufferSubDataCHROMIUM (GLuint target, GLintptr offset, GLsizeiptr size, GLenum access);
+GL_APICALL void GL_APIENTRY glUnmapBufferSubDataCHROMIUM (const void* mem);
+GL_APICALL void* GL_APIENTRY glMapTexSubImage2DCHROMIUM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLenum access);
+GL_APICALL void GL_APIENTRY glUnmapTexSubImage2DCHROMIUM (const void* mem);
+#endif
+#endif
+typedef void* (GL_APIENTRYP PFNGLMAPBUFFERSUBDATACHROMIUM) (GLuint target, GLintptr offset, GLsizeiptr size, GLenum access);
+typedef void (GL_APIENTRYP PFNGLUNMAPBUFFERSUBDATACHROMIUM) (const void* mem);
+typedef void* (GL_APIENTRYP PFNGLMAPTEXSUBIMAGE2DCHROMIUM) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLenum access);
+typedef void (GL_APIENTRYP PFNGLUNMAPTEXSUBIMAGE2DCHROMIUM) (const void* mem);
+#endif
+
+/* GL_CHROMIUM_resize */
+#ifndef GL_CHROMIUM_resize
+#define GL_CHROMIUM_resize 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glResizeCHROMIUM GLES2_GET_FUN(ResizeCHROMIUM)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glResizeCHROMIUM (GLuint width, GLuint height);
+#endif
+#else
+typedef void (GL_APIENTRYP PFNGLRESIZECHROMIUM) (GLuint width, GLuint height);
+#endif
+#endif
+
+/* GL_CHROMIUM_request_extension */
+/*
+ * This extension allows other extensions to be turned on at run time.
+ *
+ * glGetRequestableExtensionsCHROMIUM returns a space-separated and
+ * null-terminated string containing all of the extension names that
+ * can be successfully requested on the current hardware. This may
+ * include the names of extensions that have already been enabled.
+ *
+ * glRequestExtensionCHROMIUM requests that the given extension be
+ * enabled. Call glGetString(GL_EXTENSIONS) to find out whether the
+ * extension request succeeded.
+ */
+#ifndef GL_CHROMIUM_request_extension
+#define GL_CHROMIUM_request_extension 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glGetRequestableExtensionsCHROMIUM GLES2_GET_FUN(GetRequestableExtensionsCHROMIUM)
+#define glRequestExtensionCHROMIUM GLES2_GET_FUN(RequestExtensionCHROMIUM)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL const GLchar* GL_APIENTRY glGetRequestableExtensionsCHROMIUM (void);
+GL_APICALL void GL_APIENTRY glRequestExtensionCHROMIUM (const GLchar *extension);
+#endif
+#else
+typedef const GLchar* (GL_APIENTRYP PFNGLGETREQUESTABLEEXTENSIONSCHROMIUM) (void);
+typedef void (GL_APIENTRYP PFNGLREQUESTEXTENSIONCHROMIUM) (const GLchar *extension);
+#endif
+#endif
+
+/* GL_CHROMIUM_rate_limit_offscreen_context */
+/*
+ * This extension will block if the calling context has gotten more than two
+ * glRateLimit calls ahead of the GPU process. This keeps the client in sync
+ * with the GPU without having to call swapbuffers, which has potentially
+ * undesirable side effects.
+ */
+#ifndef GL_CHROMIUM_rate_limit_offscreen_context
+#define GL_CHROMIUM_rate_limit_offscreen_context 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glRateLimitOffscreenContextCHROMIUM GLES2_GET_FUN(RateLimitOffscreenContextCHROMIUM)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glRateLimitOffscreenContextCHROMIUM (void);
+#endif
+#else
+typedef void (GL_APIENTRYP PFNGLRATELIMITOFFSCREENCONTEXTCHROMIUM) ();
+#endif
+#endif
+
+/* GL_CHROMIUM_get_multiple */
+/*
+ * This extension provides functions for quering multiple GL state with a single
+ * call.
+ */
+#ifndef GL_CHROMIUM_get_multiple
+#define GL_CHROMIUM_get_multiple 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glGetMultipleIntegervCHROMIUM GLES2_GET_FUN(GetMultipleIntegervCHROMIUM)
+#define glGetProgramInfoCHROMIUM GLES2_GET_FUN(GetProgramInfovCHROMIUM)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glGetMultipleIntegervCHROMIUM (const GLenum* pnames, GLuint count, GLint* results, GLsizeiptr size);
+GL_APICALL void GL_APIENTRY glGetProgramInfoCHROMIUM (GLuint program, GLsizei bufsize, GLsizei* size, void* info);
+#endif
+#else
+typedef void (GL_APIENTRYP PFNGLGETMULTIPLEINTEGERVCHROMIUM) ();
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOCHROMIUM) ();
+#endif
+#endif
+
+/* GL_CHROMIUM_flipy */
+/*
+ * This extension provides GL_UNPACK_FLIP_Y_CHROMIUM as a parameter to
+ * glPixelStorei. When true images submitted to glTexImage2D and glTexSubImage2D
+ * are flipped vertically.
+ */
+#ifndef GL_CHROMIUM_flipy
+#define GL_CHROMIUM_flipy 1
+#define GL_UNPACK_FLIP_Y_CHROMIUM 0x9240
+#endif
+
/* GL_CHROMIUM_texture_compression_dxt3 */
#ifndef GL_CHROMIUM_texture_compression_dxt3
#define GL_CHROMIUM_texture_compression_dxt3 1
@@ -808,6 +1845,143 @@ typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
#endif
+/* GL_CHROMIUM_enable_feature */
+#ifndef GL_CHROMIUM_enable_feature
+#define GL_CHROMIUM_enable_feature 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glEnableFeatureCHROMIUM GLES2_GET_FUN(EnableFeatureCHROMIUM)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL GLboolean GL_APIENTRY glEnableFeatureCHROMIUM (const GLchar *feature);
+#endif
+#else
+typedef void (GL_APIENTRYP PFNGLENABLEFEATURECHROMIUM) (const GLchar *feature);
+#endif
+#endif
+
+/* GL_CHROMIUM_post_sub_buffer */
+/* This extension is modeled after EGL_NV_post_sub_buffer and
+ * GLX_MESA_copy_sub_buffer. It's like a SwapBuffers, but it pushes a region
+ * of the back buffer to the front buffer.
+ */
+#ifndef GL_CHROMIUM_post_sub_buffer
+#define GL_CHROMIUM_post_sub_buffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glPostSubBufferCHROMIUM GLES2_GET_FUN(PostSubBufferCHROMIUM)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glPostSubBufferCHROMIUM (GLint x, GLint y, GLint width, GLint height);
+#endif
+#else
+typedef void (GL_APIENTRYP PFNGLPOSTSUBBUFFERCHROMIUM) (GLint x, GLint y, GLint width, GLint height);
+#endif
+#endif
+
+/* GL_CHROMIUM_front_buffer_cached */
+/* This extension implies that there is a cache of the front buffer of the
+ * surface supporting this extension (e.g. on OSX the front buffer
+ * is often backed by an IOSurface). Hence we do not need to redraw
+ * (via a SwapBuffers) in order to display the last frame.
+ */
+#ifndef GL_CHROMIUM_front_buffer_cached
+#define GL_CHROMIUM_front_buffer_cached 1
+#endif
+
+/* GL_ARB_robustness */
+/* This extension is subsetted for the moment, incorporating only the
+ * enums necessary to describe the reasons that we might encounter for
+ * losing the context. The entry point querying the reset status is
+ * not yet incorporated; to do so, a spec will be needed of a GLES2
+ * subset of GL_ARB_robustness.
+ */
+#ifndef GL_ARB_robustness
+#define GL_ARB_robustness 1
+#ifndef GL_GUILTY_CONTEXT_RESET_ARB
+#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253
+#endif
+#ifndef GL_INNOCENT_CONTEXT_RESET_ARB
+#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
+#endif
+#ifndef GL_UNKNOWN_CONTEXT_RESET_ARB
+#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
+#endif
+#endif
+
+/* GL_ANGLE_translated_shader_source */
+#ifndef GL_ANGLE_translated_shader_source
+#define GL_ANGLE_translated_shader_source 1
+#ifndef GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE
+#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
+#endif
+#ifdef GL_GLEXT_PROTOTYPES
+#define glGetTranslatedShaderSourceANGLE GLES2_GET_FUN(GetTranslatedShaderSourceANGLE)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
+#endif
+#endif
+typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
+#endif
+
+/* GL_ARB_texture_rectangle */
+/* Exposes only the subset necessary to support GL_CHROMIUM_iosurface.
+ */
+#ifndef GL_ARB_texture_rectangle
+#define GL_ARB_texture_rectangle 1
+#ifndef GL_TEXTURE_RECTANGLE_ARB
+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
+#endif
+#ifndef GL_TEXTURE_BINDING_RECTANGLE_ARB
+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
+#endif
+#ifndef GL_SAMPLER_2D_RECT_ARB
+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
+#endif
+#endif
+
+/* GL_CHROMIUM_iosurface */
+/* Exposes the Mac OS-specfic CGLTexImageIOSurface2D entry point as a
+ * Chromium extension in the cross-platform API. Binds the IOSurface with
+ * the given ID (an IOSurfaceID) to the texture bound to the given target.
+ * To avoid needing to expose extraneous enums, assumes internal format
+ * RGBA, format BGRA, and type UNSIGNED_INT_8_8_8_8_REV.
+ */
+#ifndef GL_CHROMIUM_iosurface
+#define GL_CHROMIUM_iosurface 1
+#ifdef GL_GLEXT_PROTOTYPES
+#define glTexImageIOSurface2DCHROMIUM GLES2_GET_FUN(TexImageIOSurface2DCHROMIUM)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glTexImageIOSurface2DCHROMIUM (GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId, GLuint plane);
+#endif
+#else
+typedef void (GL_APIENTRYP PFNGLTEXIMAGEIOSURFACE2DCHROMIUM) (GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId, GLuint plane);
+#endif
+#endif
+
+/* GL_CHROMIUM_copy_texture */
+#ifndef GL_CHROMIUM_copy_texture
+#ifndef GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM
+#define GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM 0x9241
+#endif
+#ifndef GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM
+#define GL_UNPACK_COLORSPACE_CONVERSION_CHROMIUM 0x9243
+#endif
+#ifdef GL_GLEXT_PROTOTYPES
+#define glCopyTextureCHROMIUM GLES2_GET_FUN(CopyTextureCHROMIUM)
+#if !defined(GLES2_USE_CPP_BINDINGS)
+GL_APICALL void GL_APIENTRY glCopyTextureCHROMIUM (GLenum target, GLenum source_id, GLenum dest_id, GLint level);
+#endif
+#else
+typedef void (GL_APIENTRYP PFNGLCOPYTEXTURECHROMIUM) (GLenum target, GLenum source_id, GLenum dest_id, GLint level);
+#endif
+#endif
+
+/* GL_CHROMIUM_command_buffer_query */
+/* Exposes GL_CHROMIUM_command_buffer_query.
+ */
+#ifndef GL_CHROMIUM_command_buffer_query
+#define GL_CHROMIUM_command_buffer_query 1
+// TODO(gman): Get official numbers for these constants.
+#define GL_COMMANDS_ISSUED_CHROMIUM 0x84F2
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/ppapi/native_client/src/shared/ppapi/nacl.scons b/ppapi/native_client/src/shared/ppapi/nacl.scons
index c6bc96d..cb6fb00 100644
--- a/ppapi/native_client/src/shared/ppapi/nacl.scons
+++ b/ppapi/native_client/src/shared/ppapi/nacl.scons
@@ -39,6 +39,8 @@ env.Append(CPPPATH=[
'$SOURCE_ROOT/ppapi/lib/gl/include',
])
+env.Prepend(CPPDEFINES=['GL_GLEXT_PROTOTYPES'])
+
# Load ppapi_gl.gypi
ppapi_gl_gypi = gyp_extract.LoadGypFile(
env.File('$SOURCE_ROOT/ppapi/ppapi_gl.gypi').abspath)
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.cc b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.cc
index e3959eb..bf0c5c4 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.cc
@@ -169,8 +169,8 @@ const void* BrowserPpp::GetPluginInterface(const char* interface_name) {
strcmp(interface_name, PPP_INSTANCE_INTERFACE_1_1) == 0) {
srpc_result =
PppRpcClient::PPP_GetInterface(main_channel_,
- PPP_INSTANCE_INTERFACE_1_0,
- &exports_interface_name);
+ const_cast<char *>(PPP_INSTANCE_INTERFACE_1_0),
+ &exports_interface_name);
}
const void* ppp_interface = NULL;
diff --git a/ppapi/native_client/tests/ppapi/nacl.scons b/ppapi/native_client/tests/ppapi/nacl.scons
index 99adc8d..b3aaa1f 100644
--- a/ppapi/native_client/tests/ppapi/nacl.scons
+++ b/ppapi/native_client/tests/ppapi/nacl.scons
@@ -7,7 +7,7 @@ import gyp_extract
Import('env')
-env.Prepend(CPPDEFINES=['XP_UNIX'])
+env.Prepend(CPPDEFINES=['XP_UNIX', 'GL_GLEXT_PROTOTYPES'])
# TODO(robertm): those should not be necessary once we go -std=c99
env.FilterOut(CFLAGS=['-pedantic'])
diff --git a/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/nacl.scons b/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/nacl.scons
index 70fba04..87dc43a 100644
--- a/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/nacl.scons
+++ b/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/nacl.scons
@@ -7,7 +7,7 @@
Import('env')
-env.Prepend(CPPDEFINES=['XP_UNIX'])
+env.Prepend(CPPDEFINES=['XP_UNIX', 'GL_GLEXT_PROTOTYPES'])
env.Replace(TEST_DIR='${SOURCE_ROOT}/ppapi/native_client/tests/ppapi_browser/' +
'ppb_graphics3d')
diff --git a/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.cc b/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.cc
index 7ecd172..789ad35 100644
--- a/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.cc
+++ b/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.cc
@@ -6,6 +6,7 @@
// TODO(nfullagar): More comprehensive testing of the PPAPI interface.
#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
#include <string.h>
#include <sys/time.h>
@@ -129,6 +130,38 @@ void TestBasicSetup() {
TEST_PASSED;
}
+// Test basic extensions.
+// Simple test, mostly to see if extensions can compile, link, and return
+// something that makes sense without crashing. The build environment must
+// define GL_GLEXT_PROTOTYPES to enable this test.
+void TestBasicExtensions() {
+#if defined(GL_GLEXT_PROTOTYPES)
+ int32_t attribs[] = {
+ PP_GRAPHICS3DATTRIB_WIDTH, kWidth,
+ PP_GRAPHICS3DATTRIB_HEIGHT, kHeight,
+ PP_GRAPHICS3DATTRIB_DEPTH_SIZE, 32,
+ PP_GRAPHICS3DATTRIB_NONE};
+ PP_Resource graphics3d_id = PPBGraphics3D()->
+ Create(pp_instance(), kInvalidResource, attribs);
+ EXPECT(graphics3d_id != kInvalidResource);
+ glSetCurrentContextPPAPI(graphics3d_id);
+ EXPECT(glGetString(GL_VERSION) != NULL);
+ const char* ext = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
+ if (strstr(ext, "GL_EXT_occlusion_query_boolean")) {
+ GLuint a_query;
+ glGenQueriesEXT(1, &a_query);
+ EXPECT(0 != a_query);
+ }
+ if (strstr(ext, "GL_ANGLE_instanced_arrays")) {
+ glDrawArraysInstancedANGLE(GL_TRIANGLE_STRIP, 0, 0, 0);
+ }
+ glSetCurrentContextPPAPI(0);
+ PPBCore()->ReleaseResource(graphics3d_id);
+#endif
+ TEST_PASSED;
+}
+
+
struct RenderInfo {
PP_Resource graphics3d_id;
int32_t frame_counter;
@@ -275,6 +308,7 @@ void SetupTests() {
RegisterTest("TestIsGraphics3D", TestIsGraphics3D);
RegisterTest("Test_glInitializePPAPI", Test_glInitializePPAPI);
RegisterTest("TestBasicSetup", TestBasicSetup);
+ RegisterTest("TestBasicExtensions", TestBasicExtensions);
RegisterTest("TestSwapBuffers", TestSwapBuffers);
RegisterTest("TestResizeBuffersWithoutDepthBuffer",
TestResizeBuffersWithoutDepthBuffer);
diff --git a/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.html b/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.html
index d0ffd8b..6fa632b 100644
--- a/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.html
+++ b/ppapi/native_client/tests/ppapi_browser/ppb_graphics3d/ppapi_ppb_graphics3d.html
@@ -38,6 +38,9 @@ function setupTests(tester, plugin) {
tester.addAsyncTest('Basic Setup', function(test) {
testAndAssertStatus(test, 'TestBasicSetup');
});
+ tester.addAsyncTest('Basic Extensions', function(test) {
+ testAndAssertStatus(test, 'TestBasicExtensions');
+ });
tester.addAsyncTest('PPB_Graphics3D::SwapBuffers', function(test) {
testAndAssertStatus(test, 'TestSwapBuffers', 'TestSwapCallback:PASSED');
});
diff --git a/ppapi/native_client/tests/ppapi_gles_book/nacl.scons b/ppapi/native_client/tests/ppapi_gles_book/nacl.scons
index 8e73806..284c573 100644
--- a/ppapi/native_client/tests/ppapi_gles_book/nacl.scons
+++ b/ppapi/native_client/tests/ppapi_gles_book/nacl.scons
@@ -7,7 +7,7 @@
Import('env')
-env.Prepend(CPPDEFINES=['XP_UNIX'])
+env.Prepend(CPPDEFINES=['XP_UNIX', 'GL_GLEXT_PROTOTYPES'])
env.Replace(TEST_DIR='${SOURCE_ROOT}/ppapi/native_client/tests/' +
'ppapi_gles_book/')