From 380aba8992ae92cd78486b0672ef748912032cf5 Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Wed, 21 Sep 2011 18:15:39 +0000 Subject: Fixes issues where WGC3D based on OSMesa GL implementation isn't allowing OES extensions that are supported. TEST=none BUG=none Review URL: http://codereview.chromium.org/7980034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102135 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/gfx/gl/gl_implementation.cc | 5 +++++ ui/gfx/gl/gl_implementation.h | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'ui/gfx/gl') diff --git a/ui/gfx/gl/gl_implementation.cc b/ui/gfx/gl/gl_implementation.cc index 21788c0..ae4b2d6 100644 --- a/ui/gfx/gl/gl_implementation.cc +++ b/ui/gfx/gl/gl_implementation.cc @@ -106,6 +106,11 @@ GLImplementation GetGLImplementation() { return g_gl_implementation; } +bool HasDesktopGLFeatures() { + return kGLImplementationDesktopGL == g_gl_implementation || + kGLImplementationOSMesaGL == g_gl_implementation; +} + void AddGLNativeLibrary(base::NativeLibrary library) { DCHECK(library); diff --git a/ui/gfx/gl/gl_implementation.h b/ui/gfx/gl/gl_implementation.h index aab0bdf..9024ca1 100644 --- a/ui/gfx/gl/gl_implementation.h +++ b/ui/gfx/gl/gl_implementation.h @@ -42,6 +42,10 @@ void SetGLImplementation(GLImplementation implementation); // Get the current GL implementation. GL_EXPORT GLImplementation GetGLImplementation(); +// Does the underlying GL support all features from Desktop GL 2.0 that were +// removed from the ES 2.0 spec without requiring specific extension strings. +GL_EXPORT bool HasDesktopGLFeatures(); + // Get the GL implementation with a given name. GLImplementation GetNamedGLImplementation(const std::wstring& name); -- cgit v1.1