diff options
author | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-06 18:07:24 +0000 |
---|---|---|
committer | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-06 18:07:24 +0000 |
commit | c2f8c84089f32aac6377c95da14d52153a165b39 (patch) | |
tree | 91e39d58e5b54b21d2f6070654a0e89208cd5236 /gpu/GLES2 | |
parent | 5ac981e18bcad738dbe3e34a59c5814a9f00ea08 (diff) | |
download | chromium_src-c2f8c84089f32aac6377c95da14d52153a165b39.zip chromium_src-c2f8c84089f32aac6377c95da14d52153a165b39.tar.gz chromium_src-c2f8c84089f32aac6377c95da14d52153a165b39.tar.bz2 |
Exposed support for dynamically enabling extensions in command buffer
implementation via new glGetRequestableExtensionsCHROMIUM and
glRequestExtensionCHROMIUM entry points. These entry points are needed in
order to allow WebGL to both query the available extensions and enable them
individually.
Added these entry points to WebGraphicsContext3DCommandBufferImpl. A
subsequent WebKit checkin under https://bugs.webkit.org/show_bug.cgi?id=40316
will utilize them and implement the OES_texture_float extension for WebGL.
BUG=none
TEST=none (ran with new oes-texture-float.html WebGL conformance test)
Review URL: http://codereview.chromium.org/5626008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/GLES2')
-rw-r--r-- | gpu/GLES2/gl2ext.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gpu/GLES2/gl2ext.h b/gpu/GLES2/gl2ext.h index 287b122..4a1f828 100644 --- a/gpu/GLES2/gl2ext.h +++ b/gpu/GLES2/gl2ext.h @@ -922,6 +922,34 @@ 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 + #ifdef __cplusplus } |