summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/feature_info.cc
diff options
context:
space:
mode:
authorkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-06 18:07:24 +0000
committerkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-06 18:07:24 +0000
commitc2f8c84089f32aac6377c95da14d52153a165b39 (patch)
tree91e39d58e5b54b21d2f6070654a0e89208cd5236 /gpu/command_buffer/service/feature_info.cc
parent5ac981e18bcad738dbe3e34a59c5814a9f00ea08 (diff)
downloadchromium_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/command_buffer/service/feature_info.cc')
-rw-r--r--gpu/command_buffer/service/feature_info.cc21
1 files changed, 16 insertions, 5 deletions
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index cf755d8..5d9403e 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -215,21 +215,32 @@ void FeatureInfo::AddFeatures(const char* desired_features) {
bool enable_texture_float_linear = false;
bool enable_texture_half_float = false;
bool enable_texture_half_float_linear = false;
- if (ext.HaveAndDesire("GL_ARB_texture_float")) {
+
+ bool have_arb_texture_float = ext.Have("GL_ARB_texture_float");
+
+ if (have_arb_texture_float && ext.Desire("GL_ARB_texture_float")) {
enable_texture_float = true;
enable_texture_float_linear = true;
enable_texture_half_float = true;
enable_texture_half_float_linear = true;
} else {
- if (ext.HaveAndDesire("GL_OES_texture_float")) {
+ if (ext.HaveAndDesire("GL_OES_texture_float") ||
+ (have_arb_texture_float &&
+ ext.Desire("GL_OES_texture_float"))) {
enable_texture_float = true;
- if (ext.HaveAndDesire("GL_OES_texture_float_linear")) {
+ if (ext.HaveAndDesire("GL_OES_texture_float_linear") ||
+ (have_arb_texture_float &&
+ ext.Desire("GL_OES_texture_float_linear"))) {
enable_texture_float_linear = true;
}
}
- if (ext.HaveAndDesire("GL_OES_texture_half_float")) {
+ if (ext.HaveAndDesire("GL_OES_texture_half_float") ||
+ (have_arb_texture_float &&
+ ext.Desire("GL_OES_texture_half_float"))) {
enable_texture_half_float = true;
- if (ext.HaveAndDesire("GL_OES_texture_half_float_linear")) {
+ if (ext.HaveAndDesire("GL_OES_texture_half_float_linear") ||
+ (have_arb_texture_float &&
+ ext.Desire("GL_OES_texture_half_float_linear"))) {
enable_texture_half_float_linear = true;
}
}