Remove dependence on platform GL headers. Remove code that attempts to infer GL function pointers on various platforms. Instead add platform-specific implementations for Windows and Mac. (GLX coming)

Review URL: http://codereview.appspot.com/4354048/

git-svn-id: http://skia.googlecode.com/svn/trunk@1045 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGpuFactory.cpp b/gpu/src/GrGpuFactory.cpp
index eb024f7..1715333 100644
--- a/gpu/src/GrGpuFactory.cpp
+++ b/gpu/src/GrGpuFactory.cpp
@@ -29,10 +29,19 @@
 #include "GrGpuGLShaders2.h"
 
 GrGpu* GrGpu::Create(Engine engine, Platform3DContext context3D) {
-    // If no GL bindings have been installed, fall-back to calling the
-    // GL functions that have been linked with the executable.
-    if (!GrGLGetGLInterface())
-        GrGLSetDefaultGLInterface();
+
+    if (kOpenGL_Shaders_Engine == engine ||
+        kOpenGL_Fixed_Engine == engine) {
+        // If no GL bindings have been installed, fall-back to calling the
+        // GL functions that have been linked with the executable.
+        if (!GrGLGetGLInterface()) {
+            GrGLSetDefaultGLInterface();
+            // If there is no platform-default then just fail.
+            if (!GrGLGetGLInterface()) {
+                return NULL;
+            }
+        }
+    }
 
     GrGpu* gpu = NULL;