Remove the compile-time selection of the GL implementation based on the
GR_SUPPORT_GLDESKTOP family of macros.
Support for the platform is configured dynamically, by querying the
fBindingsExported member of active GrGLInterface instance.
Review: http://codereview.appspot.com/4298048/
git-svn-id: http://skia.googlecode.com/svn/trunk@960 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/include/GrGLInterface.h b/gpu/include/GrGLInterface.h
index 7bee111..7a44f4f 100644
--- a/gpu/include/GrGLInterface.h
+++ b/gpu/include/GrGLInterface.h
@@ -63,6 +63,12 @@
typedef double GrGLclampd;
typedef void GrGLvoid;
+enum GrGLBinding {
+ kDesktop_GrGLBinding = 0x01,
+ kES1_GrGLBinding = 0x02,
+ kES2_GrGLBinding = 0x04
+};
+
extern "C" {
/*
* The following interface exports the OpenGL entry points used by the system.
@@ -178,6 +184,10 @@
typedef GrGLvoid* (GR_GL_FUNCTION_TYPE *GrGLMapBufferProc)(GrGLenum target, GrGLenum access);
typedef GrGLboolean (GR_GL_FUNCTION_TYPE *GrGLUnmapBufferProc)(GrGLenum target);
+ // Indicator variable specifying the type of GL implementation
+ // exported: GLES{1|2} or Desktop.
+ GrGLBinding fBindingsExported;
+
GrGLActiveTextureProc fActiveTexture;
GrGLAttachShaderProc fAttachShader;
GrGLBindAttribLocationProc fBindAttribLocation;