Bug 546517: The layers OpenGL backend. r=vlad
authorBas Schouten <bschouten@mozilla.com>
Tue, 30 Mar 2010 06:48:52 +0200
changeset 39997 4981947357e5eb1c32880a6c157874a61964237e
parent 39996 7f2aff4309a56a7106c7ed3b192cb50d9d517a97
child 39998 7b15145d81ac969c812cacfd7103edc92a4654e1
push idunknown
push userunknown
push dateunknown
reviewersvlad
bugs546517
milestone1.9.3a4pre
Bug 546517: The layers OpenGL backend. r=vlad
gfx/layers/Makefile.in
gfx/layers/opengl/ContainerLayerOGL.cpp
gfx/layers/opengl/ContainerLayerOGL.h
gfx/layers/opengl/ImageLayerOGL.cpp
gfx/layers/opengl/ImageLayerOGL.h
gfx/layers/opengl/LayerManagerOGL.cpp
gfx/layers/opengl/LayerManagerOGL.h
gfx/layers/opengl/LayerManagerOGLShaders.h
gfx/layers/opengl/ThebesLayerOGL.cpp
gfx/layers/opengl/ThebesLayerOGL.h
gfx/layers/opengl/glDefs.h
gfx/layers/opengl/glWrapper.cpp
gfx/layers/opengl/glWrapper.h
--- a/gfx/layers/Makefile.in
+++ b/gfx/layers/Makefile.in
@@ -36,36 +36,43 @@
 # ***** END LICENSE BLOCK *****
 
 DEPTH       = ../..
 topsrcdir   = @top_srcdir@
 srcdir      = @srcdir@
 VPATH       = \
   $(srcdir) \
   $(srcdir)/basic \
+  $(srcdir)/opengl \
   $(NULL)
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE         = layers
 LIBRARY_NAME   = layers
 EXPORT_LIBRARY = 1
 LIBXUL_LIBRARY = 1
 
 DEFINES += -DIMPL_THEBES
 
 EXPORTS = \
         BasicLayers.h \
         ImageLayers.h \
         Layers.h \
+        LayerManagerOGL.h \
         $(NULL)
 
 CPPSRCS = \
         BasicImages.cpp \
         BasicLayers.cpp \
+        glWrapper.cpp \
+        LayerManagerOGL.cpp \
+        ThebesLayerOGL.cpp \
+        ContainerLayerOGL.cpp \
+        ImageLayerOGL.cpp \
         $(NULL)
 
 EXTRA_DSO_LIBS = \
         gkgfx \
         thebes \
         $(NULL)
 
 EXTRA_DSO_LDOPTS += \
new file mode 100644
--- /dev/null
+++ b/gfx/layers/opengl/ContainerLayerOGL.cpp
@@ -0,0 +1,239 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Corporation code.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Bas Schouten <bschouten@mozilla.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "ContainerLayerOGL.h"
+
+#include "glWrapper.h"
+
+namespace mozilla {
+namespace layers {
+
+ContainerLayerOGL::ContainerLayerOGL(LayerManager *aManager)
+  : ContainerLayer(aManager, NULL)
+{
+  mImplData = static_cast<LayerOGL*>(this);
+}
+
+const nsIntRect&
+ContainerLayerOGL::GetVisibleRect()
+{
+  return mVisibleRect;
+}
+
+void
+ContainerLayerOGL::SetVisibleRegion(const nsIntRegion &aRegion)
+{
+  mVisibleRect = aRegion.GetBounds();
+}
+
+void
+ContainerLayerOGL::InsertAfter(Layer* aChild, Layer* aAfter)
+{
+  LayerOGL *newChild = static_cast<LayerOGL*>(aChild->ImplData());
+  aChild->SetParent(this);
+  if (!aAfter) {
+    LayerOGL *oldFirstChild = GetFirstChildOGL();
+    mFirstChild = newChild->GetLayer();
+    newChild->SetNextSibling(oldFirstChild);
+    return;
+  }
+  for (LayerOGL *child = GetFirstChildOGL(); 
+    child; child = child->GetNextSibling()) {
+    if (aAfter == child->GetLayer()) {
+      LayerOGL *oldNextSibling = child->GetNextSibling();
+      child->SetNextSibling(newChild);
+      child->GetNextSibling()->SetNextSibling(oldNextSibling);
+      return;
+    }
+  }
+  NS_WARNING("Failed to find aAfter layer!");
+}
+
+void
+ContainerLayerOGL::RemoveChild(Layer *aChild)
+{
+  if (GetFirstChild() == aChild) {
+    mFirstChild = GetFirstChildOGL()->GetNextSibling()->GetLayer();
+    return;
+  }
+  LayerOGL *lastChild = NULL;
+  for (LayerOGL *child = GetFirstChildOGL(); child; 
+    child = child->GetNextSibling()) {
+    if (child->GetLayer() == aChild) {
+      // We're sure this is not our first child. So lastChild != NULL.
+      lastChild->SetNextSibling(child->GetNextSibling());
+      child->SetNextSibling(NULL);
+      child->GetLayer()->SetParent(NULL);
+      return;
+    }
+    lastChild = child;
+  }
+}
+
+LayerOGL::LayerType
+ContainerLayerOGL::GetType()
+{
+  return TYPE_CONTAINER;
+}
+
+Layer*
+ContainerLayerOGL::GetLayer()
+{
+  return this;
+}
+
+LayerOGL*
+ContainerLayerOGL::GetFirstChildOGL()
+{
+  if (!mFirstChild) {
+    return nsnull;
+  }
+  return static_cast<LayerOGL*>(mFirstChild->ImplData());
+}
+
+void
+ContainerLayerOGL::RenderLayer(int aPreviousFrameBuffer)
+{
+  /**
+   * Setup our temporary texture for rendering the contents of this container.
+   */
+  GLuint containerSurface;
+
+  sglWrapper.GenTextures(1, &containerSurface);
+  sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, containerSurface);
+  sglWrapper.TexImage2D(LOCAL_GL_TEXTURE_2D,
+                        0,
+                        LOCAL_GL_RGBA,
+                        mVisibleRect.width,
+                        mVisibleRect.height,
+                        0,
+                        LOCAL_GL_BGRA,
+                        LOCAL_GL_UNSIGNED_BYTE,
+                        NULL);
+
+  /**
+   * Create the framebuffer and bind it to make our content render into our
+   * framebuffer.
+   */
+  GLuint frameBuffer;
+  sglWrapper.GenFramebuffersEXT(1, &frameBuffer);
+  sglWrapper.BindFramebufferEXT(LOCAL_GL_FRAMEBUFFER_EXT, frameBuffer);
+  sglWrapper.FramebufferTexture2DEXT(LOCAL_GL_FRAMEBUFFER_EXT,
+                                     LOCAL_GL_COLOR_ATTACHMENT0_EXT,
+                                     LOCAL_GL_TEXTURE_2D,
+                                     containerSurface,
+                                     0);
+
+  RGBLayerProgram *rgbProgram =
+    static_cast<LayerManagerOGL*>(mManager)->GetRGBLayerProgram();
+  YCbCrLayerProgram *yCbCrProgram =
+    static_cast<LayerManagerOGL*>(mManager)->GetYCbCrLayerProgram();
+
+  /**
+   * Store old shader program variables and set the ones used for rendering
+   * this container's content.
+   */
+  
+  rgbProgram->Activate();
+  rgbProgram->PushRenderTargetOffset((GLfloat)GetVisibleRect().x,
+                                     (GLfloat)GetVisibleRect().y);
+  yCbCrProgram->Activate();
+  yCbCrProgram->PushRenderTargetOffset((GLfloat)GetVisibleRect().x,
+                                       (GLfloat)GetVisibleRect().y);
+  
+  /**
+   * Render this container's contents.
+   */
+  LayerOGL *layerToRender = GetFirstChildOGL();
+  while (layerToRender) {
+    const nsIntRect *clipRect = layerToRender->GetLayer()->GetClipRect();
+    if (clipRect) {
+      sglWrapper.Scissor(clipRect->x - GetVisibleRect().x,
+                clipRect->y - GetVisibleRect().y,
+                clipRect->width,
+                clipRect->height);
+    } else {
+      sglWrapper.Scissor(0, 0, GetVisibleRect().width, GetVisibleRect().height);
+    }
+
+    layerToRender->RenderLayer(frameBuffer);
+    layerToRender = layerToRender->GetNextSibling();
+  }
+
+  // Unbind the current framebuffer and rebind the previous one.
+  sglWrapper.BindFramebufferEXT(LOCAL_GL_FRAMEBUFFER_EXT, aPreviousFrameBuffer);
+  sglWrapper.DeleteFramebuffersEXT(1, &frameBuffer);
+
+  // Restore old shader program variables.
+  yCbCrProgram->Activate();
+  yCbCrProgram->PopRenderTargetOffset();
+
+  rgbProgram->Activate();
+  rgbProgram->PopRenderTargetOffset();
+
+  /**
+   * Render the contents of this container to our destination.
+   */
+  float quadTransform[4][4];
+  /*
+   * Matrix to transform the <0.0,0.0>, <1.0,1.0> quad to the correct position
+   * and size.
+   */
+  memset(&quadTransform, 0, sizeof(quadTransform));
+  quadTransform[0][0] = (float)GetVisibleRect().width;
+  quadTransform[1][1] = (float)GetVisibleRect().height;
+  quadTransform[2][2] = 1.0f;
+  quadTransform[3][0] = (float)GetVisibleRect().x;
+  quadTransform[3][1] = (float)GetVisibleRect().y;
+  quadTransform[3][3] = 1.0f;
+
+  rgbProgram->SetLayerQuadTransform(&quadTransform[0][0]);
+
+  sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, containerSurface);
+
+  rgbProgram->SetLayerOpacity(GetOpacity());
+  rgbProgram->SetLayerTransform(&mTransform._11);
+  rgbProgram->Apply();
+
+  sglWrapper.DrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
+
+  // Clean up resources.
+  sglWrapper.DeleteTextures(1, &containerSurface);
+}
+
+} /* layers */
+} /* mozilla */
new file mode 100644
--- /dev/null
+++ b/gfx/layers/opengl/ContainerLayerOGL.h
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Corporation code.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Bas Schouten <bschouten@mozilla.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef GFX_CONTAINERLAYEROGL_H
+#define GFX_CONTAINERLAYEROGL_H
+
+#include "Layers.h"
+#include "LayerManagerOGL.h"
+
+namespace mozilla {
+namespace layers {
+
+class ContainerLayerOGL : public ContainerLayer, 
+                          public LayerOGL
+{
+public:
+  ContainerLayerOGL(LayerManager *aManager);
+
+  const nsIntRect &GetVisibleRect();
+
+  /** ContainerLayer implementation */
+  void SetVisibleRegion(const nsIntRegion& aRegion);
+
+  void InsertAfter(Layer* aChild, Layer* aAfter);
+
+  void RemoveChild(Layer* aChild);
+
+  /** LayerOGL implementation */
+  LayerType GetType();
+
+  Layer* GetLayer();
+
+  LayerOGL* GetFirstChildOGL();
+
+  PRBool IsEmpty();
+
+  void RenderLayer(int aPreviousFrameBuffer);
+private:
+  nsIntRect mVisibleRect;
+
+  GLuint mTexture;
+};
+
+} /* layers */
+} /* mozilla */
+
+#endif /* GFX_CONTAINERLAYEROGL_H */
new file mode 100644
--- /dev/null
+++ b/gfx/layers/opengl/ImageLayerOGL.cpp
@@ -0,0 +1,331 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Corporation code.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Bas Schouten <bschouten@mozilla.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "ImageLayerOGL.h"
+#include "gfxImageSurface.h"
+#include "glWrapper.h"
+
+namespace mozilla {
+namespace layers {
+
+already_AddRefed<Image>
+ImageContainerOGL::CreateImage(const Image::Format *aFormats,
+                               PRUint32 aNumFormats)
+{
+  if (!aNumFormats) {
+    return nsnull;
+  }
+  nsRefPtr<Image> img;
+  if (aFormats[0] == Image::PLANAR_YCBCR) {
+    img = new PlanarYCbCrImageOGL(static_cast<LayerManagerOGL*>(mManager));
+  } else if (aFormats[0] == Image::CAIRO_SURFACE) {
+    img = new CairoImageOGL(static_cast<LayerManagerOGL*>(mManager));
+  }
+  return img.forget();    
+}
+
+void
+ImageContainerOGL::SetCurrentImage(Image *aImage)
+{
+  mActiveImage = aImage;
+}
+
+already_AddRefed<Image>
+ImageContainerOGL::GetCurrentImage()
+{
+  nsRefPtr<Image> retval = mActiveImage;
+  return retval.forget();
+}
+
+already_AddRefed<gfxASurface>
+ImageContainerOGL::GetCurrentAsSurface(gfxIntSize *aSize)
+{
+  return nsnull;
+}
+
+LayerOGL::LayerType
+ImageLayerOGL::GetType()
+{
+  return TYPE_IMAGE;
+}
+
+Layer*
+ImageLayerOGL::GetLayer()
+{
+  return this;
+}
+
+void
+ImageLayerOGL::RenderLayer(int)
+{
+  if (!GetContainer()) {
+    return;
+  }
+
+  static_cast<LayerManagerOGL*>(mManager)->MakeCurrent();
+
+  nsRefPtr<Image> image = GetContainer()->GetCurrentImage();
+
+  if (image->GetFormat() == Image::PLANAR_YCBCR) {
+    PlanarYCbCrImageOGL *yuvImage =
+      static_cast<PlanarYCbCrImageOGL*>(image.get());
+
+    if (!yuvImage->HasData()) {
+      return;
+    }
+
+    yuvImage->AllocateTextures();
+
+    float quadTransform[4][4];
+    // Transform the quad to the size of the video.
+    memset(&quadTransform, 0, sizeof(quadTransform));
+    quadTransform[0][0] = (float)yuvImage->mSize.width;
+    quadTransform[1][1] = (float)yuvImage->mSize.height;
+    quadTransform[2][2] = 1.0f;
+    quadTransform[3][3] = 1.0f;
+
+    YCbCrLayerProgram *program = 
+      static_cast<LayerManagerOGL*>(mManager)->GetYCbCrLayerProgram();
+
+    program->Activate();
+
+    program->SetLayerQuadTransform(&quadTransform[0][0]);
+  
+    sglWrapper.ActiveTexture(LOCAL_GL_TEXTURE0);
+    sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, yuvImage->mTextures[0]);
+    sglWrapper.ActiveTexture(LOCAL_GL_TEXTURE1);
+    sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, yuvImage->mTextures[1]);
+    sglWrapper.ActiveTexture(LOCAL_GL_TEXTURE2);
+    sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, yuvImage->mTextures[2]);
+
+    program->SetLayerOpacity(GetOpacity());
+    program->SetLayerTransform(&mTransform._11);
+    program->Apply();
+
+    sglWrapper.DrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
+
+    yuvImage->FreeTextures();
+    sglWrapper.ActiveTexture(LOCAL_GL_TEXTURE0);
+
+  } else if (image->GetFormat() == Image::CAIRO_SURFACE) {
+    CairoImageOGL *cairoImage =
+      static_cast<CairoImageOGL*>(image.get());
+
+    float quadTransform[4][4];
+    // Transform the quad to the size of the video.
+    memset(&quadTransform, 0, sizeof(quadTransform));
+    quadTransform[0][0] = (float)cairoImage->mSize.width;
+    quadTransform[1][1] = (float)cairoImage->mSize.height;
+    quadTransform[2][2] = 1.0f;
+    quadTransform[3][3] = 1.0f;
+  
+    RGBLayerProgram *program = 
+      static_cast<LayerManagerOGL*>(mManager)->GetRGBLayerProgram();
+
+    program->Activate();
+
+    program->SetLayerQuadTransform(&quadTransform[0][0]);
+
+    sglWrapper.ActiveTexture(LOCAL_GL_TEXTURE0);
+    sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, cairoImage->mTexture);
+    program->SetLayerOpacity(GetOpacity());
+    program->SetLayerTransform(&mTransform._11);
+    program->Apply();
+
+    sglWrapper.DrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
+  }
+}
+
+PlanarYCbCrImageOGL::PlanarYCbCrImageOGL(mozilla::layers::LayerManagerOGL* aManager)
+  : PlanarYCbCrImage(NULL)
+  , mLoaded(PR_FALSE)
+  , mHasData(PR_FALSE)
+  , mManager(aManager)
+{ 
+  memset(mTextures, 0, sizeof(GLuint) * 3);
+}
+
+PlanarYCbCrImageOGL::~PlanarYCbCrImageOGL()
+{
+  if (mHasData) {
+    delete [] mData.mYChannel;
+    delete [] mData.mCbChannel;
+    delete [] mData.mCrChannel;
+  }
+}
+
+void
+PlanarYCbCrImageOGL::SetData(const PlanarYCbCrImage::Data &aData)
+{
+  /**
+   * XXX - Should do something more clever here, also introduce thread safety
+   * there's potential race conditions in this class.
+   */
+  mData = aData;
+  mData.mCbChannel = new PRUint8[aData.mCbCrStride * aData.mCbCrSize.height];
+  mData.mCrChannel = new PRUint8[aData.mCbCrStride * aData.mCbCrSize.height];
+  mData.mYChannel = new PRUint8[aData.mYStride * aData.mYSize.height];
+  memcpy(mData.mCbChannel, aData.mCbChannel, aData.mCbCrStride * aData.mCbCrSize.height);
+  memcpy(mData.mCrChannel, aData.mCrChannel, aData.mCbCrStride * aData.mCbCrSize.height);
+  memcpy(mData.mYChannel, aData.mYChannel, aData.mYStride * aData.mYSize.height);
+
+  mSize = aData.mYSize;
+
+  mHasData = PR_TRUE;
+}
+
+void
+PlanarYCbCrImageOGL::AllocateTextures()
+{
+  mManager->MakeCurrent();
+  sglWrapper.GenTextures(3, mTextures);
+
+  sglWrapper.PixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, mData.mYStride);
+
+  sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, mTextures[0]);
+
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MAG_FILTER, LOCAL_GL_LINEAR);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_S, LOCAL_GL_CLAMP_TO_EDGE);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_T, LOCAL_GL_CLAMP_TO_EDGE);
+
+  sglWrapper.TexImage2D(LOCAL_GL_TEXTURE_2D,
+               0,
+               LOCAL_GL_LUMINANCE,
+               mSize.width,
+               mSize.height,
+               0,
+               LOCAL_GL_LUMINANCE,
+               LOCAL_GL_UNSIGNED_BYTE,
+               mData.mYChannel);
+  
+  sglWrapper.PixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, mData.mCbCrStride);
+
+  sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, mTextures[1]);
+
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MAG_FILTER, LOCAL_GL_LINEAR);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_S, LOCAL_GL_CLAMP_TO_EDGE);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_T, LOCAL_GL_CLAMP_TO_EDGE);
+
+  sglWrapper.TexImage2D(LOCAL_GL_TEXTURE_2D,
+               0,
+               LOCAL_GL_LUMINANCE,
+               mData.mCbCrSize.width,
+               mData.mCbCrSize.height,
+               0,
+               LOCAL_GL_LUMINANCE,
+               LOCAL_GL_UNSIGNED_BYTE,
+               mData.mCbChannel);
+
+  sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, mTextures[2]);
+
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MAG_FILTER, LOCAL_GL_LINEAR);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_S, LOCAL_GL_CLAMP_TO_EDGE);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_T, LOCAL_GL_CLAMP_TO_EDGE);
+
+  sglWrapper.TexImage2D(LOCAL_GL_TEXTURE_2D,
+               0,
+               LOCAL_GL_LUMINANCE,
+               mData.mCbCrSize.width,
+               mData.mCbCrSize.height,
+               0,
+               LOCAL_GL_LUMINANCE,
+               LOCAL_GL_UNSIGNED_BYTE,
+               mData.mCrChannel);
+
+  sglWrapper.PixelStorei(LOCAL_GL_UNPACK_ROW_LENGTH, 0);
+}
+
+void
+PlanarYCbCrImageOGL::FreeTextures()
+{
+  static_cast<LayerManagerOGL*>(mManager)->MakeCurrent();
+  if (mTextures[0]) {
+    sglWrapper.DeleteTextures(3, mTextures);
+  }
+}
+
+CairoImageOGL::~CairoImageOGL()
+{
+  static_cast<LayerManagerOGL*>(mManager)->MakeCurrent();
+  if (mTexture) {
+    sglWrapper.DeleteTextures(1, &mTexture);
+  }
+}
+
+void
+CairoImageOGL::SetData(const CairoImage::Data &aData)
+{
+  /**
+   * XXX - Should make sure this happens on the correct thread. Since this
+   * is supposed to be threadsafe.
+   */
+  mSize = aData.mSize;
+  mManager->MakeCurrent();
+
+  nsRefPtr<gfxImageSurface> imageSurface =
+    new gfxImageSurface(aData.mSize, gfxASurface::ImageFormatARGB32);
+
+  nsRefPtr<gfxContext> context = new gfxContext(imageSurface);
+
+  context->SetSource(aData.mSurface);
+  context->Paint();
+
+  sglWrapper.GenTextures(1, &mTexture);
+
+  sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, mTexture);
+
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MAG_FILTER, LOCAL_GL_LINEAR);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_S, LOCAL_GL_CLAMP_TO_EDGE);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_T, LOCAL_GL_CLAMP_TO_EDGE);
+
+  sglWrapper.TexImage2D(LOCAL_GL_TEXTURE_2D,
+               0,
+               LOCAL_GL_RGBA,
+               mSize.width,
+               mSize.height,
+               0,
+               LOCAL_GL_BGRA,
+               LOCAL_GL_UNSIGNED_BYTE,
+               imageSurface->Data());
+}
+
+} /* layers */
+} /* mozilla */
new file mode 100644
--- /dev/null
+++ b/gfx/layers/opengl/ImageLayerOGL.h
@@ -0,0 +1,136 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Corporation code.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Bas Schouten <bschouten@mozilla.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef GFX_IMAGELAYEROGL_H
+#define GFX_IMAGELAYEROGL_H
+
+#include "LayerManagerOGL.h"
+#include "ImageLayers.h"
+
+namespace mozilla {
+namespace layers {
+
+class THEBES_API ImageContainerOGL : public ImageContainer
+{
+public:
+  ImageContainerOGL(LayerManagerOGL *aManager)
+    : ImageContainer(aManager)
+  { }
+
+  virtual ~ImageContainerOGL() {}
+
+  virtual already_AddRefed<Image> CreateImage(const Image::Format* aFormats,
+                                              PRUint32 aNumFormats);
+
+  virtual void SetCurrentImage(Image* aImage);
+
+  virtual already_AddRefed<Image> GetCurrentImage();
+
+  virtual already_AddRefed<gfxASurface> GetCurrentAsSurface(gfxIntSize* aSize);
+private:
+  nsRefPtr<Image> mActiveImage;
+};
+
+class THEBES_API ImageLayerOGL : public ImageLayer,
+                                 public LayerOGL
+{
+public:
+  ImageLayerOGL(LayerManagerOGL *aManager)
+    : ImageLayer(aManager, NULL)
+  { 
+    mImplData = static_cast<LayerOGL*>(this);
+  }
+
+  // LayerOGL Implementation
+  virtual LayerType GetType();
+
+  virtual Layer* GetLayer();
+
+  virtual void RenderLayer(int aPreviousDestination);
+};
+
+class THEBES_API PlanarYCbCrImageOGL : public PlanarYCbCrImage
+{
+public:
+  PlanarYCbCrImageOGL(LayerManagerOGL *aManager);
+  virtual ~PlanarYCbCrImageOGL();
+
+  virtual void SetData(const Data &aData);
+
+  /**
+   * Upload the data from out mData into our textures. For now we use this to
+   * make sure the textures are created and filled on the main thread.
+   */
+  virtual void AllocateTextures();
+  /**
+   * XXX
+   * Free the textures, we call this from the main thread when we're done
+   * drawing this frame. We cannot free this from the constructor since it may
+   * be destroyed off the main-thread and might not be able to properly clean
+   * up its textures
+   */
+  virtual void FreeTextures();
+  virtual PRBool HasData() { return mHasData; }
+
+  Data mData;
+  PRBool mLoaded;
+  PRBool mHasData;
+  GLuint mTextures[3];
+  gfxIntSize mSize;
+  LayerManagerOGL *mManager;
+};
+
+
+class THEBES_API CairoImageOGL : public CairoImage
+{
+public:
+  CairoImageOGL(LayerManagerOGL *aManager)
+    : CairoImage(NULL)
+    , mManager(aManager)
+  { }
+  ~CairoImageOGL();
+
+  virtual void SetData(const Data &aData);
+
+  GLuint mTexture;
+  gfxIntSize mSize;
+  LayerManagerOGL *mManager;
+};
+
+} /* layers */
+} /* mozilla */
+#endif /* GFX_IMAGELAYEROGL_H */
new file mode 100644
--- /dev/null
+++ b/gfx/layers/opengl/LayerManagerOGL.cpp
@@ -0,0 +1,613 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Corporation code.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Bas Schouten <bschouten@mozilla.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "LayerManagerOGL.h"
+#include "ThebesLayerOGL.h"
+#include "ContainerLayerOGL.h"
+#include "ImageLayerOGL.h"
+#include "LayerManagerOGLShaders.h"
+
+#include "gfxContext.h"
+#include "nsIWidget.h"
+
+#include "glWrapper.h"
+
+static const GLint VERTEX_ATTRIB_LOCATION = 0;
+
+namespace mozilla {
+namespace layers {
+
+/**
+ * LayerManagerOGL
+ */
+LayerManagerOGL::LayerManagerOGL(nsIWidget *aWidget) 
+  : mWidget(aWidget)
+  , mBackBuffer(0)
+  , mFrameBuffer(0)
+  , mRGBLayerProgram(NULL)
+  , mYCbCrLayerProgram(NULL)
+  , mVertexShader(0)
+  , mRGBShader(0)
+  , mYUVShader(0)
+{
+}
+
+LayerManagerOGL::~LayerManagerOGL()
+{
+  MakeCurrent();
+  delete mRGBLayerProgram;
+  delete mYCbCrLayerProgram;
+#ifdef XP_WIN
+  BOOL deleted = sglWrapper.wDeleteContext(mContext);
+  NS_ASSERTION(deleted, "Error deleting OpenGL context!");
+  ::ReleaseDC((HWND)mWidget->GetNativeData(NS_NATIVE_WINDOW), mDC);
+#endif
+}
+
+PRBool
+LayerManagerOGL::Initialize()
+{
+#ifdef XP_WIN
+  mDC = (HDC)mWidget->GetNativeData(NS_NATIVE_GRAPHIC);
+  PIXELFORMATDESCRIPTOR pfd;
+  ZeroMemory(&pfd, sizeof(pfd));
+
+  pfd.nSize = sizeof(pfd);
+  pfd.nVersion = 1;
+  pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
+  pfd.iPixelType = PFD_TYPE_RGBA;
+  pfd.cColorBits = 32;
+  pfd.cDepthBits = 0;
+  pfd.iLayerType = PFD_MAIN_PLANE;
+  int iFormat = ChoosePixelFormat(mDC, &pfd);
+
+  SetPixelFormat(mDC, iFormat, &pfd);
+  mContext = sglWrapper.wCreateContext(mDC);
+
+  if (!mContext) {
+    return PR_FALSE;
+  }
+#else
+  // Don't know how to initialize on this platform!
+  return PR_FALSE;
+#endif
+
+  MakeCurrent();
+
+  sglWrapper.BlendFuncSeparate(LOCAL_GL_ONE, LOCAL_GL_ONE_MINUS_SRC_ALPHA, LOCAL_GL_ONE, LOCAL_GL_ONE);
+  sglWrapper.Enable(LOCAL_GL_BLEND);
+  sglWrapper.Enable(LOCAL_GL_TEXTURE_2D);
+  sglWrapper.Enable(LOCAL_GL_SCISSOR_TEST);
+
+  mVertexShader = sglWrapper.CreateShader(LOCAL_GL_VERTEX_SHADER);
+  mRGBShader = sglWrapper.CreateShader(LOCAL_GL_FRAGMENT_SHADER);
+  mYUVShader = sglWrapper.CreateShader(LOCAL_GL_FRAGMENT_SHADER);
+
+  sglWrapper.ShaderSource(mVertexShader, 1, (const GLchar**)&sVertexShader, NULL);
+  sglWrapper.ShaderSource(mRGBShader, 1, (const GLchar**)&sRGBLayerPS, NULL);
+  sglWrapper.ShaderSource(mYUVShader, 1, (const GLchar**)&sYUVLayerPS, NULL);
+
+  sglWrapper.CompileShader(mVertexShader);
+  sglWrapper.CompileShader(mRGBShader);
+  sglWrapper.CompileShader(mYUVShader);
+
+  GLint status;
+  sglWrapper.GetShaderiv(mVertexShader, LOCAL_GL_COMPILE_STATUS, &status);
+  if (!status) {
+    return false;
+  }
+
+  sglWrapper.GetShaderiv(mRGBShader, LOCAL_GL_COMPILE_STATUS, &status);
+  if (!status) {
+    return false;
+  }
+
+  sglWrapper.GetShaderiv(mYUVShader, LOCAL_GL_COMPILE_STATUS, &status);
+
+  if (!status) {
+    return false;
+  }
+
+  mRGBLayerProgram = new RGBLayerProgram();
+  if (!mRGBLayerProgram->Initialize(mVertexShader, mRGBShader)) {
+    return false;
+  }
+  mYCbCrLayerProgram = new YCbCrLayerProgram();
+  if (!mYCbCrLayerProgram->Initialize(mVertexShader, mYUVShader)) {
+    return false;
+  }
+
+  mRGBLayerProgram->UpdateLocations();
+  mYCbCrLayerProgram->UpdateLocations();
+
+  sglWrapper.GenBuffers(1, &mVBO);
+  sglWrapper.BindBuffer(LOCAL_GL_ARRAY_BUFFER, mVBO);
+  sglWrapper.EnableClientState(LOCAL_GL_VERTEX_ARRAY);
+  sglWrapper.EnableVertexAttribArray(VERTEX_ATTRIB_LOCATION);
+
+  GLfloat vertices[] = { 0, 0, 1.0f, 0, 0, 1.0f, 1.0f, 1.0f };
+  sglWrapper.BufferData(LOCAL_GL_ARRAY_BUFFER, sizeof(vertices), vertices, LOCAL_GL_STATIC_DRAW);
+
+  mRGBLayerProgram->Activate();
+  sglWrapper.VertexAttribPointer(VERTEX_ATTRIB_LOCATION,
+                        2,
+                        LOCAL_GL_FLOAT,
+                        LOCAL_GL_FALSE,
+                        0,
+                        0);
+  mYCbCrLayerProgram->Activate();
+  sglWrapper.VertexAttribPointer(VERTEX_ATTRIB_LOCATION,
+                        2,
+                        LOCAL_GL_FLOAT,
+                        LOCAL_GL_FALSE,
+                        0,
+                        0);
+
+  mRGBLayerProgram->SetLayerTexture(0);
+
+  mYCbCrLayerProgram->SetYTexture(0);
+  mYCbCrLayerProgram->SetCbTexture(1);
+  mYCbCrLayerProgram->SetCrTexture(2);
+
+  return true;
+}
+
+void
+LayerManagerOGL::SetClippingRegion(const nsIntRegion& aClippingRegion)
+{
+  mClippingRegion = aClippingRegion;
+}
+
+void
+LayerManagerOGL::BeginTransaction()
+{
+}
+
+void
+LayerManagerOGL::BeginTransactionWithTarget(gfxContext *aTarget)
+{
+  mTarget = aTarget;
+}
+
+void
+LayerManagerOGL::EndConstruction()
+{
+}
+
+void
+LayerManagerOGL::EndTransaction()
+{
+  Render();
+  mTarget = NULL;
+}
+
+void
+LayerManagerOGL::SetRoot(Layer *aLayer)
+{
+  mRootLayer =  static_cast<LayerOGL*>(aLayer->ImplData());;
+}
+
+already_AddRefed<ThebesLayer>
+LayerManagerOGL::CreateThebesLayer()
+{
+  nsRefPtr<ThebesLayer> layer = new ThebesLayerOGL(this);
+  return layer.forget();
+}
+
+already_AddRefed<ContainerLayer>
+LayerManagerOGL::CreateContainerLayer()
+{
+  nsRefPtr<ContainerLayer> layer = new ContainerLayerOGL(this);
+  return layer.forget();
+}
+
+already_AddRefed<ImageContainer>
+LayerManagerOGL::CreateImageContainer()
+{
+  nsRefPtr<ImageContainer> container = new ImageContainerOGL(this);
+  return container.forget();
+}
+
+already_AddRefed<ImageLayer>
+LayerManagerOGL::CreateImageLayer()
+{
+  nsRefPtr<ImageLayer> layer = new ImageLayerOGL(this);
+  return layer.forget();
+}
+
+void
+LayerManagerOGL::SetClippingEnabled(PRBool aEnabled)
+{
+  if (aEnabled) {
+    sglWrapper.Enable(LOCAL_GL_SCISSOR_TEST);
+  } else {
+    sglWrapper.Disable(LOCAL_GL_SCISSOR_TEST);
+  }
+}
+
+void
+LayerManagerOGL::MakeCurrent()
+{
+#ifdef XP_WIN
+  BOOL succeeded = sglWrapper.wMakeCurrent(mDC, mContext);
+  NS_ASSERTION(succeeded, "Failed to make GL context current!");
+#endif
+}
+
+void
+LayerManagerOGL::Render()
+{
+  nsIntRect rect;
+  mWidget->GetBounds(rect);
+  GLint width = rect.width;
+  GLint height = rect.height;
+
+  MakeCurrent();
+  SetupBackBuffer();
+
+  sglWrapper.BindFramebufferEXT(LOCAL_GL_FRAMEBUFFER_EXT, mFrameBuffer);
+  sglWrapper.BlendFuncSeparate(LOCAL_GL_ONE, LOCAL_GL_ONE_MINUS_SRC_ALPHA, LOCAL_GL_ONE, LOCAL_GL_ONE);
+  sglWrapper.ClearColor(0.0, 0.0, 0.0, 0.0);
+  sglWrapper.Clear(LOCAL_GL_COLOR_BUFFER_BIT | LOCAL_GL_DEPTH_BUFFER_BIT);
+
+  SetupPipeline();
+  SetClippingEnabled(PR_FALSE);
+
+  if (mRootLayer) {
+    const nsIntRect *clipRect = mRootLayer->GetLayer()->GetClipRect();
+    if (clipRect) {
+      sglWrapper.Scissor(clipRect->x, clipRect->y, clipRect->width, clipRect->height);
+    } else {
+      sglWrapper.Scissor(0, 0, width, height);
+    }
+
+    mRootLayer->RenderLayer(mFrameBuffer);
+  }
+
+  if (mTarget) {
+    CopyToTarget();
+  } else {
+    /**
+     * Draw our backbuffer to the screen without using vertex or fragment
+     * shaders. We're fine with just calculating the viewport coordinates
+     * in software. And nothing special is required for the texture sampling.
+     */
+    sglWrapper.BindFramebufferEXT(LOCAL_GL_FRAMEBUFFER_EXT, 0);
+    sglWrapper.UseProgram(0);
+    sglWrapper.DisableVertexAttribArray(VERTEX_ATTRIB_LOCATION);
+    sglWrapper.BindBuffer(LOCAL_GL_ARRAY_BUFFER, 0);
+    sglWrapper.EnableClientState(LOCAL_GL_VERTEX_ARRAY);
+    sglWrapper.EnableClientState(LOCAL_GL_TEXTURE_COORD_ARRAY);
+    sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, mBackBuffer);
+
+    const nsIntRect *r;
+    for (nsIntRegionRectIterator iter(mClippingRegion);
+         (r = iter.Next()) != nsnull;) {
+      sglWrapper.BlendFuncSeparate(LOCAL_GL_ONE, LOCAL_GL_ZERO, LOCAL_GL_ONE, LOCAL_GL_ZERO);
+      float left = (GLfloat)r->x / width;
+      float right = (GLfloat)r->XMost() / width;
+      float top = (GLfloat)r->y / height;
+      float bottom = (GLfloat)r->YMost() / height;
+
+      float vertices[] = { left * 2.0f - 1.0f,
+                           -(top * 2.0f - 1.0f),
+                           right * 2.0f - 1.0f,
+                           -(top * 2.0f - 1.0f),
+                           left * 2.0f - 1.0f,
+                           -(bottom * 2.0f - 1.0f),
+                           right * 2.0f - 1.0f,
+                           -(bottom * 2.0f - 1.0f) };
+      float coords[] = { left, top, right, top, left, bottom, right, bottom };
+
+      sglWrapper.VertexPointer(2, LOCAL_GL_FLOAT, 0, vertices);
+      sglWrapper.TexCoordPointer(2, LOCAL_GL_FLOAT, 0, coords);
+      sglWrapper.DrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
+    }
+    sglWrapper.BindBuffer(LOCAL_GL_ARRAY_BUFFER, mVBO);
+    sglWrapper.EnableVertexAttribArray(VERTEX_ATTRIB_LOCATION);
+    sglWrapper.DisableClientState(LOCAL_GL_TEXTURE_COORD_ARRAY);
+  }
+
+  sglWrapper.Finish();
+}
+
+void
+LayerManagerOGL::SetupPipeline()
+{
+  nsIntRect rect;
+  mWidget->GetBounds(rect);
+
+  sglWrapper.Viewport(0, 0, rect.width, rect.height);
+
+  float viewMatrix[4][4];
+  /**
+   * Matrix to transform to viewport space ( <-1.0, 1.0> topleft, 
+   * <1.0, -1.0> bottomright)
+   */
+  memset(&viewMatrix, 0, sizeof(viewMatrix));
+  viewMatrix[0][0] = 2.0f / rect.width;
+  viewMatrix[1][1] = 2.0f / rect.height;
+  viewMatrix[2][2] = 1.0f;
+  viewMatrix[3][0] = -1.0f;
+  viewMatrix[3][1] = -1.0f;
+  viewMatrix[3][3] = 1.0f;
+  
+  mRGBLayerProgram->Activate();
+  mRGBLayerProgram->SetMatrixProj(&viewMatrix[0][0]);
+
+  mYCbCrLayerProgram->Activate();
+  mYCbCrLayerProgram->SetMatrixProj(&viewMatrix[0][0]);
+}
+
+PRBool
+LayerManagerOGL::SetupBackBuffer()
+{
+  nsIntRect rect;
+  mWidget->GetBounds(rect);
+  GLint width = rect.width;
+  GLint height = rect.height;
+
+  if (width == mBackBufferSize.width && height == mBackBufferSize.height) {
+    return PR_TRUE;
+  }
+
+  if (!mBackBuffer) {
+    sglWrapper.GenTextures(1, &mBackBuffer);
+  }
+
+  /**
+   * Setup the texture used as the backbuffer.
+   */
+  sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, mBackBuffer);
+  sglWrapper.TexEnvf(LOCAL_GL_TEXTURE_ENV, LOCAL_GL_TEXTURE_ENV_MODE, LOCAL_GL_MODULATE);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_NEAREST);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MAG_FILTER, LOCAL_GL_NEAREST);
+  sglWrapper.TexImage2D(LOCAL_GL_TEXTURE_2D,
+                        0,
+                        LOCAL_GL_RGBA,
+                        width,
+                        height,
+                        0,
+                        LOCAL_GL_RGBA,
+                        LOCAL_GL_UNSIGNED_BYTE,
+                        NULL);
+
+  /**
+   * Create the framebuffer and bind it to make our content render into our
+   * framebuffer.
+   */
+  if (!mFrameBuffer) {
+    sglWrapper.GenFramebuffersEXT(1, &mFrameBuffer);
+  }
+
+  sglWrapper.BindFramebufferEXT(LOCAL_GL_FRAMEBUFFER_EXT, mFrameBuffer);
+  sglWrapper.FramebufferTexture2DEXT(LOCAL_GL_FRAMEBUFFER_EXT,
+                                     LOCAL_GL_COLOR_ATTACHMENT0_EXT,
+                                     LOCAL_GL_TEXTURE_2D,
+                                     mBackBuffer,
+                                     0);
+
+  return PR_TRUE;
+}
+
+void
+LayerManagerOGL::CopyToTarget()
+{
+  nsIntRect rect;
+  mWidget->GetBounds(rect);
+  GLint width = rect.width;
+  GLint height = rect.height;
+
+  if ((PRInt64)width * (PRInt64)height > PR_INT32_MAX) {
+    NS_ERROR("Widget size too big - integer overflow!");
+    return;
+  }
+
+  nsRefPtr<gfxImageSurface> imageSurface =
+    new gfxImageSurface(gfxIntSize(width, height),
+                        gfxASurface::ImageFormatARGB32);
+
+  sglWrapper.ReadBuffer(LOCAL_GL_COLOR_ATTACHMENT0_EXT);
+
+  if (imageSurface->Stride() != width * 4) {
+    char *tmpData = new char[width * height * 4];
+
+    sglWrapper.ReadPixels(0,
+                          0,
+                          width,
+                          height,
+                          LOCAL_GL_BGRA,
+                          LOCAL_GL_UNSIGNED_BYTE,
+                          tmpData);
+    sglWrapper.Finish();
+
+    for (int y = 0; y < height; y++) {
+      memcpy(imageSurface->Data() + imageSurface->Stride() * y,
+             tmpData + width * 4 * y,
+             width * 4);
+    }
+    delete [] tmpData;
+  } else {
+    sglWrapper.ReadPixels(0,
+                          0,
+                          width,
+                          height,
+                          LOCAL_GL_BGRA,
+                          LOCAL_GL_UNSIGNED_BYTE,
+                          imageSurface->Data());
+    sglWrapper.Finish();
+  }                          
+
+  mTarget->SetOperator(gfxContext::OPERATOR_OVER);
+  mTarget->SetSource(imageSurface);
+  mTarget->Paint();
+}
+
+LayerOGL::LayerOGL()
+  : mNextSibling(NULL)
+{
+}
+
+LayerOGL*
+LayerOGL::GetNextSibling()
+{
+  return mNextSibling;
+}
+
+void
+LayerOGL::SetNextSibling(LayerOGL *aNextSibling)
+{
+  mNextSibling = aNextSibling;
+}
+
+/**
+ * LayerProgram Helpers
+ */
+LayerProgram::LayerProgram()
+  : mProgram(0)
+{
+}
+
+LayerProgram::~LayerProgram()
+{
+  sglWrapper.DeleteProgram(mProgram);
+}
+
+PRBool
+LayerProgram::Initialize(GLuint aVertexShader, GLuint aFragmentShader)
+{
+  mProgram = sglWrapper.CreateProgram();
+  sglWrapper.AttachShader(mProgram, aVertexShader);
+  sglWrapper.AttachShader(mProgram, aFragmentShader);
+
+  sglWrapper.BindAttribLocation(mProgram, VERTEX_ATTRIB_LOCATION, "aVertex");
+  
+  sglWrapper.LinkProgram(mProgram);
+
+  GLint status;
+  sglWrapper.GetProgramiv(mProgram, LOCAL_GL_LINK_STATUS, &status);
+
+  if (!status) {
+    return false;
+  }
+  return true;
+}
+
+void
+LayerProgram::Activate()
+{
+  sglWrapper.UseProgram(mProgram);
+}
+
+void
+LayerProgram::UpdateLocations()
+{
+  mMatrixProjLocation = sglWrapper.GetUniformLocation(mProgram, "uMatrixProj");
+  mLayerQuadTransformLocation =
+    sglWrapper.GetUniformLocation(mProgram, "uLayerQuadTransform");
+  mLayerTransformLocation = sglWrapper.GetUniformLocation(mProgram, "uLayerTransform");
+  mRenderTargetOffsetLocation =
+    sglWrapper.GetUniformLocation(mProgram, "uRenderTargetOffset");
+  mLayerOpacityLocation = sglWrapper.GetUniformLocation(mProgram, "uLayerOpacity");
+}
+
+void
+LayerProgram::SetMatrixUniform(GLint aLocation, const GLfloat *aValue)
+{
+  sglWrapper.UniformMatrix4fv(aLocation, 1, false, aValue);
+}
+
+void
+LayerProgram::SetInt(GLint aLocation, GLint aValue)
+{
+  sglWrapper.Uniform1i(aLocation, aValue);
+}
+
+void
+LayerProgram::SetLayerOpacity(GLfloat aValue)
+{
+  sglWrapper.Uniform1f(mLayerOpacityLocation, aValue);
+}
+
+void
+LayerProgram::PushRenderTargetOffset(GLfloat aValueX, GLfloat aValueY)
+{
+  GLvec2 vector;
+  vector.mX = aValueX;
+  vector.mY = aValueY;
+  mRenderTargetOffsetStack.AppendElement(vector);
+}
+
+void
+LayerProgram::PopRenderTargetOffset()
+{
+  NS_ASSERTION(mRenderTargetOffsetStack.Length(), "Unbalanced push/pops");
+  mRenderTargetOffsetStack.RemoveElementAt(mRenderTargetOffsetStack.Length() - 1);
+}
+
+void
+LayerProgram::Apply()
+{
+  if (!mRenderTargetOffsetStack.Length()) {
+    sglWrapper.Uniform4f(mRenderTargetOffsetLocation, 0, 0, 0, 0);
+  } else {
+    GLvec2 vector =
+      mRenderTargetOffsetStack[mRenderTargetOffsetStack.Length() - 1];
+    sglWrapper.Uniform4f(mRenderTargetOffsetLocation, vector.mX, vector.mY, 0, 0);
+  }
+}
+
+void
+RGBLayerProgram::UpdateLocations()
+{
+  LayerProgram::UpdateLocations();
+
+  mLayerTextureLocation = sglWrapper.GetUniformLocation(mProgram, "uLayerTexture");
+}
+
+void
+YCbCrLayerProgram::UpdateLocations()
+{
+  LayerProgram::UpdateLocations();
+
+  mYTextureLocation = sglWrapper.GetUniformLocation(mProgram, "uYTexture");
+  mCbTextureLocation = sglWrapper.GetUniformLocation(mProgram, "uCbTexture");
+  mCrTextureLocation = sglWrapper.GetUniformLocation(mProgram, "uCrTexture");
+}
+
+} /* layers */
+} /* mozilla */
new file mode 100644
--- /dev/null
+++ b/gfx/layers/opengl/LayerManagerOGL.h
@@ -0,0 +1,306 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Corporation code.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Bas Schouten <bschouten@mozilla.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef GFX_LAYERMANAGEROGL_H
+#define GFX_LAYERMANAGEROGL_H
+
+#include "Layers.h"
+
+#ifdef XP_WIN
+#include <windows.h>
+#endif
+
+typedef unsigned int GLuint;
+typedef int GLint;
+typedef float GLfloat;
+typedef char GLchar;
+
+#define BUFFER_OFFSET(i) ((char *)NULL + (i))
+
+#include "gfxContext.h"
+#include "nsIWidget.h"
+
+namespace mozilla {
+namespace layers {
+
+class LayerOGL;
+
+struct GLvec2
+{
+  GLfloat mX;
+  GLfloat mY;
+};
+
+/**
+ * Helper class for Layer Programs.
+ */
+class LayerProgram
+{
+public:
+  LayerProgram();
+  virtual ~LayerProgram();
+
+  PRBool Initialize(GLuint aVertexShader, GLuint aFragmentShader);
+
+  virtual void UpdateLocations();
+
+  void Activate();
+
+  void SetMatrixUniform(GLint aLocation, const GLfloat *aValue);
+  void SetInt(GLint aLocation, GLint aValue);
+
+  void SetMatrixProj(GLfloat *aValue)
+  {
+    SetMatrixUniform(mMatrixProjLocation, aValue);
+  }
+
+  void SetLayerQuadTransform(GLfloat *aValue)
+  {
+    SetMatrixUniform(mLayerQuadTransformLocation, aValue);
+  }
+
+  void SetLayerTransform(const GLfloat *aValue)
+  {
+    SetMatrixUniform(mLayerTransformLocation, aValue);
+  }
+
+  void SetLayerOpacity(GLfloat aValue);
+
+  void PushRenderTargetOffset(GLfloat aValueX, GLfloat aValueY);
+  void PopRenderTargetOffset();
+
+  void Apply();
+
+protected:
+  GLuint mProgram;
+  GLint mMatrixProjLocation;
+  GLint mLayerQuadTransformLocation;
+  GLint mLayerTransformLocation;
+  GLint mRenderTargetOffsetLocation;
+  GLint mLayerOpacityLocation;
+
+  nsTArray<GLvec2> mRenderTargetOffsetStack;
+};
+
+class RGBLayerProgram : public LayerProgram
+{
+public:
+  void UpdateLocations();
+
+  void SetLayerTexture(GLint aValue)
+  {
+    SetInt(mLayerTextureLocation, aValue);
+  }
+protected:
+  GLint mLayerTextureLocation;
+};
+
+class YCbCrLayerProgram : public LayerProgram
+{
+public:
+  void UpdateLocations();
+
+  void SetYTexture(GLint aValue)
+  {
+    SetInt(mYTextureLocation, aValue);
+  }
+  void SetCbTexture(GLint aValue)
+  {
+    SetInt(mCbTextureLocation, aValue);
+  }
+  void SetCrTexture(GLint aValue)
+  {
+    SetInt(mCrTextureLocation, aValue);
+  }
+protected:
+  GLint mYTextureLocation;
+  GLint mCbTextureLocation;
+  GLint mCrTextureLocation;
+};
+
+/**
+ * This is the LayerManager used for OpenGL 2.1. For now this will render on
+ * the main thread.
+ */
+class THEBES_API LayerManagerOGL : public LayerManager {
+public:
+  LayerManagerOGL(nsIWidget *aWidget);
+  virtual ~LayerManagerOGL();
+
+  /**
+   * Initializes the layer manager, this is when the layer manager will
+   * actually access the device and attempt to create the swap chain used
+   * to draw to the window. If this method fails the device cannot be used.
+   * This function is not threadsafe.
+   *
+   * \return True is initialization was succesful, false when it was not.
+   */
+  PRBool Initialize();
+
+  /**
+   * Sets the clipping region for this layer manager. This is important on 
+   * windows because using OGL we no longer have GDI's native clipping. Therefor
+   * widget must tell us what part of the screen is being invalidated,
+   * and we should clip to this.
+   *
+   * \param aClippingRegion Region to clip to. Setting an empty region
+   * will disable clipping.
+   */
+  void SetClippingRegion(const nsIntRegion& aClippingRegion);
+
+  /**
+   * LayerManager implementation.
+   */
+  void BeginTransaction();
+
+  void BeginTransactionWithTarget(gfxContext* aTarget);
+
+  void EndConstruction();
+
+  void EndTransaction();
+
+  void SetRoot(Layer* aLayer);
+  
+  virtual already_AddRefed<ThebesLayer> CreateThebesLayer();
+
+  virtual already_AddRefed<ContainerLayer> CreateContainerLayer();
+
+  virtual already_AddRefed<ImageLayer> CreateImageLayer();
+
+  virtual already_AddRefed<ImageContainer> CreateImageContainer();
+
+  /**
+   * Helper methods.
+   */
+  void SetClippingEnabled(PRBool aEnabled);
+
+  void MakeCurrent();
+
+  RGBLayerProgram *GetRGBLayerProgram() { return mRGBLayerProgram; }
+  YCbCrLayerProgram *GetYCbCrLayerProgram() { return mYCbCrLayerProgram; }
+
+private:
+  /** Widget associated with this layer manager */
+  nsIWidget *mWidget;
+  /** 
+   * Context target, NULL when drawing directly to our swap chain.
+   */
+  nsRefPtr<gfxContext> mTarget;
+
+#ifdef XP_WIN
+  /** Windows Device Context */
+  HDC mDC;
+
+  /** OpenGL Context */
+  HGLRC mContext;
+#endif
+
+  /** Backbuffer */
+  GLuint mBackBuffer;
+  /** Backbuffer size */
+  nsIntSize mBackBufferSize;
+  /** Framebuffer */
+  GLuint mFrameBuffer;
+  /** RGB Layer Program */
+  RGBLayerProgram *mRGBLayerProgram;
+  /** YUV Layer Program */
+  YCbCrLayerProgram *mYCbCrLayerProgram;
+  /** Vertex Shader */
+  GLuint mVertexShader;
+  /** RGB fragment shader */
+  GLuint mRGBShader;
+  /** YUV fragment shader */
+  GLuint mYUVShader;
+  /** Current root layer. */
+  LayerOGL *mRootLayer;
+  /** Vertex buffer */
+  GLuint mVBO;
+
+  /**
+   * Region we're clipping our current drawing to.
+   */
+  nsIntRegion mClippingRegion;
+  /**
+   * Render the current layer tree to the active target.
+   */
+  void Render();
+  /**
+   * Setup the pipeline.
+   */
+  void SetupPipeline();
+  /**
+   * Setup the backbuffer.
+   *
+   * \return PR_TRUE if setup was succesful
+   */
+  PRBool SetupBackBuffer();
+  /**
+   * Copies the content of our backbuffer to the set transaction target.
+   */
+  void CopyToTarget();
+};
+
+/**
+ * General information and tree management for OGL layers.
+ */
+class LayerOGL
+{
+public:
+  LayerOGL();
+
+  enum LayerType { TYPE_THEBES, TYPE_CONTAINER, TYPE_IMAGE };
+  
+  virtual LayerType GetType() = 0;
+
+  LayerOGL *GetNextSibling();
+  virtual LayerOGL *GetFirstChildOGL() { return nsnull; }
+
+  void SetNextSibling(LayerOGL *aParent);
+  void SetFirstChild(LayerOGL *aParent);
+
+  virtual Layer* GetLayer() = 0;
+
+  virtual void RenderLayer(int aPreviousFrameBuffer) = 0;
+
+protected:
+  LayerOGL *mNextSibling;
+};
+
+} /* layers */
+} /* mozilla */
+
+#endif /* GFX_LAYERMANAGEROGL_H */
new file mode 100644
--- /dev/null
+++ b/gfx/layers/opengl/LayerManagerOGLShaders.h
@@ -0,0 +1,42 @@
+#define SHADER_GLOBAL_VARS "uniform mat4 uMatrixProj; \
+uniform mat4 uLayerQuadTransform; \
+uniform mat4 uLayerTransform; \
+uniform vec4 uRenderTargetOffset; \
+uniform float uLayerOpacity; \
+\
+uniform sampler2D uLayerTexture; \
+uniform sampler2D uYTexture; \
+uniform sampler2D uCbTexture; \
+uniform sampler2D uCrTexture; \
+varying vec2 vTextureCoordinate;"
+
+static const GLchar *sVertexShader = SHADER_GLOBAL_VARS "attribute vec4 aVertex; \
+void main() \
+{ \
+    vec4 finalPosition = aVertex; \
+    finalPosition = uLayerQuadTransform * finalPosition; \
+    finalPosition = uLayerTransform * finalPosition; \
+    finalPosition = finalPosition - uRenderTargetOffset; \
+    finalPosition = uMatrixProj * finalPosition; \
+    gl_Position = finalPosition; \
+    vTextureCoordinate = vec2(aVertex); \
+    }";
+
+static const GLchar *sRGBLayerPS = SHADER_GLOBAL_VARS "void main() \
+{ \
+gl_FragColor = texture2D(uLayerTexture, vTextureCoordinate) * uLayerOpacity; \
+}";
+
+static const GLchar *sYUVLayerPS = SHADER_GLOBAL_VARS "void main() \
+{ \
+    vec4 yuv; \
+    vec4 color; \
+    yuv.r = texture2D(uCrTexture, vTextureCoordinate).r - 0.5; \
+    yuv.g = texture2D(uYTexture, vTextureCoordinate).r - 0.0625; \
+    yuv.b = texture2D(uCbTexture, vTextureCoordinate).r - 0.5; \
+    color.r = yuv.g * 1.164 + yuv.r * 1.596; \
+    color.g = yuv.g * 1.164 - 0.813 * yuv.r - 0.391 * yuv.b; \
+    color.b = yuv.g * 1.164 + yuv.b * 2.018; \
+    color.a = 1.0f; \
+    gl_FragColor = color * uLayerOpacity; \
+}";
new file mode 100644
--- /dev/null
+++ b/gfx/layers/opengl/ThebesLayerOGL.cpp
@@ -0,0 +1,249 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Corporation code.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Bas Schouten <bschouten@mozilla.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "ThebesLayerOGL.h"
+#include "ContainerLayerOGL.h"
+#include "gfxContext.h"
+
+#include "glWrapper.h"
+
+namespace mozilla {
+namespace layers {
+
+// Returns true if it's OK to save the contents of aLayer in an
+// opaque surface (a surface without an alpha channel).
+// If we can use a surface without an alpha channel, we should, because
+// it will often make painting of antialiased text faster and higher
+// quality.
+static PRBool
+UseOpaqueSurface(Layer* aLayer)
+{
+  // If the visible content in the layer is opaque, there is no need
+  // for an alpha channel.
+  if (aLayer->IsOpaqueContent())
+    return PR_TRUE;
+  // Also, if this layer is the bottommost layer in a container which
+  // doesn't need an alpha channel, we can use an opaque surface for this
+  // layer too. Any transparent areas must be covered by something else
+  // in the container.
+  ContainerLayerOGL* parent =
+    static_cast<ContainerLayerOGL*>(aLayer->GetParent());
+  return parent && parent->GetFirstChild() == aLayer &&
+         UseOpaqueSurface(parent);
+}
+
+
+ThebesLayerOGL::ThebesLayerOGL(LayerManager *aManager)
+  : ThebesLayer(aManager, NULL)
+  , mTexture(0)
+{
+  mImplData = static_cast<LayerOGL*>(this);
+}
+
+ThebesLayerOGL::~ThebesLayerOGL()
+{
+  static_cast<LayerManagerOGL*>(mManager)->MakeCurrent();
+  if (mTexture) {
+    sglWrapper.DeleteTextures(1, &mTexture);
+  }
+}
+
+void
+ThebesLayerOGL::SetVisibleRegion(const nsIntRegion &aRegion)
+{
+  if (aRegion.GetBounds() == mVisibleRect) {
+    return;
+  }
+  mVisibleRect = aRegion.GetBounds();
+
+  static_cast<LayerManagerOGL*>(mManager)->MakeCurrent();
+
+  if (!mTexture) {
+    sglWrapper.GenTextures(1, &mTexture);
+  }
+
+  mInvalidatedRect = mVisibleRect;
+
+  sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, mTexture);
+
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MAG_FILTER, LOCAL_GL_LINEAR);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_S, LOCAL_GL_CLAMP_TO_EDGE);
+  sglWrapper.TexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_T, LOCAL_GL_CLAMP_TO_EDGE);
+
+  sglWrapper.TexImage2D(LOCAL_GL_TEXTURE_2D,
+                        0,
+                        LOCAL_GL_RGBA,
+                        mVisibleRect.width,
+                        mVisibleRect.height,
+                        0,
+                        LOCAL_GL_BGRA,
+                        LOCAL_GL_UNSIGNED_BYTE,
+                        NULL);
+}
+
+void
+ThebesLayerOGL::InvalidateRegion(const nsIntRegion &aRegion)
+{
+  nsIntRegion invalidatedRegion;
+  invalidatedRegion.Or(aRegion, mInvalidatedRect);
+  invalidatedRegion.And(invalidatedRegion, mVisibleRect);
+  mInvalidatedRect = invalidatedRegion.GetBounds();
+}
+
+gfxContext *
+ThebesLayerOGL::BeginDrawing(nsIntRegion *aRegion)
+{
+  if (mInvalidatedRect.IsEmpty()) {
+    aRegion->SetEmpty();
+    return NULL;
+  }
+  if (!mTexture) {
+    aRegion->SetEmpty();
+    return NULL;
+  }
+  *aRegion = mInvalidatedRect;
+
+  if (UseOpaqueSurface(this)) {
+    mSoftwareSurface = new gfxImageSurface(gfxIntSize(mInvalidatedRect.width,
+                                                      mInvalidatedRect.height),
+                                           gfxASurface::ImageFormatRGB24);
+  } else {
+    mSoftwareSurface = new gfxImageSurface(gfxIntSize(mInvalidatedRect.width,
+                                                      mInvalidatedRect.height),
+                                           gfxASurface::ImageFormatARGB32);
+  }
+
+  mContext = new gfxContext(mSoftwareSurface);
+  mContext->Translate(gfxPoint(-mInvalidatedRect.x, -mInvalidatedRect.y));
+  return mContext.get();
+}
+
+void
+ThebesLayerOGL::EndDrawing()
+{
+  static_cast<LayerManagerOGL*>(mManager)->MakeCurrent();
+
+  sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, mTexture);
+  sglWrapper.TexSubImage2D(LOCAL_GL_TEXTURE_2D,
+                           0,
+                           mInvalidatedRect.x - mVisibleRect.x,
+                           mInvalidatedRect.y - mVisibleRect.y,
+                           mInvalidatedRect.width,
+                           mInvalidatedRect.height,
+                           LOCAL_GL_BGRA,
+                           LOCAL_GL_UNSIGNED_BYTE,
+                           mSoftwareSurface->Data());
+
+  mSoftwareSurface = NULL;
+  mContext = NULL;
+}
+
+void
+ThebesLayerOGL::CopyFrom(ThebesLayer* aSource,
+                           const nsIntRegion& aRegion,
+                           const nsIntPoint& aDelta)
+{
+  // XXX - Roc says this is going away in the API. Ignore it for now.
+}
+
+LayerOGL::LayerType
+ThebesLayerOGL::GetType()
+{
+  return TYPE_THEBES;
+}
+
+const nsIntRect&
+ThebesLayerOGL::GetVisibleRect()
+{
+  return mVisibleRect;
+}
+
+void
+ThebesLayerOGL::RenderLayer(int aPreviousFrameBuffer)
+{
+  if (!mTexture) {
+    return;
+  }
+
+  float quadTransform[4][4];
+  /*
+   * Matrix to transform the <0.0,0.0>, <1.0,1.0> quad to the correct position
+   * and size.
+   */
+  memset(&quadTransform, 0, sizeof(quadTransform));
+  quadTransform[0][0] = (float)GetVisibleRect().width;
+  quadTransform[1][1] = (float)GetVisibleRect().height;
+  quadTransform[2][2] = 1.0f;
+  quadTransform[3][0] = (float)GetVisibleRect().x;
+  quadTransform[3][1] = (float)GetVisibleRect().y;
+  quadTransform[3][3] = 1.0f;
+
+  RGBLayerProgram *program = 
+    static_cast<LayerManagerOGL*>(mManager)->GetRGBLayerProgram();
+
+  program->Activate();
+  program->SetLayerQuadTransform(&quadTransform[0][0]);
+  program->SetLayerOpacity(GetOpacity());
+  program->SetLayerTransform(&mTransform._11);
+  program->Apply();
+
+  sglWrapper.BindTexture(LOCAL_GL_TEXTURE_2D, mTexture);
+
+  sglWrapper.DrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
+}
+
+const nsIntRect&
+ThebesLayerOGL::GetInvalidatedRect()
+{
+  return mInvalidatedRect;
+}
+
+Layer*
+ThebesLayerOGL::GetLayer()
+{
+  return this;
+}
+
+PRBool
+ThebesLayerOGL::IsEmpty()
+{
+  return !mTexture;
+}
+
+} /* layers */
+} /* mozilla */
new file mode 100644
--- /dev/null
+++ b/gfx/layers/opengl/ThebesLayerOGL.h
@@ -0,0 +1,110 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Corporation code.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Bas Schouten <bschouten@mozilla.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef GFX_THEBESLAYEROGL_H
+#define GFX_THEBESLAYEROGL_H
+
+#include "Layers.h"
+#include "LayerManagerOGL.h"
+#include "gfxImageSurface.h"
+
+
+namespace mozilla {
+namespace layers {
+
+class ThebesLayerOGL : public ThebesLayer, 
+                         public LayerOGL
+{
+public:
+  ThebesLayerOGL(LayerManager *aManager);
+  virtual ~ThebesLayerOGL();
+
+  /** Layer implementation */
+  void SetVisibleRegion(const nsIntRegion& aRegion);
+
+  /** ThebesLayer implementation */
+  void InvalidateRegion(const nsIntRegion& aRegion);
+
+  gfxContext *BeginDrawing(nsIntRegion* aRegionToDraw);
+
+  void EndDrawing();
+
+  void CopyFrom(ThebesLayer* aSource,
+                const nsIntRegion& aRegion,
+                const nsIntPoint& aDelta);
+
+  /** LayerOGL implementation */
+  LayerType GetType();
+  Layer* GetLayer();
+  virtual PRBool IsEmpty();
+  virtual void RenderLayer(int aPreviousFrameBuffer);
+
+  /** ThebesLayerOGL */
+  const nsIntRect &GetVisibleRect();
+  const nsIntRect &GetInvalidatedRect();
+
+private:
+  /** 
+   * Visible rectangle, this is used to know the size and position of the quad
+   * when doing the rendering of this layer.
+   */
+  nsIntRect mVisibleRect;
+  /**
+   * Currently invalidated rectangular area.
+   */
+  nsIntRect mInvalidatedRect;
+  /**
+   * Software surface used for this layer's drawing operation. This is created
+   * on BeginDrawing() and should be removed on EndDrawing().
+   */
+  nsRefPtr<gfxImageSurface> mSoftwareSurface;
+
+  /**
+   * We hold the reference to the context.
+   */
+  nsRefPtr<gfxContext> mContext;
+
+  /**
+   * OpenGL Texture
+   */
+  GLuint mTexture;
+
+};
+
+} /* layers */
+} /* mozilla */
+#endif /* GFX_THEBESLAYEROGL_H */
new file mode 100644
--- /dev/null
+++ b/gfx/layers/opengl/glDefs.h
@@ -0,0 +1,3028 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Corporation code.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Bas Schouten <bschouten@mozilla.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef GFX_GLDEFS_H
+#define GFX_GLDEFS_H
+
+// Definitions
+#if defined(__APPLE__XXX)
+typedef unsigned long GLenum;
+typedef unsigned long GLbitfield;
+typedef unsigned long GLuint;
+typedef long GLint;
+typedef long GLsizei;
+#else
+typedef unsigned int GLenum;
+typedef unsigned int GLbitfield;
+typedef unsigned int GLuint;
+typedef int GLint;
+typedef int GLsizei;
+#endif
+typedef unsigned char GLboolean;
+typedef char realGLboolean;
+typedef signed char GLbyte;
+typedef short GLshort;
+typedef unsigned char GLubyte;
+typedef unsigned short GLushort;
+typedef float GLfloat;
+typedef float GLclampf;
+typedef double GLdouble;
+typedef double GLclampd;
+typedef void GLvoid;
+
+typedef char GLchar;
+typedef ptrdiff_t GLsizeiptr;
+typedef ptrdiff_t GLintptr;
+
+#ifndef GLAPIENTRY
+# ifdef WIN32
+#  define GLAPIENTRY APIENTRY
+#  define GLAPI
+# else
+#  define GLAPIENTRY
+#  define GLAPI
+# endif
+#endif
+
+#define LOCAL_GL_VERSION_1_1 1
+#define LOCAL_GL_ACCUM 0x0100
+#define LOCAL_GL_LOAD 0x0101
+#define LOCAL_GL_RETURN 0x0102
+#define LOCAL_GL_MULT 0x0103
+#define LOCAL_GL_ADD 0x0104
+#define LOCAL_GL_NEVER 0x0200
+#define LOCAL_GL_LESS 0x0201
+#define LOCAL_GL_EQUAL 0x0202
+#define LOCAL_GL_LEQUAL 0x0203
+#define LOCAL_GL_GREATER 0x0204
+#define LOCAL_GL_NOTEQUAL 0x0205
+#define LOCAL_GL_GEQUAL 0x0206
+#define LOCAL_GL_ALWAYS 0x0207
+#define LOCAL_GL_CURRENT_BIT 0x00000001
+#define LOCAL_GL_POINT_BIT 0x00000002
+#define LOCAL_GL_LINE_BIT 0x00000004
+#define LOCAL_GL_POLYGON_BIT 0x00000008
+#define LOCAL_GL_POLYGON_STIPPLE_BIT 0x00000010
+#define LOCAL_GL_PIXEL_MODE_BIT 0x00000020
+#define LOCAL_GL_LIGHTING_BIT 0x00000040
+#define LOCAL_GL_FOG_BIT 0x00000080
+#define LOCAL_GL_DEPTH_BUFFER_BIT 0x00000100
+#define LOCAL_GL_ACCUM_BUFFER_BIT 0x00000200
+#define LOCAL_GL_STENCIL_BUFFER_BIT 0x00000400
+#define LOCAL_GL_VIEWPORT_BIT 0x00000800
+#define LOCAL_GL_TRANSFORM_BIT 0x00001000
+#define LOCAL_GL_ENABLE_BIT 0x00002000
+#define LOCAL_GL_COLOR_BUFFER_BIT 0x00004000
+#define LOCAL_GL_HINT_BIT 0x00008000
+#define LOCAL_GL_EVAL_BIT 0x00010000
+#define LOCAL_GL_LIST_BIT 0x00020000
+#define LOCAL_GL_TEXTURE_BIT 0x00040000
+#define LOCAL_GL_SCISSOR_BIT 0x00080000
+#define LOCAL_GL_ALL_ATTRIB_BITS 0x000fffff
+#define LOCAL_GL_POINTS 0x0000
+#define LOCAL_GL_LINES 0x0001
+#define LOCAL_GL_LINE_LOOP 0x0002
+#define LOCAL_GL_LINE_STRIP 0x0003
+#define LOCAL_GL_TRIANGLES 0x0004
+#define LOCAL_GL_TRIANGLE_STRIP 0x0005
+#define LOCAL_GL_TRIANGLE_FAN 0x0006
+#define LOCAL_GL_QUADS 0x0007
+#define LOCAL_GL_QUAD_STRIP 0x0008
+#define LOCAL_GL_POLYGON 0x0009
+#define LOCAL_GL_ZERO 0
+#define LOCAL_GL_ONE 1
+#define LOCAL_GL_SRC_COLOR 0x0300
+#define LOCAL_GL_ONE_MINUS_SRC_COLOR 0x0301
+#define LOCAL_GL_SRC_ALPHA 0x0302
+#define LOCAL_GL_ONE_MINUS_SRC_ALPHA 0x0303
+#define LOCAL_GL_DST_ALPHA 0x0304
+#define LOCAL_GL_ONE_MINUS_DST_ALPHA 0x0305
+#define LOCAL_GL_DST_COLOR 0x0306
+#define LOCAL_GL_ONE_MINUS_DST_COLOR 0x0307
+#define LOCAL_GL_SRC_ALPHA_SATURATE 0x0308
+#define LOCAL_GL_TRUE 1
+#define LOCAL_GL_FALSE 0
+#define LOCAL_GL_CLIP_PLANE0 0x3000
+#define LOCAL_GL_CLIP_PLANE1 0x3001
+#define LOCAL_GL_CLIP_PLANE2 0x3002
+#define LOCAL_GL_CLIP_PLANE3 0x3003
+#define LOCAL_GL_CLIP_PLANE4 0x3004
+#define LOCAL_GL_CLIP_PLANE5 0x3005
+#define LOCAL_GL_BYTE 0x1400
+#define LOCAL_GL_UNSIGNED_BYTE 0x1401
+#define LOCAL_GL_SHORT 0x1402
+#define LOCAL_GL_UNSIGNED_SHORT 0x1403
+#define LOCAL_GL_INT 0x1404
+#define LOCAL_GL_UNSIGNED_INT 0x1405
+#define LOCAL_GL_FLOAT 0x1406
+#define LOCAL_GL_2_BYTES 0x1407
+#define LOCAL_GL_3_BYTES 0x1408
+#define LOCAL_GL_4_BYTES 0x1409
+#define LOCAL_GL_DOUBLE 0x140A
+#define LOCAL_GL_NONE 0
+#define LOCAL_GL_FRONT_LEFT 0x0400
+#define LOCAL_GL_FRONT_RIGHT 0x0401
+#define LOCAL_GL_BACK_LEFT 0x0402
+#define LOCAL_GL_BACK_RIGHT 0x0403
+#define LOCAL_GL_FRONT 0x0404
+#define LOCAL_GL_BACK 0x0405
+#define LOCAL_GL_LEFT 0x0406
+#define LOCAL_GL_RIGHT 0x0407
+#define LOCAL_GL_FRONT_AND_BACK 0x0408
+#define LOCAL_GL_AUX0 0x0409
+#define LOCAL_GL_AUX1 0x040A
+#define LOCAL_GL_AUX2 0x040B
+#define LOCAL_GL_AUX3 0x040C
+#define LOCAL_GL_NO_ERROR 0
+#define LOCAL_GL_INVALID_ENUM 0x0500
+#define LOCAL_GL_INVALID_VALUE 0x0501
+#define LOCAL_GL_INVALID_OPERATION 0x0502
+#define LOCAL_GL_STACK_OVERFLOW 0x0503
+#define LOCAL_GL_STACK_UNDERFLOW 0x0504
+#define LOCAL_GL_OUT_OF_MEMORY 0x0505
+#define LOCAL_GL_2D 0x0600
+#define LOCAL_GL_3D 0x0601
+#define LOCAL_GL_3D_COLOR 0x0602
+#define LOCAL_GL_3D_COLOR_TEXTURE 0x0603
+#define LOCAL_GL_4D_COLOR_TEXTURE 0x0604
+#define LOCAL_GL_PASS_THROUGH_TOKEN 0x0700
+#define LOCAL_GL_POINT_TOKEN 0x0701
+#define LOCAL_GL_LINE_TOKEN 0x0702
+#define LOCAL_GL_POLYGON_TOKEN 0x0703
+#define LOCAL_GL_BITMAP_TOKEN 0x0704
+#define LOCAL_GL_DRAW_PIXEL_TOKEN 0x0705
+#define LOCAL_GL_COPY_PIXEL_TOKEN 0x0706
+#define LOCAL_GL_LINE_RESET_TOKEN 0x0707
+#define LOCAL_GL_EXP 0x0800
+#define LOCAL_GL_EXP2 0x0801
+#define LOCAL_GL_CW 0x0900
+#define LOCAL_GL_CCW 0x0901
+#define LOCAL_GL_COEFF 0x0A00
+#define LOCAL_GL_ORDER 0x0A01
+#define LOCAL_GL_DOMAIN 0x0A02
+#define LOCAL_GL_CURRENT_COLOR 0x0B00
+#define LOCAL_GL_CURRENT_INDEX 0x0B01
+#define LOCAL_GL_CURRENT_NORMAL 0x0B02
+#define LOCAL_GL_CURRENT_TEXTURE_COORDS 0x0B03
+#define LOCAL_GL_CURRENT_RASTER_COLOR 0x0B04
+#define LOCAL_GL_CURRENT_RASTER_INDEX 0x0B05
+#define LOCAL_GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
+#define LOCAL_GL_CURRENT_RASTER_POSITION 0x0B07
+#define LOCAL_GL_CURRENT_RASTER_POSITION_VALID 0x0B08
+#define LOCAL_GL_CURRENT_RASTER_DISTANCE 0x0B09
+#define LOCAL_GL_POINT_SMOOTH 0x0B10
+#define LOCAL_GL_POINT_SIZE 0x0B11
+#define LOCAL_GL_POINT_SIZE_RANGE 0x0B12
+#define LOCAL_GL_POINT_SIZE_GRANULARITY 0x0B13
+#define LOCAL_GL_LINE_SMOOTH 0x0B20
+#define LOCAL_GL_LINE_WIDTH 0x0B21
+#define LOCAL_GL_LINE_WIDTH_RANGE 0x0B22
+#define LOCAL_GL_LINE_WIDTH_GRANULARITY 0x0B23
+#define LOCAL_GL_LINE_STIPPLE 0x0B24
+#define LOCAL_GL_LINE_STIPPLE_PATTERN 0x0B25
+#define LOCAL_GL_LINE_STIPPLE_REPEAT 0x0B26
+#define LOCAL_GL_LIST_MODE 0x0B30
+#define LOCAL_GL_MAX_LIST_NESTING 0x0B31
+#define LOCAL_GL_LIST_BASE 0x0B32
+#define LOCAL_GL_LIST_INDEX 0x0B33
+#define LOCAL_GL_POLYGON_MODE 0x0B40
+#define LOCAL_GL_POLYGON_SMOOTH 0x0B41
+#define LOCAL_GL_POLYGON_STIPPLE 0x0B42
+#define LOCAL_GL_EDGE_FLAG 0x0B43
+#define LOCAL_GL_CULL_FACE 0x0B44
+#define LOCAL_GL_CULL_FACE_MODE 0x0B45
+#define LOCAL_GL_FRONT_FACE 0x0B46
+#define LOCAL_GL_LIGHTING 0x0B50
+#define LOCAL_GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
+#define LOCAL_GL_LIGHT_MODEL_TWO_SIDE 0x0B52
+#define LOCAL_GL_LIGHT_MODEL_AMBIENT 0x0B53
+#define LOCAL_GL_SHADE_MODEL 0x0B54
+#define LOCAL_GL_COLOR_MATERIAL_FACE 0x0B55
+#define LOCAL_GL_COLOR_MATERIAL_PARAMETER 0x0B56
+#define LOCAL_GL_COLOR_MATERIAL 0x0B57
+#define LOCAL_GL_FOG 0x0B60
+#define LOCAL_GL_FOG_INDEX 0x0B61
+#define LOCAL_GL_FOG_DENSITY 0x0B62
+#define LOCAL_GL_FOG_START 0x0B63
+#define LOCAL_GL_FOG_END 0x0B64
+#define LOCAL_GL_FOG_MODE 0x0B65
+#define LOCAL_GL_FOG_COLOR 0x0B66
+#define LOCAL_GL_DEPTH_RANGE 0x0B70
+#define LOCAL_GL_DEPTH_TEST 0x0B71
+#define LOCAL_GL_DEPTH_WRITEMASK 0x0B72
+#define LOCAL_GL_DEPTH_CLEAR_VALUE 0x0B73
+#define LOCAL_GL_DEPTH_FUNC 0x0B74
+#define LOCAL_GL_ACCUM_CLEAR_VALUE 0x0B80
+#define LOCAL_GL_STENCIL_TEST 0x0B90
+#define LOCAL_GL_STENCIL_CLEAR_VALUE 0x0B91
+#define LOCAL_GL_STENCIL_FUNC 0x0B92
+#define LOCAL_GL_STENCIL_VALUE_MASK 0x0B93
+#define LOCAL_GL_STENCIL_FAIL 0x0B94
+#define LOCAL_GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
+#define LOCAL_GL_STENCIL_PASS_DEPTH_PASS 0x0B96
+#define LOCAL_GL_STENCIL_REF 0x0B97
+#define LOCAL_GL_STENCIL_WRITEMASK 0x0B98
+#define LOCAL_GL_MATRIX_MODE 0x0BA0
+#define LOCAL_GL_NORMALIZE 0x0BA1
+#define LOCAL_GL_VIEWPORT 0x0BA2
+#define LOCAL_GL_MODELVIEW_STACK_DEPTH 0x0BA3
+#define LOCAL_GL_PROJECTION_STACK_DEPTH 0x0BA4
+#define LOCAL_GL_TEXTURE_STACK_DEPTH 0x0BA5
+#define LOCAL_GL_MODELVIEW_MATRIX 0x0BA6
+#define LOCAL_GL_PROJECTION_MATRIX 0x0BA7
+#define LOCAL_GL_TEXTURE_MATRIX 0x0BA8
+#define LOCAL_GL_ATTRIB_STACK_DEPTH 0x0BB0
+#define LOCAL_GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
+#define LOCAL_GL_ALPHA_TEST 0x0BC0
+#define LOCAL_GL_ALPHA_TEST_FUNC 0x0BC1
+#define LOCAL_GL_ALPHA_TEST_REF 0x0BC2
+#define LOCAL_GL_DITHER 0x0BD0
+#define LOCAL_GL_BLEND_DST 0x0BE0
+#define LOCAL_GL_BLEND_SRC 0x0BE1
+#define LOCAL_GL_BLEND 0x0BE2
+#define LOCAL_GL_LOGIC_OP_MODE 0x0BF0
+#define LOCAL_GL_INDEX_LOGIC_OP 0x0BF1
+#define LOCAL_GL_COLOR_LOGIC_OP 0x0BF2
+#define LOCAL_GL_AUX_BUFFERS 0x0C00
+#define LOCAL_GL_DRAW_BUFFER 0x0C01
+#define LOCAL_GL_READ_BUFFER 0x0C02
+#define LOCAL_GL_SCISSOR_BOX 0x0C10
+#define LOCAL_GL_SCISSOR_TEST 0x0C11
+#define LOCAL_GL_INDEX_CLEAR_VALUE 0x0C20
+#define LOCAL_GL_INDEX_WRITEMASK 0x0C21
+#define LOCAL_GL_COLOR_CLEAR_VALUE 0x0C22
+#define LOCAL_GL_COLOR_WRITEMASK 0x0C23
+#define LOCAL_GL_INDEX_MODE 0x0C30
+#define LOCAL_GL_RGBA_MODE 0x0C31
+#define LOCAL_GL_DOUBLEBUFFER 0x0C32
+#define LOCAL_GL_STEREO 0x0C33
+#define LOCAL_GL_RENDER_MODE 0x0C40
+#define LOCAL_GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
+#define LOCAL_GL_POINT_SMOOTH_HINT 0x0C51
+#define LOCAL_GL_LINE_SMOOTH_HINT 0x0C52
+#define LOCAL_GL_POLYGON_SMOOTH_HINT 0x0C53
+#define LOCAL_GL_FOG_HINT 0x0C54
+#define LOCAL_GL_TEXTURE_GEN_S 0x0C60
+#define LOCAL_GL_TEXTURE_GEN_T 0x0C61
+#define LOCAL_GL_TEXTURE_GEN_R 0x0C62
+#define LOCAL_GL_TEXTURE_GEN_Q 0x0C63
+#define LOCAL_GL_PIXEL_MAP_I_TO_I 0x0C70
+#define LOCAL_GL_PIXEL_MAP_S_TO_S 0x0C71
+#define LOCAL_GL_PIXEL_MAP_I_TO_R 0x0C72
+#define LOCAL_GL_PIXEL_MAP_I_TO_G 0x0C73
+#define LOCAL_GL_PIXEL_MAP_I_TO_B 0x0C74
+#define LOCAL_GL_PIXEL_MAP_I_TO_A 0x0C75
+#define LOCAL_GL_PIXEL_MAP_R_TO_R 0x0C76
+#define LOCAL_GL_PIXEL_MAP_G_TO_G 0x0C77
+#define LOCAL_GL_PIXEL_MAP_B_TO_B 0x0C78
+#define LOCAL_GL_PIXEL_MAP_A_TO_A 0x0C79
+#define LOCAL_GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
+#define LOCAL_GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
+#define LOCAL_GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
+#define LOCAL_GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
+#define LOCAL_GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
+#define LOCAL_GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
+#define LOCAL_GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
+#define LOCAL_GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
+#define LOCAL_GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
+#define LOCAL_GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
+#define LOCAL_GL_UNPACK_SWAP_BYTES 0x0CF0
+#define LOCAL_GL_UNPACK_LSB_FIRST 0x0CF1
+#define LOCAL_GL_UNPACK_ROW_LENGTH 0x0CF2
+#define LOCAL_GL_UNPACK_SKIP_ROWS 0x0CF3
+#define LOCAL_GL_UNPACK_SKIP_PIXELS 0x0CF4
+#define LOCAL_GL_UNPACK_ALIGNMENT 0x0CF5
+#define LOCAL_GL_PACK_SWAP_BYTES 0x0D00
+#define LOCAL_GL_PACK_LSB_FIRST 0x0D01
+#define LOCAL_GL_PACK_ROW_LENGTH 0x0D02
+#define LOCAL_GL_PACK_SKIP_ROWS 0x0D03
+#define LOCAL_GL_PACK_SKIP_PIXELS 0x0D04
+#define LOCAL_GL_PACK_ALIGNMENT 0x0D05
+#define LOCAL_GL_MAP_COLOR 0x0D10
+#define LOCAL_GL_MAP_STENCIL 0x0D11
+#define LOCAL_GL_INDEX_SHIFT 0x0D12
+#define LOCAL_GL_INDEX_OFFSET 0x0D13
+#define LOCAL_GL_RED_SCALE 0x0D14
+#define LOCAL_GL_RED_BIAS 0x0D15
+#define LOCAL_GL_ZOOM_X 0x0D16
+#define LOCAL_GL_ZOOM_Y 0x0D17
+#define LOCAL_GL_GREEN_SCALE 0x0D18
+#define LOCAL_GL_GREEN_BIAS 0x0D19
+#define LOCAL_GL_BLUE_SCALE 0x0D1A
+#define LOCAL_GL_BLUE_BIAS 0x0D1B
+#define LOCAL_GL_ALPHA_SCALE 0x0D1C
+#define LOCAL_GL_ALPHA_BIAS 0x0D1D
+#define LOCAL_GL_DEPTH_SCALE 0x0D1E
+#define LOCAL_GL_DEPTH_BIAS 0x0D1F
+#define LOCAL_GL_MAX_EVAL_ORDER 0x0D30
+#define LOCAL_GL_MAX_LIGHTS 0x0D31
+#define LOCAL_GL_MAX_CLIP_PLANES 0x0D32
+#define LOCAL_GL_MAX_TEXTURE_SIZE 0x0D33
+#define LOCAL_GL_MAX_PIXEL_MAP_TABLE 0x0D34
+#define LOCAL_GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
+#define LOCAL_GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
+#define LOCAL_GL_MAX_NAME_STACK_DEPTH 0x0D37
+#define LOCAL_GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
+#define LOCAL_GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
+#define LOCAL_GL_MAX_VIEWPORT_DIMS 0x0D3A
+#define LOCAL_GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
+#define LOCAL_GL_SUBPIXEL_BITS 0x0D50
+#define LOCAL_GL_INDEX_BITS 0x0D51
+#define LOCAL_GL_RED_BITS 0x0D52
+#define LOCAL_GL_GREEN_BITS 0x0D53
+#define LOCAL_GL_BLUE_BITS 0x0D54
+#define LOCAL_GL_ALPHA_BITS 0x0D55
+#define LOCAL_GL_DEPTH_BITS 0x0D56
+#define LOCAL_GL_STENCIL_BITS 0x0D57
+#define LOCAL_GL_ACCUM_RED_BITS 0x0D58
+#define LOCAL_GL_ACCUM_GREEN_BITS 0x0D59
+#define LOCAL_GL_ACCUM_BLUE_BITS 0x0D5A
+#define LOCAL_GL_ACCUM_ALPHA_BITS 0x0D5B
+#define LOCAL_GL_NAME_STACK_DEPTH 0x0D70
+#define LOCAL_GL_AUTO_NORMAL 0x0D80
+#define LOCAL_GL_MAP1_COLOR_4 0x0D90
+#define LOCAL_GL_MAP1_INDEX 0x0D91
+#define LOCAL_GL_MAP1_NORMAL 0x0D92
+#define LOCAL_GL_MAP1_TEXTURE_COORD_1 0x0D93
+#define LOCAL_GL_MAP1_TEXTURE_COORD_2 0x0D94
+#define LOCAL_GL_MAP1_TEXTURE_COORD_3 0x0D95
+#define LOCAL_GL_MAP1_TEXTURE_COORD_4 0x0D96
+#define LOCAL_GL_MAP1_VERTEX_3 0x0D97
+#define LOCAL_GL_MAP1_VERTEX_4 0x0D98
+#define LOCAL_GL_MAP2_COLOR_4 0x0DB0
+#define LOCAL_GL_MAP2_INDEX 0x0DB1
+#define LOCAL_GL_MAP2_NORMAL 0x0DB2
+#define LOCAL_GL_MAP2_TEXTURE_COORD_1 0x0DB3
+#define LOCAL_GL_MAP2_TEXTURE_COORD_2 0x0DB4
+#define LOCAL_GL_MAP2_TEXTURE_COORD_3 0x0DB5
+#define LOCAL_GL_MAP2_TEXTURE_COORD_4 0x0DB6
+#define LOCAL_GL_MAP2_VERTEX_3 0x0DB7
+#define LOCAL_GL_MAP2_VERTEX_4 0x0DB8
+#define LOCAL_GL_MAP1_GRID_DOMAIN 0x0DD0
+#define LOCAL_GL_MAP1_GRID_SEGMENTS 0x0DD1
+#define LOCAL_GL_MAP2_GRID_DOMAIN 0x0DD2
+#define LOCAL_GL_MAP2_GRID_SEGMENTS 0x0DD3
+#define LOCAL_GL_TEXTURE_1D 0x0DE0
+#define LOCAL_GL_TEXTURE_2D 0x0DE1
+#define LOCAL_GL_FEEDBACK_BUFFER_POINTER 0x0DF0
+#define LOCAL_GL_FEEDBACK_BUFFER_SIZE 0x0DF1
+#define LOCAL_GL_FEEDBACK_BUFFER_TYPE 0x0DF2
+#define LOCAL_GL_SELECTION_BUFFER_POINTER 0x0DF3
+#define LOCAL_GL_SELECTION_BUFFER_SIZE 0x0DF4
+#define LOCAL_GL_TEXTURE_WIDTH 0x1000
+#define LOCAL_GL_TEXTURE_HEIGHT 0x1001
+#define LOCAL_GL_TEXTURE_INTERNAL_FORMAT 0x1003
+#define LOCAL_GL_TEXTURE_BORDER_COLOR 0x1004
+#define LOCAL_GL_TEXTURE_BORDER 0x1005
+#define LOCAL_GL_DONT_CARE 0x1100
+#define LOCAL_GL_FASTEST 0x1101
+#define LOCAL_GL_NICEST 0x1102
+#define LOCAL_GL_LIGHT0 0x4000
+#define LOCAL_GL_LIGHT1 0x4001
+#define LOCAL_GL_LIGHT2 0x4002
+#define LOCAL_GL_LIGHT3 0x4003
+#define LOCAL_GL_LIGHT4 0x4004
+#define LOCAL_GL_LIGHT5 0x4005
+#define LOCAL_GL_LIGHT6 0x4006
+#define LOCAL_GL_LIGHT7 0x4007
+#define LOCAL_GL_AMBIENT 0x1200
+#define LOCAL_GL_DIFFUSE 0x1201
+#define LOCAL_GL_SPECULAR 0x1202
+#define LOCAL_GL_POSITION 0x1203
+#define LOCAL_GL_SPOT_DIRECTION 0x1204
+#define LOCAL_GL_SPOT_EXPONENT 0x1205
+#define LOCAL_GL_SPOT_CUTOFF 0x1206
+#define LOCAL_GL_CONSTANT_ATTENUATION 0x1207
+#define LOCAL_GL_LINEAR_ATTENUATION 0x1208
+#define LOCAL_GL_QUADRATIC_ATTENUATION 0x1209
+#define LOCAL_GL_COMPILE 0x1300
+#define LOCAL_GL_COMPILE_AND_EXECUTE 0x1301
+#define LOCAL_GL_CLEAR 0x1500
+#define LOCAL_GL_AND 0x1501
+#define LOCAL_GL_AND_REVERSE 0x1502
+#define LOCAL_GL_COPY 0x1503
+#define LOCAL_GL_AND_INVERTED 0x1504
+#define LOCAL_GL_NOOP 0x1505
+#define LOCAL_GL_XOR 0x1506
+#define LOCAL_GL_OR 0x1507
+#define LOCAL_GL_NOR 0x1508
+#define LOCAL_GL_EQUIV 0x1509
+#define LOCAL_GL_INVERT 0x150A
+#define LOCAL_GL_OR_REVERSE 0x150B
+#define LOCAL_GL_COPY_INVERTED 0x150C
+#define LOCAL_GL_OR_INVERTED 0x150D
+#define LOCAL_GL_NAND 0x150E
+#define LOCAL_GL_SET 0x150F
+#define LOCAL_GL_EMISSION 0x1600
+#define LOCAL_GL_SHININESS 0x1601
+#define LOCAL_GL_AMBIENT_AND_DIFFUSE 0x1602
+#define LOCAL_GL_COLOR_INDEXES 0x1603
+#define LOCAL_GL_MODELVIEW 0x1700
+#define LOCAL_GL_PROJECTION 0x1701
+#define LOCAL_GL_TEXTURE 0x1702
+#define LOCAL_GL_COLOR 0x1800
+#define LOCAL_GL_DEPTH 0x1801
+#define LOCAL_GL_STENCIL 0x1802
+#define LOCAL_GL_COLOR_INDEX 0x1900
+#define LOCAL_GL_STENCIL_INDEX 0x1901
+#define LOCAL_GL_DEPTH_COMPONENT 0x1902
+#define LOCAL_GL_RED 0x1903
+#define LOCAL_GL_GREEN 0x1904
+#define LOCAL_GL_BLUE 0x1905
+#define LOCAL_GL_ALPHA 0x1906
+#define LOCAL_GL_RGB 0x1907
+#define LOCAL_GL_RGBA 0x1908
+#define LOCAL_GL_LUMINANCE 0x1909
+#define LOCAL_GL_LUMINANCE_ALPHA 0x190A
+#define LOCAL_GL_BITMAP 0x1A00
+#define LOCAL_GL_POINT 0x1B00
+#define LOCAL_GL_LINE 0x1B01
+#define LOCAL_GL_FILL 0x1B02
+#define LOCAL_GL_RENDER 0x1C00
+#define LOCAL_GL_FEEDBACK 0x1C01
+#define LOCAL_GL_SELECT 0x1C02
+#define LOCAL_GL_FLAT 0x1D00
+#define LOCAL_GL_SMOOTH 0x1D01
+#define LOCAL_GL_KEEP 0x1E00
+#define LOCAL_GL_REPLACE 0x1E01
+#define LOCAL_GL_INCR 0x1E02
+#define LOCAL_GL_DECR 0x1E03
+#define LOCAL_GL_VENDOR 0x1F00
+#define LOCAL_GL_RENDERER 0x1F01
+#define LOCAL_GL_VERSION 0x1F02
+#define LOCAL_GL_EXTENSIONS 0x1F03
+#define LOCAL_GL_S 0x2000
+#define LOCAL_GL_T 0x2001
+#define LOCAL_GL_R 0x2002
+#define LOCAL_GL_Q 0x2003
+#define LOCAL_GL_MODULATE 0x2100
+#define LOCAL_GL_DECAL 0x2101
+#define LOCAL_GL_TEXTURE_ENV_MODE 0x2200
+#define LOCAL_GL_TEXTURE_ENV_COLOR 0x2201
+#define LOCAL_GL_TEXTURE_ENV 0x2300
+#define LOCAL_GL_EYE_LINEAR 0x2400
+#define LOCAL_GL_OBJECT_LINEAR 0x2401
+#define LOCAL_GL_SPHERE_MAP 0x2402
+#define LOCAL_GL_TEXTURE_GEN_MODE 0x2500
+#define LOCAL_GL_OBJECT_PLANE 0x2501
+#define LOCAL_GL_EYE_PLANE 0x2502
+#define LOCAL_GL_NEAREST 0x2600
+#define LOCAL_GL_LINEAR 0x2601
+#define LOCAL_GL_NEAREST_MIPMAP_NEAREST 0x2700
+#define LOCAL_GL_LINEAR_MIPMAP_NEAREST 0x2701
+#define LOCAL_GL_NEAREST_MIPMAP_LINEAR 0x2702
+#define LOCAL_GL_LINEAR_MIPMAP_LINEAR 0x2703
+#define LOCAL_GL_TEXTURE_MAG_FILTER 0x2800
+#define LOCAL_GL_TEXTURE_MIN_FILTER 0x2801
+#define LOCAL_GL_TEXTURE_WRAP_S 0x2802
+#define LOCAL_GL_TEXTURE_WRAP_T 0x2803
+#define LOCAL_GL_CLAMP 0x2900
+#define LOCAL_GL_REPEAT 0x2901
+#define LOCAL_GL_CLIENT_PIXEL_STORE_BIT 0x00000001
+#define LOCAL_GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
+#define LOCAL_GL_CLIENT_ALL_ATTRIB_BITS 0xffffffff
+#define LOCAL_GL_POLYGON_OFFSET_FACTOR 0x8038
+#define LOCAL_GL_POLYGON_OFFSET_UNITS 0x2A00
+#define LOCAL_GL_POLYGON_OFFSET_POINT 0x2A01
+#define LOCAL_GL_POLYGON_OFFSET_LINE 0x2A02
+#define LOCAL_GL_POLYGON_OFFSET_FILL 0x8037
+#define LOCAL_GL_ALPHA4 0x803B
+#define LOCAL_GL_ALPHA8 0x803C
+#define LOCAL_GL_ALPHA12 0x803D
+#define LOCAL_GL_ALPHA16 0x803E
+#define LOCAL_GL_LUMINANCE4 0x803F
+#define LOCAL_GL_LUMINANCE8 0x8040
+#define LOCAL_GL_LUMINANCE12 0x8041
+#define LOCAL_GL_LUMINANCE16 0x8042
+#define LOCAL_GL_LUMINANCE4_ALPHA4 0x8043
+#define LOCAL_GL_LUMINANCE6_ALPHA2 0x8044
+#define LOCAL_GL_LUMINANCE8_ALPHA8 0x8045
+#define LOCAL_GL_LUMINANCE12_ALPHA4 0x8046
+#define LOCAL_GL_LUMINANCE12_ALPHA12 0x8047
+#define LOCAL_GL_LUMINANCE16_ALPHA16 0x8048
+#define LOCAL_GL_INTENSITY 0x8049
+#define LOCAL_GL_INTENSITY4 0x804A
+#define LOCAL_GL_INTENSITY8 0x804B
+#define LOCAL_GL_INTENSITY12 0x804C
+#define LOCAL_GL_INTENSITY16 0x804D
+#define LOCAL_GL_R3_G3_B2 0x2A10
+#define LOCAL_GL_RGB4 0x804F
+#define LOCAL_GL_RGB5 0x8050
+#define LOCAL_GL_RGB8 0x8051
+#define LOCAL_GL_RGB10 0x8052
+#define LOCAL_GL_RGB12 0x8053
+#define LOCAL_GL_RGB16 0x8054
+#define LOCAL_GL_RGBA2 0x8055
+#define LOCAL_GL_RGBA4 0x8056
+#define LOCAL_GL_RGB5_A1 0x8057
+#define LOCAL_GL_RGBA8 0x8058
+#define LOCAL_GL_RGB10_A2 0x8059
+#define LOCAL_GL_RGBA12 0x805A
+#define LOCAL_GL_RGBA16 0x805B
+#define LOCAL_GL_TEXTURE_RED_SIZE 0x805C
+#define LOCAL_GL_TEXTURE_GREEN_SIZE 0x805D
+#define LOCAL_GL_TEXTURE_BLUE_SIZE 0x805E
+#define LOCAL_GL_TEXTURE_ALPHA_SIZE 0x805F
+#define LOCAL_GL_TEXTURE_LUMINANCE_SIZE 0x8060
+#define LOCAL_GL_TEXTURE_INTENSITY_SIZE 0x8061
+#define LOCAL_GL_PROXY_TEXTURE_1D 0x8063
+#define LOCAL_GL_PROXY_TEXTURE_2D 0x8064
+#define LOCAL_GL_TEXTURE_PRIORITY 0x8066
+#define LOCAL_GL_TEXTURE_RESIDENT 0x8067
+#define LOCAL_GL_TEXTURE_BINDING_1D 0x8068
+#define LOCAL_GL_TEXTURE_BINDING_2D 0x8069
+#define LOCAL_GL_VERTEX_ARRAY 0x8074
+#define LOCAL_GL_NORMAL_ARRAY 0x8075
+#define LOCAL_GL_COLOR_ARRAY 0x8076
+#define LOCAL_GL_INDEX_ARRAY 0x8077
+#define LOCAL_GL_TEXTURE_COORD_ARRAY 0x8078
+#define LOCAL_GL_EDGE_FLAG_ARRAY 0x8079
+#define LOCAL_GL_VERTEX_ARRAY_SIZE 0x807A
+#define LOCAL_GL_VERTEX_ARRAY_TYPE 0x807B
+#define LOCAL_GL_VERTEX_ARRAY_STRIDE 0x807C
+#define LOCAL_GL_NORMAL_ARRAY_TYPE 0x807E
+#define LOCAL_GL_NORMAL_ARRAY_STRIDE 0x807F
+#define LOCAL_GL_COLOR_ARRAY_SIZE 0x8081
+#define LOCAL_GL_COLOR_ARRAY_TYPE 0x8082
+#define LOCAL_GL_COLOR_ARRAY_STRIDE 0x8083
+#define LOCAL_GL_INDEX_ARRAY_TYPE 0x8085
+#define LOCAL_GL_INDEX_ARRAY_STRIDE 0x8086
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
+#define LOCAL_GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
+#define LOCAL_GL_VERTEX_ARRAY_POINTER 0x808E
+#define LOCAL_GL_NORMAL_ARRAY_POINTER 0x808F
+#define LOCAL_GL_COLOR_ARRAY_POINTER 0x8090
+#define LOCAL_GL_INDEX_ARRAY_POINTER 0x8091
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
+#define LOCAL_GL_EDGE_FLAG_ARRAY_POINTER 0x8093
+#define LOCAL_GL_V2F 0x2A20
+#define LOCAL_GL_V3F 0x2A21
+#define LOCAL_GL_C4UB_V2F 0x2A22
+#define LOCAL_GL_C4UB_V3F 0x2A23
+#define LOCAL_GL_C3F_V3F 0x2A24
+#define LOCAL_GL_N3F_V3F 0x2A25
+#define LOCAL_GL_C4F_N3F_V3F 0x2A26
+#define LOCAL_GL_T2F_V3F 0x2A27
+#define LOCAL_GL_T4F_V4F 0x2A28
+#define LOCAL_GL_T2F_C4UB_V3F 0x2A29
+#define LOCAL_GL_T2F_C3F_V3F 0x2A2A
+#define LOCAL_GL_T2F_N3F_V3F 0x2A2B
+#define LOCAL_GL_T2F_C4F_N3F_V3F 0x2A2C
+#define LOCAL_GL_T4F_C4F_N3F_V4F 0x2A2D
+#define LOCAL_GL_LOGIC_OP GL_INDEX_LOGIC_OP
+#define LOCAL_GL_TEXTURE_COMPONENTS GL_TEXTURE_INTERNAL_FORMAT
+#define LOCAL_GL_COLOR_INDEX1_EXT 0x80E2
+#define LOCAL_GL_COLOR_INDEX2_EXT 0x80E3
+#define LOCAL_GL_COLOR_INDEX4_EXT 0x80E4
+#define LOCAL_GL_COLOR_INDEX8_EXT 0x80E5
+#define LOCAL_GL_COLOR_INDEX12_EXT 0x80E6
+#define LOCAL_GL_COLOR_INDEX16_EXT 0x80E7
+#define LOCAL_GL_VERSION_1_2 1
+#define LOCAL_GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
+#define LOCAL_GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
+#define LOCAL_GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
+#define LOCAL_GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
+#define LOCAL_GL_UNSIGNED_BYTE_3_3_2 0x8032
+#define LOCAL_GL_UNSIGNED_SHORT_4_4_4_4 0x8033
+#define LOCAL_GL_UNSIGNED_SHORT_5_5_5_1 0x8034
+#define LOCAL_GL_UNSIGNED_INT_8_8_8_8 0x8035
+#define LOCAL_GL_UNSIGNED_INT_10_10_10_2 0x8036
+#define LOCAL_GL_RESCALE_NORMAL 0x803A
+#define LOCAL_GL_TEXTURE_BINDING_3D 0x806A
+#define LOCAL_GL_PACK_SKIP_IMAGES 0x806B
+#define LOCAL_GL_PACK_IMAGE_HEIGHT 0x806C
+#define LOCAL_GL_UNPACK_SKIP_IMAGES 0x806D
+#define LOCAL_GL_UNPACK_IMAGE_HEIGHT 0x806E
+#define LOCAL_GL_TEXTURE_3D 0x806F
+#define LOCAL_GL_PROXY_TEXTURE_3D 0x8070
+#define LOCAL_GL_TEXTURE_DEPTH 0x8071
+#define LOCAL_GL_TEXTURE_WRAP_R 0x8072
+#define LOCAL_GL_MAX_3D_TEXTURE_SIZE 0x8073
+#define LOCAL_GL_BGR 0x80E0
+#define LOCAL_GL_BGRA 0x80E1
+#define LOCAL_GL_MAX_ELEMENTS_VERTICES 0x80E8
+#define LOCAL_GL_MAX_ELEMENTS_INDICES 0x80E9
+#define LOCAL_GL_CLAMP_TO_EDGE 0x812F
+#define LOCAL_GL_TEXTURE_MIN_LOD 0x813A
+#define LOCAL_GL_TEXTURE_MAX_LOD 0x813B
+#define LOCAL_GL_TEXTURE_BASE_LEVEL 0x813C
+#define LOCAL_GL_TEXTURE_MAX_LEVEL 0x813D
+#define LOCAL_GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
+#define LOCAL_GL_SINGLE_COLOR 0x81F9
+#define LOCAL_GL_SEPARATE_SPECULAR_COLOR 0x81FA
+#define LOCAL_GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
+#define LOCAL_GL_UNSIGNED_SHORT_5_6_5 0x8363
+#define LOCAL_GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
+#define LOCAL_GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
+#define LOCAL_GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
+#define LOCAL_GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
+#define LOCAL_GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
+#define LOCAL_GL_ALIASED_POINT_SIZE_RANGE 0x846D
+#define LOCAL_GL_ALIASED_LINE_WIDTH_RANGE 0x846E
+#define LOCAL_GL_VERSION_1_3 1
+#define LOCAL_GL_MULTISAMPLE 0x809D
+#define LOCAL_GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
+#define LOCAL_GL_SAMPLE_ALPHA_TO_ONE 0x809F
+#define LOCAL_GL_SAMPLE_COVERAGE 0x80A0
+#define LOCAL_GL_SAMPLE_BUFFERS 0x80A8
+#define LOCAL_GL_SAMPLES 0x80A9
+#define LOCAL_GL_SAMPLE_COVERAGE_VALUE 0x80AA
+#define LOCAL_GL_SAMPLE_COVERAGE_INVERT 0x80AB
+#define LOCAL_GL_CLAMP_TO_BORDER 0x812D
+#define LOCAL_GL_TEXTURE0 0x84C0
+#define LOCAL_GL_TEXTURE1 0x84C1
+#define LOCAL_GL_TEXTURE2 0x84C2
+#define LOCAL_GL_TEXTURE3 0x84C3
+#define LOCAL_GL_TEXTURE4 0x84C4
+#define LOCAL_GL_TEXTURE5 0x84C5
+#define LOCAL_GL_TEXTURE6 0x84C6
+#define LOCAL_GL_TEXTURE7 0x84C7
+#define LOCAL_GL_TEXTURE8 0x84C8
+#define LOCAL_GL_TEXTURE9 0x84C9
+#define LOCAL_GL_TEXTURE10 0x84CA
+#define LOCAL_GL_TEXTURE11 0x84CB
+#define LOCAL_GL_TEXTURE12 0x84CC
+#define LOCAL_GL_TEXTURE13 0x84CD
+#define LOCAL_GL_TEXTURE14 0x84CE
+#define LOCAL_GL_TEXTURE15 0x84CF
+#define LOCAL_GL_TEXTURE16 0x84D0
+#define LOCAL_GL_TEXTURE17 0x84D1
+#define LOCAL_GL_TEXTURE18 0x84D2
+#define LOCAL_GL_TEXTURE19 0x84D3
+#define LOCAL_GL_TEXTURE20 0x84D4
+#define LOCAL_GL_TEXTURE21 0x84D5
+#define LOCAL_GL_TEXTURE22 0x84D6
+#define LOCAL_GL_TEXTURE23 0x84D7
+#define LOCAL_GL_TEXTURE24 0x84D8
+#define LOCAL_GL_TEXTURE25 0x84D9
+#define LOCAL_GL_TEXTURE26 0x84DA
+#define LOCAL_GL_TEXTURE27 0x84DB
+#define LOCAL_GL_TEXTURE28 0x84DC
+#define LOCAL_GL_TEXTURE29 0x84DD
+#define LOCAL_GL_TEXTURE30 0x84DE
+#define LOCAL_GL_TEXTURE31 0x84DF
+#define LOCAL_GL_ACTIVE_TEXTURE 0x84E0
+#define LOCAL_GL_CLIENT_ACTIVE_TEXTURE 0x84E1
+#define LOCAL_GL_MAX_TEXTURE_UNITS 0x84E2
+#define LOCAL_GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
+#define LOCAL_GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
+#define LOCAL_GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
+#define LOCAL_GL_TRANSPOSE_COLOR_MATRIX 0x84E6
+#define LOCAL_GL_SUBTRACT 0x84E7
+#define LOCAL_GL_COMPRESSED_ALPHA 0x84E9
+#define LOCAL_GL_COMPRESSED_LUMINANCE 0x84EA
+#define LOCAL_GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
+#define LOCAL_GL_COMPRESSED_INTENSITY 0x84EC
+#define LOCAL_GL_COMPRESSED_RGB 0x84ED
+#define LOCAL_GL_COMPRESSED_RGBA 0x84EE
+#define LOCAL_GL_TEXTURE_COMPRESSION_HINT 0x84EF
+#define LOCAL_GL_NORMAL_MAP 0x8511
+#define LOCAL_GL_REFLECTION_MAP 0x8512
+#define LOCAL_GL_TEXTURE_CUBE_MAP 0x8513
+#define LOCAL_GL_TEXTURE_BINDING_CUBE_MAP 0x8514
+#define LOCAL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
+#define LOCAL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
+#define LOCAL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
+#define LOCAL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
+#define LOCAL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
+#define LOCAL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
+#define LOCAL_GL_PROXY_TEXTURE_CUBE_MAP 0x851B
+#define LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
+#define LOCAL_GL_COMBINE 0x8570
+#define LOCAL_GL_COMBINE_RGB 0x8571
+#define LOCAL_GL_COMBINE_ALPHA 0x8572
+#define LOCAL_GL_RGB_SCALE 0x8573
+#define LOCAL_GL_ADD_SIGNED 0x8574
+#define LOCAL_GL_INTERPOLATE 0x8575
+#define LOCAL_GL_CONSTANT 0x8576
+#define LOCAL_GL_PRIMARY_COLOR 0x8577
+#define LOCAL_GL_PREVIOUS 0x8578
+#define LOCAL_GL_SOURCE0_RGB 0x8580
+#define LOCAL_GL_SOURCE1_RGB 0x8581
+#define LOCAL_GL_SOURCE2_RGB 0x8582
+#define LOCAL_GL_SOURCE0_ALPHA 0x8588
+#define LOCAL_GL_SOURCE1_ALPHA 0x8589
+#define LOCAL_GL_SOURCE2_ALPHA 0x858A
+#define LOCAL_GL_OPERAND0_RGB 0x8590
+#define LOCAL_GL_OPERAND1_RGB 0x8591
+#define LOCAL_GL_OPERAND2_RGB 0x8592
+#define LOCAL_GL_OPERAND0_ALPHA 0x8598
+#define LOCAL_GL_OPERAND1_ALPHA 0x8599
+#define LOCAL_GL_OPERAND2_ALPHA 0x859A
+#define LOCAL_GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
+#define LOCAL_GL_TEXTURE_COMPRESSED 0x86A1
+#define LOCAL_GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define LOCAL_GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
+#define LOCAL_GL_DOT3_RGB 0x86AE
+#define LOCAL_GL_DOT3_RGBA 0x86AF
+#define LOCAL_GL_MULTISAMPLE_BIT 0x20000000
+#define LOCAL_GL_VERSION_1_4 1
+#define LOCAL_GL_BLEND_DST_RGB 0x80C8
+#define LOCAL_GL_BLEND_SRC_RGB 0x80C9
+#define LOCAL_GL_BLEND_DST_ALPHA 0x80CA
+#define LOCAL_GL_BLEND_SRC_ALPHA 0x80CB
+#define LOCAL_GL_POINT_SIZE_MIN 0x8126
+#define LOCAL_GL_POINT_SIZE_MAX 0x8127
+#define LOCAL_GL_POINT_FADE_THRESHOLD_SIZE 0x8128
+#define LOCAL_GL_POINT_DISTANCE_ATTENUATION 0x8129
+#define LOCAL_GL_GENERATE_MIPMAP 0x8191
+#define LOCAL_GL_GENERATE_MIPMAP_HINT 0x8192
+#define LOCAL_GL_DEPTH_COMPONENT16 0x81A5
+#define LOCAL_GL_DEPTH_COMPONENT24 0x81A6
+#define LOCAL_GL_DEPTH_COMPONENT32 0x81A7
+#define LOCAL_GL_MIRRORED_REPEAT 0x8370
+#define LOCAL_GL_FOG_COORDINATE_SOURCE 0x8450
+#define LOCAL_GL_FOG_COORDINATE 0x8451
+#define LOCAL_GL_FRAGMENT_DEPTH 0x8452
+#define LOCAL_GL_CURRENT_FOG_COORDINATE 0x8453
+#define LOCAL_GL_FOG_COORDINATE_ARRAY_TYPE 0x8454
+#define LOCAL_GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455
+#define LOCAL_GL_FOG_COORDINATE_ARRAY_POINTER 0x8456
+#define LOCAL_GL_FOG_COORDINATE_ARRAY 0x8457
+#define LOCAL_GL_COLOR_SUM 0x8458
+#define LOCAL_GL_CURRENT_SECONDARY_COLOR 0x8459
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY 0x845E
+#define LOCAL_GL_MAX_TEXTURE_LOD_BIAS 0x84FD
+#define LOCAL_GL_TEXTURE_FILTER_CONTROL 0x8500
+#define LOCAL_GL_TEXTURE_LOD_BIAS 0x8501
+#define LOCAL_GL_INCR_WRAP 0x8507
+#define LOCAL_GL_DECR_WRAP 0x8508
+#define LOCAL_GL_TEXTURE_DEPTH_SIZE 0x884A
+#define LOCAL_GL_DEPTH_TEXTURE_MODE 0x884B
+#define LOCAL_GL_TEXTURE_COMPARE_MODE 0x884C
+#define LOCAL_GL_TEXTURE_COMPARE_FUNC 0x884D
+#define LOCAL_GL_COMPARE_R_TO_TEXTURE 0x884E
+#define LOCAL_GL_VERSION_1_5 1
+#define LOCAL_GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
+#define LOCAL_GL_FOG_COORD GL_FOG_COORDINATE
+#define LOCAL_GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY
+#define LOCAL_GL_SRC0_RGB GL_SOURCE0_RGB
+#define LOCAL_GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER
+#define LOCAL_GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
+#define LOCAL_GL_SRC1_ALPHA GL_SOURCE1_ALPHA
+#define LOCAL_GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
+#define LOCAL_GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE
+#define LOCAL_GL_SRC0_ALPHA GL_SOURCE0_ALPHA
+#define LOCAL_GL_SRC1_RGB GL_SOURCE1_RGB
+#define LOCAL_GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
+#define LOCAL_GL_SRC2_ALPHA GL_SOURCE2_ALPHA
+#define LOCAL_GL_SRC2_RGB GL_SOURCE2_RGB
+#define LOCAL_GL_BUFFER_SIZE 0x8764
+#define LOCAL_GL_BUFFER_USAGE 0x8765
+#define LOCAL_GL_QUERY_COUNTER_BITS 0x8864
+#define LOCAL_GL_CURRENT_QUERY 0x8865
+#define LOCAL_GL_QUERY_RESULT 0x8866
+#define LOCAL_GL_QUERY_RESULT_AVAILABLE 0x8867
+#define LOCAL_GL_ARRAY_BUFFER 0x8892
+#define LOCAL_GL_ELEMENT_ARRAY_BUFFER 0x8893
+#define LOCAL_GL_ARRAY_BUFFER_BINDING 0x8894
+#define LOCAL_GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
+#define LOCAL_GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
+#define LOCAL_GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
+#define LOCAL_GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
+#define LOCAL_GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
+#define LOCAL_GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
+#define LOCAL_GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
+#define LOCAL_GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+#define LOCAL_GL_READ_ONLY 0x88B8
+#define LOCAL_GL_WRITE_ONLY 0x88B9
+#define LOCAL_GL_READ_WRITE 0x88BA
+#define LOCAL_GL_BUFFER_ACCESS 0x88BB
+#define LOCAL_GL_BUFFER_MAPPED 0x88BC
+#define LOCAL_GL_BUFFER_MAP_POINTER 0x88BD
+#define LOCAL_GL_STREAM_DRAW 0x88E0
+#define LOCAL_GL_STREAM_READ 0x88E1
+#define LOCAL_GL_STREAM_COPY 0x88E2
+#define LOCAL_GL_STATIC_DRAW 0x88E4
+#define LOCAL_GL_STATIC_READ 0x88E5
+#define LOCAL_GL_STATIC_COPY 0x88E6
+#define LOCAL_GL_DYNAMIC_DRAW 0x88E8
+#define LOCAL_GL_DYNAMIC_READ 0x88E9
+#define LOCAL_GL_DYNAMIC_COPY 0x88EA
+#define LOCAL_GL_SAMPLES_PASSED 0x8914
+#define LOCAL_GL_VERSION_2_0 1
+#define LOCAL_GL_BLEND_EQUATION_RGB 0x8009
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
+#define LOCAL_GL_CURRENT_VERTEX_ATTRIB 0x8626
+#define LOCAL_GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
+#define LOCAL_GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
+#define LOCAL_GL_STENCIL_BACK_FUNC 0x8800
+#define LOCAL_GL_STENCIL_BACK_FAIL 0x8801
+#define LOCAL_GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
+#define LOCAL_GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
+#define LOCAL_GL_MAX_DRAW_BUFFERS 0x8824
+#define LOCAL_GL_DRAW_BUFFER0 0x8825
+#define LOCAL_GL_DRAW_BUFFER1 0x8826
+#define LOCAL_GL_DRAW_BUFFER2 0x8827
+#define LOCAL_GL_DRAW_BUFFER3 0x8828
+#define LOCAL_GL_DRAW_BUFFER4 0x8829
+#define LOCAL_GL_DRAW_BUFFER5 0x882A
+#define LOCAL_GL_DRAW_BUFFER6 0x882B
+#define LOCAL_GL_DRAW_BUFFER7 0x882C
+#define LOCAL_GL_DRAW_BUFFER8 0x882D
+#define LOCAL_GL_DRAW_BUFFER9 0x882E
+#define LOCAL_GL_DRAW_BUFFER10 0x882F
+#define LOCAL_GL_DRAW_BUFFER11 0x8830
+#define LOCAL_GL_DRAW_BUFFER12 0x8831
+#define LOCAL_GL_DRAW_BUFFER13 0x8832
+#define LOCAL_GL_DRAW_BUFFER14 0x8833
+#define LOCAL_GL_DRAW_BUFFER15 0x8834
+#define LOCAL_GL_BLEND_EQUATION_ALPHA 0x883D
+#define LOCAL_GL_POINT_SPRITE 0x8861
+#define LOCAL_GL_COORD_REPLACE 0x8862
+#define LOCAL_GL_MAX_VERTEX_ATTRIBS 0x8869
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define LOCAL_GL_MAX_TEXTURE_COORDS 0x8871
+#define LOCAL_GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#define LOCAL_GL_FRAGMENT_SHADER 0x8B30
+#define LOCAL_GL_VERTEX_SHADER 0x8B31
+#define LOCAL_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define LOCAL_GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
+#define LOCAL_GL_MAX_VARYING_FLOATS 0x8B4B
+#define LOCAL_GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define LOCAL_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define LOCAL_GL_SHADER_TYPE 0x8B4F
+#define LOCAL_GL_FLOAT_VEC2 0x8B50
+#define LOCAL_GL_FLOAT_VEC3 0x8B51
+#define LOCAL_GL_FLOAT_VEC4 0x8B52
+#define LOCAL_GL_INT_VEC2 0x8B53
+#define LOCAL_GL_INT_VEC3 0x8B54
+#define LOCAL_GL_INT_VEC4 0x8B55
+#define LOCAL_GL_BOOL 0x8B56
+#define LOCAL_GL_BOOL_VEC2 0x8B57
+#define LOCAL_GL_BOOL_VEC3 0x8B58
+#define LOCAL_GL_BOOL_VEC4 0x8B59
+#define LOCAL_GL_FLOAT_MAT2 0x8B5A
+#define LOCAL_GL_FLOAT_MAT3 0x8B5B
+#define LOCAL_GL_FLOAT_MAT4 0x8B5C
+#define LOCAL_GL_SAMPLER_1D 0x8B5D
+#define LOCAL_GL_SAMPLER_2D 0x8B5E
+#define LOCAL_GL_SAMPLER_3D 0x8B5F
+#define LOCAL_GL_SAMPLER_CUBE 0x8B60
+#define LOCAL_GL_SAMPLER_1D_SHADOW 0x8B61
+#define LOCAL_GL_SAMPLER_2D_SHADOW 0x8B62
+#define LOCAL_GL_DELETE_STATUS 0x8B80
+#define LOCAL_GL_COMPILE_STATUS 0x8B81
+#define LOCAL_GL_LINK_STATUS 0x8B82
+#define LOCAL_GL_VALIDATE_STATUS 0x8B83
+#define LOCAL_GL_INFO_LOG_LENGTH 0x8B84
+#define LOCAL_GL_ATTACHED_SHADERS 0x8B85
+#define LOCAL_GL_ACTIVE_UNIFORMS 0x8B86
+#define LOCAL_GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
+#define LOCAL_GL_SHADER_SOURCE_LENGTH 0x8B88
+#define LOCAL_GL_ACTIVE_ATTRIBUTES 0x8B89
+#define LOCAL_GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
+#define LOCAL_GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#define LOCAL_GL_SHADING_LANGUAGE_VERSION 0x8B8C
+#define LOCAL_GL_CURRENT_PROGRAM 0x8B8D
+#define LOCAL_GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
+#define LOCAL_GL_LOWER_LEFT 0x8CA1
+#define LOCAL_GL_UPPER_LEFT 0x8CA2
+#define LOCAL_GL_STENCIL_BACK_REF 0x8CA3
+#define LOCAL_GL_STENCIL_BACK_VALUE_MASK 0x8CA4
+#define LOCAL_GL_STENCIL_BACK_WRITEMASK 0x8CA5
+#define LOCAL_GL_3DFX_multisample 1
+#define LOCAL_GL_MULTISAMPLE_3DFX 0x86B2
+#define LOCAL_GL_SAMPLE_BUFFERS_3DFX 0x86B3
+#define LOCAL_GL_SAMPLES_3DFX 0x86B4
+#define LOCAL_GL_MULTISAMPLE_BIT_3DFX 0x20000000
+#define LOCAL_GL_3DFX_tbuffer 1
+#define LOCAL_GL_3DFX_texture_compression_FXT1 1
+#define LOCAL_GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
+#define LOCAL_GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
+#define LOCAL_GL_APPLE_client_storage 1
+#define LOCAL_GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
+#define LOCAL_GL_APPLE_element_array 1
+#define LOCAL_GL_ELEMENT_ARRAY_APPLE 0x8768
+#define LOCAL_GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769
+#define LOCAL_GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A
+#define LOCAL_GL_APPLE_fence 1
+#define LOCAL_GL_DRAW_PIXELS_APPLE 0x8A0A
+#define LOCAL_GL_FENCE_APPLE 0x8A0B
+#define LOCAL_GL_APPLE_float_pixels 1
+#define LOCAL_GL_HALF_APPLE 0x140B
+#define LOCAL_GL_RGBA_FLOAT32_APPLE 0x8814
+#define LOCAL_GL_RGB_FLOAT32_APPLE 0x8815
+#define LOCAL_GL_ALPHA_FLOAT32_APPLE 0x8816
+#define LOCAL_GL_INTENSITY_FLOAT32_APPLE 0x8817
+#define LOCAL_GL_LUMINANCE_FLOAT32_APPLE 0x8818
+#define LOCAL_GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819
+#define LOCAL_GL_RGBA_FLOAT16_APPLE 0x881A
+#define LOCAL_GL_RGB_FLOAT16_APPLE 0x881B
+#define LOCAL_GL_ALPHA_FLOAT16_APPLE 0x881C
+#define LOCAL_GL_INTENSITY_FLOAT16_APPLE 0x881D
+#define LOCAL_GL_LUMINANCE_FLOAT16_APPLE 0x881E
+#define LOCAL_GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F
+#define LOCAL_GL_COLOR_FLOAT_APPLE 0x8A0F
+#define LOCAL_GL_APPLE_pixel_buffer 1
+#define LOCAL_GL_MIN_PBUFFER_VIEWPORT_DIMS_APPLE 0x8A10
+#define LOCAL_GL_APPLE_specular_vector 1
+#define LOCAL_GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
+#define LOCAL_GL_APPLE_texture_range 1
+#define LOCAL_GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7
+#define LOCAL_GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8
+#define LOCAL_GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC
+#define LOCAL_GL_STORAGE_PRIVATE_APPLE 0x85BD
+#define LOCAL_GL_STORAGE_CACHED_APPLE 0x85BE
+#define LOCAL_GL_STORAGE_SHARED_APPLE 0x85BF
+#define LOCAL_GL_APPLE_transform_hint 1
+#define LOCAL_GL_TRANSFORM_HINT_APPLE 0x85B1
+#define LOCAL_GL_APPLE_vertex_array_object 1
+#define LOCAL_GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5
+#define LOCAL_GL_APPLE_vertex_array_range 1
+#define LOCAL_GL_VERTEX_ARRAY_RANGE_APPLE 0x851D
+#define LOCAL_GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E
+#define LOCAL_GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F
+#define LOCAL_GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE 0x8520
+#define LOCAL_GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521
+#define LOCAL_GL_STORAGE_CACHED_APPLE 0x85BE
+#define LOCAL_GL_STORAGE_SHARED_APPLE 0x85BF
+#define LOCAL_GL_APPLE_ycbcr_422 1
+#define LOCAL_GL_YCBCR_422_APPLE 0x85B9
+#define LOCAL_GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
+#define LOCAL_GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
+#define LOCAL_GL_ARB_color_buffer_float 1
+#define LOCAL_GL_RGBA_FLOAT_MODE_ARB 0x8820
+#define LOCAL_GL_CLAMP_VERTEX_COLOR_ARB 0x891A
+#define LOCAL_GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
+#define LOCAL_GL_CLAMP_READ_COLOR_ARB 0x891C
+#define LOCAL_GL_FIXED_ONLY_ARB 0x891D
+#define LOCAL_GL_ARB_depth_texture 1
+#define LOCAL_GL_DEPTH_COMPONENT16_ARB 0x81A5
+#define LOCAL_GL_DEPTH_COMPONENT24_ARB 0x81A6
+#define LOCAL_GL_DEPTH_COMPONENT32_ARB 0x81A7
+#define LOCAL_GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
+#define LOCAL_GL_DEPTH_TEXTURE_MODE_ARB 0x884B
+#define LOCAL_GL_ARB_draw_buffers 1
+#define LOCAL_GL_MAX_DRAW_BUFFERS_ARB 0x8824
+#define LOCAL_GL_DRAW_BUFFER0_ARB 0x8825
+#define LOCAL_GL_DRAW_BUFFER1_ARB 0x8826
+#define LOCAL_GL_DRAW_BUFFER2_ARB 0x8827
+#define LOCAL_GL_DRAW_BUFFER3_ARB 0x8828
+#define LOCAL_GL_DRAW_BUFFER4_ARB 0x8829
+#define LOCAL_GL_DRAW_BUFFER5_ARB 0x882A
+#define LOCAL_GL_DRAW_BUFFER6_ARB 0x882B
+#define LOCAL_GL_DRAW_BUFFER7_ARB 0x882C
+#define LOCAL_GL_DRAW_BUFFER8_ARB 0x882D
+#define LOCAL_GL_DRAW_BUFFER9_ARB 0x882E
+#define LOCAL_GL_DRAW_BUFFER10_ARB 0x882F
+#define LOCAL_GL_DRAW_BUFFER11_ARB 0x8830
+#define LOCAL_GL_DRAW_BUFFER12_ARB 0x8831
+#define LOCAL_GL_DRAW_BUFFER13_ARB 0x8832
+#define LOCAL_GL_DRAW_BUFFER14_ARB 0x8833
+#define LOCAL_GL_DRAW_BUFFER15_ARB 0x8834
+#define LOCAL_GL_ARB_fragment_program 1
+#define LOCAL_GL_FRAGMENT_PROGRAM_ARB 0x8804
+#define LOCAL_GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
+#define LOCAL_GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
+#define LOCAL_GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
+#define LOCAL_GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
+#define LOCAL_GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
+#define LOCAL_GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
+#define LOCAL_GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
+#define LOCAL_GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
+#define LOCAL_GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
+#define LOCAL_GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
+#define LOCAL_GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
+#define LOCAL_GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
+#define LOCAL_GL_MAX_TEXTURE_COORDS_ARB 0x8871
+#define LOCAL_GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
+#define LOCAL_GL_ARB_fragment_program_shadow 1
+#define LOCAL_GL_ARB_fragment_shader 1
+#define LOCAL_GL_FRAGMENT_SHADER_ARB 0x8B30
+#define LOCAL_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
+#define LOCAL_GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
+#define LOCAL_GL_ARB_half_float_pixel 1
+#define LOCAL_GL_HALF_FLOAT_ARB 0x140B
+#define LOCAL_GL_ARB_imaging 1
+#define LOCAL_GL_CONSTANT_COLOR 0x8001
+#define LOCAL_GL_ONE_MINUS_CONSTANT_COLOR 0x8002
+#define LOCAL_GL_CONSTANT_ALPHA 0x8003
+#define LOCAL_GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
+#define LOCAL_GL_BLEND_COLOR 0x8005
+#define LOCAL_GL_FUNC_ADD 0x8006
+#define LOCAL_GL_MIN 0x8007
+#define LOCAL_GL_MAX 0x8008
+#define LOCAL_GL_BLEND_EQUATION 0x8009
+#define LOCAL_GL_FUNC_SUBTRACT 0x800A
+#define LOCAL_GL_FUNC_REVERSE_SUBTRACT 0x800B
+#define LOCAL_GL_CONVOLUTION_1D 0x8010
+#define LOCAL_GL_CONVOLUTION_2D 0x8011
+#define LOCAL_GL_SEPARABLE_2D 0x8012
+#define LOCAL_GL_CONVOLUTION_BORDER_MODE 0x8013
+#define LOCAL_GL_CONVOLUTION_FILTER_SCALE 0x8014
+#define LOCAL_GL_CONVOLUTION_FILTER_BIAS 0x8015
+#define LOCAL_GL_REDUCE 0x8016
+#define LOCAL_GL_CONVOLUTION_FORMAT 0x8017
+#define LOCAL_GL_CONVOLUTION_WIDTH 0x8018
+#define LOCAL_GL_CONVOLUTION_HEIGHT 0x8019
+#define LOCAL_GL_MAX_CONVOLUTION_WIDTH 0x801A
+#define LOCAL_GL_MAX_CONVOLUTION_HEIGHT 0x801B
+#define LOCAL_GL_POST_CONVOLUTION_RED_SCALE 0x801C
+#define LOCAL_GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
+#define LOCAL_GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
+#define LOCAL_GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
+#define LOCAL_GL_POST_CONVOLUTION_RED_BIAS 0x8020
+#define LOCAL_GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
+#define LOCAL_GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
+#define LOCAL_GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
+#define LOCAL_GL_HISTOGRAM 0x8024
+#define LOCAL_GL_PROXY_HISTOGRAM 0x8025
+#define LOCAL_GL_HISTOGRAM_WIDTH 0x8026
+#define LOCAL_GL_HISTOGRAM_FORMAT 0x8027
+#define LOCAL_GL_HISTOGRAM_RED_SIZE 0x8028
+#define LOCAL_GL_HISTOGRAM_GREEN_SIZE 0x8029
+#define LOCAL_GL_HISTOGRAM_BLUE_SIZE 0x802A
+#define LOCAL_GL_HISTOGRAM_ALPHA_SIZE 0x802B
+#define LOCAL_GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
+#define LOCAL_GL_HISTOGRAM_SINK 0x802D
+#define LOCAL_GL_MINMAX 0x802E
+#define LOCAL_GL_MINMAX_FORMAT 0x802F
+#define LOCAL_GL_MINMAX_SINK 0x8030
+#define LOCAL_GL_TABLE_TOO_LARGE 0x8031
+#define LOCAL_GL_COLOR_MATRIX 0x80B1
+#define LOCAL_GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
+#define LOCAL_GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
+#define LOCAL_GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
+#define LOCAL_GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
+#define LOCAL_GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
+#define LOCAL_GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
+#define LOCAL_GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
+#define LOCAL_GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
+#define LOCAL_GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
+#define LOCAL_GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
+#define LOCAL_GL_COLOR_TABLE 0x80D0
+#define LOCAL_GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
+#define LOCAL_GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
+#define LOCAL_GL_PROXY_COLOR_TABLE 0x80D3
+#define LOCAL_GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
+#define LOCAL_GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
+#define LOCAL_GL_COLOR_TABLE_SCALE 0x80D6
+#define LOCAL_GL_COLOR_TABLE_BIAS 0x80D7
+#define LOCAL_GL_COLOR_TABLE_FORMAT 0x80D8
+#define LOCAL_GL_COLOR_TABLE_WIDTH 0x80D9
+#define LOCAL_GL_COLOR_TABLE_RED_SIZE 0x80DA
+#define LOCAL_GL_COLOR_TABLE_GREEN_SIZE 0x80DB
+#define LOCAL_GL_COLOR_TABLE_BLUE_SIZE 0x80DC
+#define LOCAL_GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
+#define LOCAL_GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
+#define LOCAL_GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
+#define LOCAL_GL_IGNORE_BORDER 0x8150
+#define LOCAL_GL_CONSTANT_BORDER 0x8151
+#define LOCAL_GL_WRAP_BORDER 0x8152
+#define LOCAL_GL_REPLICATE_BORDER 0x8153
+#define LOCAL_GL_CONVOLUTION_BORDER_COLOR 0x8154
+#define LOCAL_GL_ARB_matrix_palette 1
+#define LOCAL_GL_MATRIX_PALETTE_ARB 0x8840
+#define LOCAL_GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
+#define LOCAL_GL_MAX_PALETTE_MATRICES_ARB 0x8842
+#define LOCAL_GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
+#define LOCAL_GL_MATRIX_INDEX_ARRAY_ARB 0x8844
+#define LOCAL_GL_CURRENT_MATRIX_INDEX_ARB 0x8845
+#define LOCAL_GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
+#define LOCAL_GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
+#define LOCAL_GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
+#define LOCAL_GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
+#define LOCAL_GL_ARB_multisample 1
+#define LOCAL_GL_MULTISAMPLE_ARB 0x809D
+#define LOCAL_GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
+#define LOCAL_GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
+#define LOCAL_GL_SAMPLE_COVERAGE_ARB 0x80A0
+#define LOCAL_GL_SAMPLE_BUFFERS_ARB 0x80A8
+#define LOCAL_GL_SAMPLES_ARB 0x80A9
+#define LOCAL_GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
+#define LOCAL_GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
+#define LOCAL_GL_MULTISAMPLE_BIT_ARB 0x20000000
+#define LOCAL_GL_ARB_multitexture 1
+#define LOCAL_GL_TEXTURE0_ARB 0x84C0
+#define LOCAL_GL_TEXTURE1_ARB 0x84C1
+#define LOCAL_GL_TEXTURE2_ARB 0x84C2
+#define LOCAL_GL_TEXTURE3_ARB 0x84C3
+#define LOCAL_GL_TEXTURE4_ARB 0x84C4
+#define LOCAL_GL_TEXTURE5_ARB 0x84C5
+#define LOCAL_GL_TEXTURE6_ARB 0x84C6
+#define LOCAL_GL_TEXTURE7_ARB 0x84C7
+#define LOCAL_GL_TEXTURE8_ARB 0x84C8
+#define LOCAL_GL_TEXTURE9_ARB 0x84C9
+#define LOCAL_GL_TEXTURE10_ARB 0x84CA
+#define LOCAL_GL_TEXTURE11_ARB 0x84CB
+#define LOCAL_GL_TEXTURE12_ARB 0x84CC
+#define LOCAL_GL_TEXTURE13_ARB 0x84CD
+#define LOCAL_GL_TEXTURE14_ARB 0x84CE
+#define LOCAL_GL_TEXTURE15_ARB 0x84CF
+#define LOCAL_GL_TEXTURE16_ARB 0x84D0
+#define LOCAL_GL_TEXTURE17_ARB 0x84D1
+#define LOCAL_GL_TEXTURE18_ARB 0x84D2
+#define LOCAL_GL_TEXTURE19_ARB 0x84D3
+#define LOCAL_GL_TEXTURE20_ARB 0x84D4
+#define LOCAL_GL_TEXTURE21_ARB 0x84D5
+#define LOCAL_GL_TEXTURE22_ARB 0x84D6
+#define LOCAL_GL_TEXTURE23_ARB 0x84D7
+#define LOCAL_GL_TEXTURE24_ARB 0x84D8
+#define LOCAL_GL_TEXTURE25_ARB 0x84D9
+#define LOCAL_GL_TEXTURE26_ARB 0x84DA
+#define LOCAL_GL_TEXTURE27_ARB 0x84DB
+#define LOCAL_GL_TEXTURE28_ARB 0x84DC
+#define LOCAL_GL_TEXTURE29_ARB 0x84DD
+#define LOCAL_GL_TEXTURE30_ARB 0x84DE
+#define LOCAL_GL_TEXTURE31_ARB 0x84DF
+#define LOCAL_GL_ACTIVE_TEXTURE_ARB 0x84E0
+#define LOCAL_GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
+#define LOCAL_GL_MAX_TEXTURE_UNITS_ARB 0x84E2
+#define LOCAL_GL_ARB_occlusion_query 1
+#define LOCAL_GL_QUERY_COUNTER_BITS_ARB 0x8864
+#define LOCAL_GL_CURRENT_QUERY_ARB 0x8865
+#define LOCAL_GL_QUERY_RESULT_ARB 0x8866
+#define LOCAL_GL_QUERY_RESULT_AVAILABLE_ARB 0x8867
+#define LOCAL_GL_SAMPLES_PASSED_ARB 0x8914
+#define LOCAL_GL_ARB_pixel_buffer_object 1
+#define LOCAL_GL_PIXEL_PACK_BUFFER_ARB 0x88EB
+#define LOCAL_GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
+#define LOCAL_GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
+#define LOCAL_GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
+#define LOCAL_GL_ARB_point_parameters 1
+#define LOCAL_GL_POINT_SIZE_MIN_ARB 0x8126
+#define LOCAL_GL_POINT_SIZE_MAX_ARB 0x8127
+#define LOCAL_GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
+#define LOCAL_GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
+#define LOCAL_GL_ARB_point_sprite 1
+#define LOCAL_GL_POINT_SPRITE_ARB 0x8861
+#define LOCAL_GL_COORD_REPLACE_ARB 0x8862
+#define LOCAL_GL_ARB_shader_objects 1
+#define LOCAL_GL_PROGRAM_OBJECT_ARB 0x8B40
+#define LOCAL_GL_SHADER_OBJECT_ARB 0x8B48
+#define LOCAL_GL_OBJECT_TYPE_ARB 0x8B4E
+#define LOCAL_GL_OBJECT_SUBTYPE_ARB 0x8B4F
+#define LOCAL_GL_FLOAT_VEC2_ARB 0x8B50
+#define LOCAL_GL_FLOAT_VEC3_ARB 0x8B51
+#define LOCAL_GL_FLOAT_VEC4_ARB 0x8B52
+#define LOCAL_GL_INT_VEC2_ARB 0x8B53
+#define LOCAL_GL_INT_VEC3_ARB 0x8B54
+#define LOCAL_GL_INT_VEC4_ARB 0x8B55
+#define LOCAL_GL_BOOL_ARB 0x8B56
+#define LOCAL_GL_BOOL_VEC2_ARB 0x8B57
+#define LOCAL_GL_BOOL_VEC3_ARB 0x8B58
+#define LOCAL_GL_BOOL_VEC4_ARB 0x8B59
+#define LOCAL_GL_FLOAT_MAT2_ARB 0x8B5A
+#define LOCAL_GL_FLOAT_MAT3_ARB 0x8B5B
+#define LOCAL_GL_FLOAT_MAT4_ARB 0x8B5C
+#define LOCAL_GL_SAMPLER_1D_ARB 0x8B5D
+#define LOCAL_GL_SAMPLER_2D_ARB 0x8B5E
+#define LOCAL_GL_SAMPLER_3D_ARB 0x8B5F
+#define LOCAL_GL_SAMPLER_CUBE_ARB 0x8B60
+#define LOCAL_GL_SAMPLER_1D_SHADOW_ARB 0x8B61
+#define LOCAL_GL_SAMPLER_2D_SHADOW_ARB 0x8B62
+#define LOCAL_GL_SAMPLER_2D_RECT_ARB 0x8B63
+#define LOCAL_GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
+#define LOCAL_GL_OBJECT_DELETE_STATUS_ARB 0x8B80
+#define LOCAL_GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
+#define LOCAL_GL_OBJECT_LINK_STATUS_ARB 0x8B82
+#define LOCAL_GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83
+#define LOCAL_GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84
+#define LOCAL_GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85
+#define LOCAL_GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86
+#define LOCAL_GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87
+#define LOCAL_GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88
+#define LOCAL_GL_ARB_shading_language_100 1
+#define LOCAL_GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
+#define LOCAL_GL_ARB_shadow 1
+#define LOCAL_GL_TEXTURE_COMPARE_MODE_ARB 0x884C
+#define LOCAL_GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
+#define LOCAL_GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
+#define LOCAL_GL_ARB_shadow_ambient 1
+#define LOCAL_GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
+#define LOCAL_GL_ARB_texture_border_clamp 1
+#define LOCAL_GL_CLAMP_TO_BORDER_ARB 0x812D
+#define LOCAL_GL_ARB_texture_compression 1
+#define LOCAL_GL_COMPRESSED_ALPHA_ARB 0x84E9
+#define LOCAL_GL_COMPRESSED_LUMINANCE_ARB 0x84EA
+#define LOCAL_GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
+#define LOCAL_GL_COMPRESSED_INTENSITY_ARB 0x84EC
+#define LOCAL_GL_COMPRESSED_RGB_ARB 0x84ED
+#define LOCAL_GL_COMPRESSED_RGBA_ARB 0x84EE
+#define LOCAL_GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
+#define LOCAL_GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
+#define LOCAL_GL_TEXTURE_COMPRESSED_ARB 0x86A1
+#define LOCAL_GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
+#define LOCAL_GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
+#define LOCAL_GL_ARB_texture_cube_map 1
+#define LOCAL_GL_NORMAL_MAP_ARB 0x8511
+#define LOCAL_GL_REFLECTION_MAP_ARB 0x8512
+#define LOCAL_GL_TEXTURE_CUBE_MAP_ARB 0x8513
+#define LOCAL_GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
+#define LOCAL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
+#define LOCAL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
+#define LOCAL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
+#define LOCAL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
+#define LOCAL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
+#define LOCAL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
+#define LOCAL_GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
+#define LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
+#define LOCAL_GL_ARB_texture_env_add 1
+#define LOCAL_GL_ARB_texture_env_combine 1
+#define LOCAL_GL_SUBTRACT_ARB 0x84E7
+#define LOCAL_GL_COMBINE_ARB 0x8570
+#define LOCAL_GL_COMBINE_RGB_ARB 0x8571
+#define LOCAL_GL_COMBINE_ALPHA_ARB 0x8572
+#define LOCAL_GL_RGB_SCALE_ARB 0x8573
+#define LOCAL_GL_ADD_SIGNED_ARB 0x8574
+#define LOCAL_GL_INTERPOLATE_ARB 0x8575
+#define LOCAL_GL_CONSTANT_ARB 0x8576
+#define LOCAL_GL_PRIMARY_COLOR_ARB 0x8577
+#define LOCAL_GL_PREVIOUS_ARB 0x8578
+#define LOCAL_GL_SOURCE0_RGB_ARB 0x8580
+#define LOCAL_GL_SOURCE1_RGB_ARB 0x8581
+#define LOCAL_GL_SOURCE2_RGB_ARB 0x8582
+#define LOCAL_GL_SOURCE0_ALPHA_ARB 0x8588
+#define LOCAL_GL_SOURCE1_ALPHA_ARB 0x8589
+#define LOCAL_GL_SOURCE2_ALPHA_ARB 0x858A
+#define LOCAL_GL_OPERAND0_RGB_ARB 0x8590
+#define LOCAL_GL_OPERAND1_RGB_ARB 0x8591
+#define LOCAL_GL_OPERAND2_RGB_ARB 0x8592
+#define LOCAL_GL_OPERAND0_ALPHA_ARB 0x8598
+#define LOCAL_GL_OPERAND1_ALPHA_ARB 0x8599
+#define LOCAL_GL_OPERAND2_ALPHA_ARB 0x859A
+#define LOCAL_GL_ARB_texture_env_crossbar 1
+#define LOCAL_GL_ARB_texture_env_dot3 1
+#define LOCAL_GL_DOT3_RGB_ARB 0x86AE
+#define LOCAL_GL_DOT3_RGBA_ARB 0x86AF
+#define LOCAL_GL_ARB_texture_float 1
+#define LOCAL_GL_RGBA32F_ARB 0x8814
+#define LOCAL_GL_RGB32F_ARB 0x8815
+#define LOCAL_GL_ALPHA32F_ARB 0x8816
+#define LOCAL_GL_INTENSITY32F_ARB 0x8817
+#define LOCAL_GL_LUMINANCE32F_ARB 0x8818
+#define LOCAL_GL_LUMINANCE_ALPHA32F_ARB 0x8819
+#define LOCAL_GL_RGBA16F_ARB 0x881A
+#define LOCAL_GL_RGB16F_ARB 0x881B
+#define LOCAL_GL_ALPHA16F_ARB 0x881C
+#define LOCAL_GL_INTENSITY16F_ARB 0x881D
+#define LOCAL_GL_LUMINANCE16F_ARB 0x881E
+#define LOCAL_GL_LUMINANCE_ALPHA16F_ARB 0x881F
+#define LOCAL_GL_TEXTURE_RED_TYPE_ARB 0x8C10
+#define LOCAL_GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
+#define LOCAL_GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
+#define LOCAL_GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
+#define LOCAL_GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
+#define LOCAL_GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
+#define LOCAL_GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
+#define LOCAL_GL_UNSIGNED_NORMALIZED_ARB 0x8C17
+#define LOCAL_GL_ARB_texture_mirrored_repeat 1
+#define LOCAL_GL_MIRRORED_REPEAT_ARB 0x8370
+#define LOCAL_GL_ARB_texture_non_power_of_two 1
+#define LOCAL_GL_ARB_texture_rectangle 1
+#define LOCAL_GL_TEXTURE_RECTANGLE_ARB 0x84F5
+#define LOCAL_GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
+#define LOCAL_GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
+#define LOCAL_GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
+#define LOCAL_GL_SAMPLER_2D_RECT_ARB 0x8B63
+#define LOCAL_GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
+#define LOCAL_GL_ARB_transpose_matrix 1
+#define LOCAL_GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
+#define LOCAL_GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
+#define LOCAL_GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
+#define LOCAL_GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
+#define LOCAL_GL_ARB_vertex_blend 1
+#define LOCAL_GL_MODELVIEW0_ARB 0x1700
+#define LOCAL_GL_MODELVIEW1_ARB 0x850A
+#define LOCAL_GL_MAX_VERTEX_UNITS_ARB 0x86A4
+#define LOCAL_GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
+#define LOCAL_GL_WEIGHT_SUM_UNITY_ARB 0x86A6
+#define LOCAL_GL_VERTEX_BLEND_ARB 0x86A7
+#define LOCAL_GL_CURRENT_WEIGHT_ARB 0x86A8
+#define LOCAL_GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
+#define LOCAL_GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
+#define LOCAL_GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
+#define LOCAL_GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
+#define LOCAL_GL_WEIGHT_ARRAY_ARB 0x86AD
+#define LOCAL_GL_MODELVIEW2_ARB 0x8722
+#define LOCAL_GL_MODELVIEW3_ARB 0x8723
+#define LOCAL_GL_MODELVIEW4_ARB 0x8724
+#define LOCAL_GL_MODELVIEW5_ARB 0x8725
+#define LOCAL_GL_MODELVIEW6_ARB 0x8726
+#define LOCAL_GL_MODELVIEW7_ARB 0x8727
+#define LOCAL_GL_MODELVIEW8_ARB 0x8728
+#define LOCAL_GL_MODELVIEW9_ARB 0x8729
+#define LOCAL_GL_MODELVIEW10_ARB 0x872A
+#define LOCAL_GL_MODELVIEW11_ARB 0x872B
+#define LOCAL_GL_MODELVIEW12_ARB 0x872C
+#define LOCAL_GL_MODELVIEW13_ARB 0x872D
+#define LOCAL_GL_MODELVIEW14_ARB 0x872E
+#define LOCAL_GL_MODELVIEW15_ARB 0x872F
+#define LOCAL_GL_MODELVIEW16_ARB 0x8730
+#define LOCAL_GL_MODELVIEW17_ARB 0x8731
+#define LOCAL_GL_MODELVIEW18_ARB 0x8732
+#define LOCAL_GL_MODELVIEW19_ARB 0x8733
+#define LOCAL_GL_MODELVIEW20_ARB 0x8734
+#define LOCAL_GL_MODELVIEW21_ARB 0x8735
+#define LOCAL_GL_MODELVIEW22_ARB 0x8736
+#define LOCAL_GL_MODELVIEW23_ARB 0x8737
+#define LOCAL_GL_MODELVIEW24_ARB 0x8738
+#define LOCAL_GL_MODELVIEW25_ARB 0x8739
+#define LOCAL_GL_MODELVIEW26_ARB 0x873A
+#define LOCAL_GL_MODELVIEW27_ARB 0x873B
+#define LOCAL_GL_MODELVIEW28_ARB 0x873C
+#define LOCAL_GL_MODELVIEW29_ARB 0x873D
+#define LOCAL_GL_MODELVIEW30_ARB 0x873E
+#define LOCAL_GL_MODELVIEW31_ARB 0x873F
+#define LOCAL_GL_ARB_vertex_buffer_object 1
+#define LOCAL_GL_BUFFER_SIZE_ARB 0x8764
+#define LOCAL_GL_BUFFER_USAGE_ARB 0x8765
+#define LOCAL_GL_ARRAY_BUFFER_ARB 0x8892
+#define LOCAL_GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893
+#define LOCAL_GL_ARRAY_BUFFER_BINDING_ARB 0x8894
+#define LOCAL_GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
+#define LOCAL_GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
+#define LOCAL_GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
+#define LOCAL_GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
+#define LOCAL_GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
+#define LOCAL_GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
+#define LOCAL_GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
+#define LOCAL_GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
+#define LOCAL_GL_READ_ONLY_ARB 0x88B8
+#define LOCAL_GL_WRITE_ONLY_ARB 0x88B9
+#define LOCAL_GL_READ_WRITE_ARB 0x88BA
+#define LOCAL_GL_BUFFER_ACCESS_ARB 0x88BB
+#define LOCAL_GL_BUFFER_MAPPED_ARB 0x88BC
+#define LOCAL_GL_BUFFER_MAP_POINTER_ARB 0x88BD
+#define LOCAL_GL_STREAM_DRAW_ARB 0x88E0
+#define LOCAL_GL_STREAM_READ_ARB 0x88E1
+#define LOCAL_GL_STREAM_COPY_ARB 0x88E2
+#define LOCAL_GL_STATIC_DRAW_ARB 0x88E4
+#define LOCAL_GL_STATIC_READ_ARB 0x88E5
+#define LOCAL_GL_STATIC_COPY_ARB 0x88E6
+#define LOCAL_GL_DYNAMIC_DRAW_ARB 0x88E8
+#define LOCAL_GL_DYNAMIC_READ_ARB 0x88E9
+#define LOCAL_GL_DYNAMIC_COPY_ARB 0x88EA
+#define LOCAL_GL_ARB_vertex_program 1
+#define LOCAL_GL_COLOR_SUM_ARB 0x8458
+#define LOCAL_GL_VERTEX_PROGRAM_ARB 0x8620
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
+#define LOCAL_GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
+#define LOCAL_GL_PROGRAM_LENGTH_ARB 0x8627
+#define LOCAL_GL_PROGRAM_STRING_ARB 0x8628
+#define LOCAL_GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
+#define LOCAL_GL_MAX_PROGRAM_MATRICES_ARB 0x862F
+#define LOCAL_GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
+#define LOCAL_GL_CURRENT_MATRIX_ARB 0x8641
+#define LOCAL_GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
+#define LOCAL_GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
+#define LOCAL_GL_PROGRAM_ERROR_POSITION_ARB 0x864B
+#define LOCAL_GL_PROGRAM_BINDING_ARB 0x8677
+#define LOCAL_GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
+#define LOCAL_GL_PROGRAM_ERROR_STRING_ARB 0x8874
+#define LOCAL_GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
+#define LOCAL_GL_PROGRAM_FORMAT_ARB 0x8876
+#define LOCAL_GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
+#define LOCAL_GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
+#define LOCAL_GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
+#define LOCAL_GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
+#define LOCAL_GL_PROGRAM_TEMPORARIES_ARB 0x88A4
+#define LOCAL_GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
+#define LOCAL_GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
+#define LOCAL_GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
+#define LOCAL_GL_PROGRAM_PARAMETERS_ARB 0x88A8
+#define LOCAL_GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
+#define LOCAL_GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
+#define LOCAL_GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
+#define LOCAL_GL_PROGRAM_ATTRIBS_ARB 0x88AC
+#define LOCAL_GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
+#define LOCAL_GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
+#define LOCAL_GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
+#define LOCAL_GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
+#define LOCAL_GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
+#define LOCAL_GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
+#define LOCAL_GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
+#define LOCAL_GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
+#define LOCAL_GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
+#define LOCAL_GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
+#define LOCAL_GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
+#define LOCAL_GL_MATRIX0_ARB 0x88C0
+#define LOCAL_GL_MATRIX1_ARB 0x88C1
+#define LOCAL_GL_MATRIX2_ARB 0x88C2
+#define LOCAL_GL_MATRIX3_ARB 0x88C3
+#define LOCAL_GL_MATRIX4_ARB 0x88C4
+#define LOCAL_GL_MATRIX5_ARB 0x88C5
+#define LOCAL_GL_MATRIX6_ARB 0x88C6
+#define LOCAL_GL_MATRIX7_ARB 0x88C7
+#define LOCAL_GL_MATRIX8_ARB 0x88C8
+#define LOCAL_GL_MATRIX9_ARB 0x88C9
+#define LOCAL_GL_MATRIX10_ARB 0x88CA
+#define LOCAL_GL_MATRIX11_ARB 0x88CB
+#define LOCAL_GL_MATRIX12_ARB 0x88CC
+#define LOCAL_GL_MATRIX13_ARB 0x88CD
+#define LOCAL_GL_MATRIX14_ARB 0x88CE
+#define LOCAL_GL_MATRIX15_ARB 0x88CF
+#define LOCAL_GL_MATRIX16_ARB 0x88D0
+#define LOCAL_GL_MATRIX17_ARB 0x88D1
+#define LOCAL_GL_MATRIX18_ARB 0x88D2
+#define LOCAL_GL_MATRIX19_ARB 0x88D3
+#define LOCAL_GL_MATRIX20_ARB 0x88D4
+#define LOCAL_GL_MATRIX21_ARB 0x88D5
+#define LOCAL_GL_MATRIX22_ARB 0x88D6
+#define LOCAL_GL_MATRIX23_ARB 0x88D7
+#define LOCAL_GL_MATRIX24_ARB 0x88D8
+#define LOCAL_GL_MATRIX25_ARB 0x88D9
+#define LOCAL_GL_MATRIX26_ARB 0x88DA
+#define LOCAL_GL_MATRIX27_ARB 0x88DB
+#define LOCAL_GL_MATRIX28_ARB 0x88DC
+#define LOCAL_GL_MATRIX29_ARB 0x88DD
+#define LOCAL_GL_MATRIX30_ARB 0x88DE
+#define LOCAL_GL_MATRIX31_ARB 0x88DF
+#define LOCAL_GL_ARB_vertex_shader 1
+#define LOCAL_GL_VERTEX_SHADER_ARB 0x8B31
+#define LOCAL_GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
+#define LOCAL_GL_MAX_VARYING_FLOATS_ARB 0x8B4B
+#define LOCAL_GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
+#define LOCAL_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
+#define LOCAL_GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
+#define LOCAL_GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
+#define LOCAL_GL_ARB_window_pos 1
+#define LOCAL_GL_ATIX_point_sprites 1
+#define LOCAL_GL_ATIX_texture_env_combine3 1
+#define LOCAL_GL_MODULATE_ADD_ATIX 0x8744
+#define LOCAL_GL_MODULATE_SIGNED_ADD_ATIX 0x8745
+#define LOCAL_GL_MODULATE_SUBTRACT_ATIX 0x8746
+#define LOCAL_GL_ATIX_texture_env_route 1
+#define LOCAL_GL_SECONDARY_COLOR_ATIX 0x8747
+#define LOCAL_GL_TEXTURE_OUTPUT_RGB_ATIX 0x8748
+#define LOCAL_GL_TEXTURE_OUTPUT_ALPHA_ATIX 0x8749
+#define LOCAL_GL_ATIX_vertex_shader_output_point_size 1
+#define LOCAL_GL_OUTPUT_POINT_SIZE_ATIX 0x610E
+#define LOCAL_GL_ATI_draw_buffers 1
+#define LOCAL_GL_MAX_DRAW_BUFFERS_ATI 0x8824
+#define LOCAL_GL_DRAW_BUFFER0_ATI 0x8825
+#define LOCAL_GL_DRAW_BUFFER1_ATI 0x8826
+#define LOCAL_GL_DRAW_BUFFER2_ATI 0x8827
+#define LOCAL_GL_DRAW_BUFFER3_ATI 0x8828
+#define LOCAL_GL_DRAW_BUFFER4_ATI 0x8829
+#define LOCAL_GL_DRAW_BUFFER5_ATI 0x882A
+#define LOCAL_GL_DRAW_BUFFER6_ATI 0x882B
+#define LOCAL_GL_DRAW_BUFFER7_ATI 0x882C
+#define LOCAL_GL_DRAW_BUFFER8_ATI 0x882D
+#define LOCAL_GL_DRAW_BUFFER9_ATI 0x882E
+#define LOCAL_GL_DRAW_BUFFER10_ATI 0x882F
+#define LOCAL_GL_DRAW_BUFFER11_ATI 0x8830
+#define LOCAL_GL_DRAW_BUFFER12_ATI 0x8831
+#define LOCAL_GL_DRAW_BUFFER13_ATI 0x8832
+#define LOCAL_GL_DRAW_BUFFER14_ATI 0x8833
+#define LOCAL_GL_DRAW_BUFFER15_ATI 0x8834
+#define LOCAL_GL_ATI_element_array 1
+#define LOCAL_GL_ELEMENT_ARRAY_ATI 0x8768
+#define LOCAL_GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
+#define LOCAL_GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
+#define LOCAL_GL_ATI_envmap_bumpmap 1
+#define LOCAL_GL_BUMP_ROT_MATRIX_ATI 0x8775
+#define LOCAL_GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
+#define LOCAL_GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
+#define LOCAL_GL_BUMP_TEX_UNITS_ATI 0x8778
+#define LOCAL_GL_DUDV_ATI 0x8779
+#define LOCAL_GL_DU8DV8_ATI 0x877A
+#define LOCAL_GL_BUMP_ENVMAP_ATI 0x877B
+#define LOCAL_GL_BUMP_TARGET_ATI 0x877C
+#define LOCAL_GL_ATI_fragment_shader 1
+#define LOCAL_GL_RED_BIT_ATI 0x00000001
+#define LOCAL_GL_2X_BIT_ATI 0x00000001
+#define LOCAL_GL_4X_BIT_ATI 0x00000002
+#define LOCAL_GL_GREEN_BIT_ATI 0x00000002
+#define LOCAL_GL_COMP_BIT_ATI 0x00000002
+#define LOCAL_GL_BLUE_BIT_ATI 0x00000004
+#define LOCAL_GL_8X_BIT_ATI 0x00000004
+#define LOCAL_GL_NEGATE_BIT_ATI 0x00000004
+#define LOCAL_GL_BIAS_BIT_ATI 0x00000008
+#define LOCAL_GL_HALF_BIT_ATI 0x00000008
+#define LOCAL_GL_QUARTER_BIT_ATI 0x00000010
+#define LOCAL_GL_EIGHTH_BIT_ATI 0x00000020
+#define LOCAL_GL_SATURATE_BIT_ATI 0x00000040
+#define LOCAL_GL_FRAGMENT_SHADER_ATI 0x8920
+#define LOCAL_GL_REG_0_ATI 0x8921
+#define LOCAL_GL_REG_1_ATI 0x8922
+#define LOCAL_GL_REG_2_ATI 0x8923
+#define LOCAL_GL_REG_3_ATI 0x8924
+#define LOCAL_GL_REG_4_ATI 0x8925
+#define LOCAL_GL_REG_5_ATI 0x8926
+#define LOCAL_GL_CON_0_ATI 0x8941
+#define LOCAL_GL_CON_1_ATI 0x8942
+#define LOCAL_GL_CON_2_ATI 0x8943
+#define LOCAL_GL_CON_3_ATI 0x8944
+#define LOCAL_GL_CON_4_ATI 0x8945
+#define LOCAL_GL_CON_5_ATI 0x8946
+#define LOCAL_GL_CON_6_ATI 0x8947
+#define LOCAL_GL_CON_7_ATI 0x8948
+#define LOCAL_GL_MOV_ATI 0x8961
+#define LOCAL_GL_ADD_ATI 0x8963
+#define LOCAL_GL_MUL_ATI 0x8964
+#define LOCAL_GL_SUB_ATI 0x8965
+#define LOCAL_GL_DOT3_ATI 0x8966
+#define LOCAL_GL_DOT4_ATI 0x8967
+#define LOCAL_GL_MAD_ATI 0x8968
+#define LOCAL_GL_LERP_ATI 0x8969
+#define LOCAL_GL_CND_ATI 0x896A
+#define LOCAL_GL_CND0_ATI 0x896B
+#define LOCAL_GL_DOT2_ADD_ATI 0x896C
+#define LOCAL_GL_SECONDARY_INTERPOLATOR_ATI 0x896D
+#define LOCAL_GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
+#define LOCAL_GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
+#define LOCAL_GL_NUM_PASSES_ATI 0x8970
+#define LOCAL_GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
+#define LOCAL_GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
+#define LOCAL_GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
+#define LOCAL_GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
+#define LOCAL_GL_COLOR_ALPHA_PAIRING_ATI 0x8975
+#define LOCAL_GL_SWIZZLE_STR_ATI 0x8976
+#define LOCAL_GL_SWIZZLE_STQ_ATI 0x8977
+#define LOCAL_GL_SWIZZLE_STR_DR_ATI 0x8978
+#define LOCAL_GL_SWIZZLE_STQ_DQ_ATI 0x8979
+#define LOCAL_GL_SWIZZLE_STRQ_ATI 0x897A
+#define LOCAL_GL_SWIZZLE_STRQ_DQ_ATI 0x897B
+#define LOCAL_GL_ATI_map_object_buffer 1
+#define LOCAL_GL_ATI_pn_triangles 1
+#define LOCAL_GL_PN_TRIANGLES_ATI 0x87F0
+#define LOCAL_GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
+#define LOCAL_GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
+#define LOCAL_GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
+#define LOCAL_GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
+#define LOCAL_GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
+#define LOCAL_GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
+#define LOCAL_GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
+#define LOCAL_GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
+#define LOCAL_GL_ATI_separate_stencil 1
+#define LOCAL_GL_STENCIL_BACK_FUNC_ATI 0x8800
+#define LOCAL_GL_STENCIL_BACK_FAIL_ATI 0x8801
+#define LOCAL_GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802
+#define LOCAL_GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803
+#define LOCAL_GL_ATI_text_fragment_shader 1
+#define LOCAL_GL_TEXT_FRAGMENT_SHADER_ATI 0x8200
+#define LOCAL_GL_ATI_texture_compression_3dc 1
+#define LOCAL_GL_COMPRESSED_RGB_3DC_ATI 0x8837
+#define LOCAL_GL_ATI_texture_env_combine3 1
+#define LOCAL_GL_MODULATE_ADD_ATI 0x8744
+#define LOCAL_GL_MODULATE_SIGNED_ADD_ATI 0x8745
+#define LOCAL_GL_MODULATE_SUBTRACT_ATI 0x8746
+#define LOCAL_GL_ATI_texture_float 1
+#define LOCAL_GL_RGBA_FLOAT32_ATI 0x8814
+#define LOCAL_GL_RGB_FLOAT32_ATI 0x8815
+#define LOCAL_GL_ALPHA_FLOAT32_ATI 0x8816
+#define LOCAL_GL_INTENSITY_FLOAT32_ATI 0x8817
+#define LOCAL_GL_LUMINANCE_FLOAT32_ATI 0x8818
+#define LOCAL_GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819
+#define LOCAL_GL_RGBA_FLOAT16_ATI 0x881A
+#define LOCAL_GL_RGB_FLOAT16_ATI 0x881B
+#define LOCAL_GL_ALPHA_FLOAT16_ATI 0x881C
+#define LOCAL_GL_INTENSITY_FLOAT16_ATI 0x881D
+#define LOCAL_GL_LUMINANCE_FLOAT16_ATI 0x881E
+#define LOCAL_GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F
+#define LOCAL_GL_ATI_texture_mirror_once 1
+#define LOCAL_GL_MIRROR_CLAMP_ATI 0x8742
+#define LOCAL_GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
+#define LOCAL_GL_ATI_vertex_array_object 1
+#define LOCAL_GL_STATIC_ATI 0x8760
+#define LOCAL_GL_DYNAMIC_ATI 0x8761
+#define LOCAL_GL_PRESERVE_ATI 0x8762
+#define LOCAL_GL_DISCARD_ATI 0x8763
+#define LOCAL_GL_OBJECT_BUFFER_SIZE_ATI 0x8764
+#define LOCAL_GL_OBJECT_BUFFER_USAGE_ATI 0x8765
+#define LOCAL_GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
+#define LOCAL_GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
+#define LOCAL_GL_ATI_vertex_attrib_array_object 1
+#define LOCAL_GL_ATI_vertex_streams 1
+#define LOCAL_GL_MAX_VERTEX_STREAMS_ATI 0x876B
+#define LOCAL_GL_VERTEX_SOURCE_ATI 0x876C
+#define LOCAL_GL_VERTEX_STREAM0_ATI 0x876D
+#define LOCAL_GL_VERTEX_STREAM1_ATI 0x876E
+#define LOCAL_GL_VERTEX_STREAM2_ATI 0x876F
+#define LOCAL_GL_VERTEX_STREAM3_ATI 0x8770
+#define LOCAL_GL_VERTEX_STREAM4_ATI 0x8771
+#define LOCAL_GL_VERTEX_STREAM5_ATI 0x8772
+#define LOCAL_GL_VERTEX_STREAM6_ATI 0x8773
+#define LOCAL_GL_VERTEX_STREAM7_ATI 0x8774
+#define LOCAL_GL_EXT_422_pixels 1
+#define LOCAL_GL_422_EXT 0x80CC
+#define LOCAL_GL_422_REV_EXT 0x80CD
+#define LOCAL_GL_422_AVERAGE_EXT 0x80CE
+#define LOCAL_GL_422_REV_AVERAGE_EXT 0x80CF
+#define LOCAL_GL_EXT_Cg_shader 1
+#define LOCAL_GL_CG_VERTEX_SHADER_EXT 0x890E
+#define LOCAL_GL_CG_FRAGMENT_SHADER_EXT 0x890F
+#define LOCAL_GL_EXT_abgr 1
+#define LOCAL_GL_ABGR_EXT 0x8000
+#define LOCAL_GL_EXT_bgra 1
+#define LOCAL_GL_BGR_EXT 0x80E0
+#define LOCAL_GL_BGRA_EXT 0x80E1
+#define LOCAL_GL_EXT_blend_color 1
+#define LOCAL_GL_CONSTANT_COLOR_EXT 0x8001
+#define LOCAL_GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
+#define LOCAL_GL_CONSTANT_ALPHA_EXT 0x8003
+#define LOCAL_GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
+#define LOCAL_GL_BLEND_COLOR_EXT 0x8005
+#define LOCAL_GL_EXT_blend_equation_separate 1
+#define LOCAL_GL_BLEND_EQUATION_RGB_EXT 0x8009
+#define LOCAL_GL_BLEND_EQUATION_ALPHA_EXT 0x883D
+#define LOCAL_GL_EXT_blend_func_separate 1
+#define LOCAL_GL_BLEND_DST_RGB_EXT 0x80C8
+#define LOCAL_GL_BLEND_SRC_RGB_EXT 0x80C9
+#define LOCAL_GL_BLEND_DST_ALPHA_EXT 0x80CA
+#define LOCAL_GL_BLEND_SRC_ALPHA_EXT 0x80CB
+#define LOCAL_GL_EXT_blend_logic_op 1
+#define LOCAL_GL_EXT_blend_minmax 1
+#define LOCAL_GL_FUNC_ADD_EXT 0x8006
+#define LOCAL_GL_MIN_EXT 0x8007
+#define LOCAL_GL_MAX_EXT 0x8008
+#define LOCAL_GL_BLEND_EQUATION_EXT 0x8009
+#define LOCAL_GL_EXT_blend_subtract 1
+#define LOCAL_GL_FUNC_SUBTRACT_EXT 0x800A
+#define LOCAL_GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
+#define LOCAL_GL_EXT_clip_volume_hint 1
+#define LOCAL_GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
+#define LOCAL_GL_EXT_cmyka 1
+#define LOCAL_GL_CMYK_EXT 0x800C
+#define LOCAL_GL_CMYKA_EXT 0x800D
+#define LOCAL_GL_PACK_CMYK_HINT_EXT 0x800E
+#define LOCAL_GL_UNPACK_CMYK_HINT_EXT 0x800F
+#define LOCAL_GL_EXT_color_subtable 1
+#define LOCAL_GL_EXT_compiled_vertex_array 1
+#define LOCAL_GL_EXT_convolution 1
+#define LOCAL_GL_CONVOLUTION_1D_EXT 0x8010
+#define LOCAL_GL_CONVOLUTION_2D_EXT 0x8011
+#define LOCAL_GL_SEPARABLE_2D_EXT 0x8012
+#define LOCAL_GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
+#define LOCAL_GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
+#define LOCAL_GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
+#define LOCAL_GL_REDUCE_EXT 0x8016
+#define LOCAL_GL_CONVOLUTION_FORMAT_EXT 0x8017
+#define LOCAL_GL_CONVOLUTION_WIDTH_EXT 0x8018
+#define LOCAL_GL_CONVOLUTION_HEIGHT_EXT 0x8019
+#define LOCAL_GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
+#define LOCAL_GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
+#define LOCAL_GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
+#define LOCAL_GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
+#define LOCAL_GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
+#define LOCAL_GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
+#define LOCAL_GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
+#define LOCAL_GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
+#define LOCAL_GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
+#define LOCAL_GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
+#define LOCAL_GL_EXT_coordinate_frame 1
+#define LOCAL_GL_TANGENT_ARRAY_EXT 0x8439
+#define LOCAL_GL_BINORMAL_ARRAY_EXT 0x843A
+#define LOCAL_GL_CURRENT_TANGENT_EXT 0x843B
+#define LOCAL_GL_CURRENT_BINORMAL_EXT 0x843C
+#define LOCAL_GL_TANGENT_ARRAY_TYPE_EXT 0x843E
+#define LOCAL_GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
+#define LOCAL_GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
+#define LOCAL_GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
+#define LOCAL_GL_TANGENT_ARRAY_POINTER_EXT 0x8442
+#define LOCAL_GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
+#define LOCAL_GL_MAP1_TANGENT_EXT 0x8444
+#define LOCAL_GL_MAP2_TANGENT_EXT 0x8445
+#define LOCAL_GL_MAP1_BINORMAL_EXT 0x8446
+#define LOCAL_GL_MAP2_BINORMAL_EXT 0x8447
+#define LOCAL_GL_EXT_copy_texture 1
+#define LOCAL_GL_EXT_cull_vertex 1
+#define LOCAL_GL_EXT_depth_bounds_test 1
+#define LOCAL_GL_DEPTH_BOUNDS_TEST_EXT 0x8890
+#define LOCAL_GL_DEPTH_BOUNDS_EXT 0x8891
+#define LOCAL_GL_EXT_draw_range_elements 1
+#define LOCAL_GL_MAX_ELEMENTS_VERTICES 0x80E8
+#define LOCAL_GL_MAX_ELEMENTS_INDICES 0x80E9
+#define LOCAL_GL_EXT_fog_coord 1
+#define LOCAL_GL_FOG_COORDINATE_SOURCE_EXT 0x8450
+#define LOCAL_GL_FOG_COORDINATE_EXT 0x8451
+#define LOCAL_GL_FRAGMENT_DEPTH_EXT 0x8452
+#define LOCAL_GL_CURRENT_FOG_COORDINATE_EXT 0x8453
+#define LOCAL_GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
+#define LOCAL_GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
+#define LOCAL_GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
+#define LOCAL_GL_FOG_COORDINATE_ARRAY_EXT 0x8457
+#define LOCAL_GL_EXT_fragment_lighting 1
+#define LOCAL_GL_FRAGMENT_LIGHTING_EXT 0x8400
+#define LOCAL_GL_FRAGMENT_COLOR_MATERIAL_EXT 0x8401
+#define LOCAL_GL_FRAGMENT_COLOR_MATERIAL_FACE_EXT 0x8402
+#define LOCAL_GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_EXT 0x8403
+#define LOCAL_GL_MAX_FRAGMENT_LIGHTS_EXT 0x8404
+#define LOCAL_GL_MAX_ACTIVE_LIGHTS_EXT 0x8405
+#define LOCAL_GL_CURRENT_RASTER_NORMAL_EXT 0x8406
+#define LOCAL_GL_LIGHT_ENV_MODE_EXT 0x8407
+#define LOCAL_GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_EXT 0x8408
+#define LOCAL_GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_EXT 0x8409
+#define LOCAL_GL_FRAGMENT_LIGHT_MODEL_AMBIENT_EXT 0x840A
+#define LOCAL_GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_EXT 0x840B
+#define LOCAL_GL_FRAGMENT_LIGHT0_EXT 0x840C
+#define LOCAL_GL_FRAGMENT_LIGHT7_EXT 0x8413
+#define LOCAL_GL_EXT_framebuffer_blit 1
+#define LOCAL_GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6
+#define LOCAL_GL_READ_FRAMEBUFFER_EXT 0x8CA8
+#define LOCAL_GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
+#define LOCAL_GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
+#define LOCAL_GL_EXT_framebuffer_multisample 1
+#define LOCAL_GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
+#define LOCAL_GL_EXT_framebuffer_object 1
+#define LOCAL_GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
+#define LOCAL_GL_MAX_RENDERBUFFER_SIZE 0x84E8
+#define LOCAL_GL_FRAMEBUFFER_BINDING 0x8CA6
+#define LOCAL_GL_RENDERBUFFER_BINDING 0x8CA7
+#define LOCAL_GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
+#define LOCAL_GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
+#define LOCAL_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
+#define LOCAL_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+#define LOCAL_GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET 0x8CD4
+#define LOCAL_GL_FRAMEBUFFER_COMPLETE 0x8CD5
+#define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
+#define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
+#define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_FORMATS 0x8CDA
+#define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
+#define LOCAL_GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
+#define LOCAL_GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
+#define LOCAL_GL_MAX_COLOR_ATTACHMENTS 0x8CDF
+#define LOCAL_GL_COLOR_ATTACHMENT0 0x8CE0
+#define LOCAL_GL_COLOR_ATTACHMENT1 0x8CE1
+#define LOCAL_GL_COLOR_ATTACHMENT2 0x8CE2
+#define LOCAL_GL_COLOR_ATTACHMENT3 0x8CE3
+#define LOCAL_GL_COLOR_ATTACHMENT4 0x8CE4
+#define LOCAL_GL_COLOR_ATTACHMENT5 0x8CE5
+#define LOCAL_GL_COLOR_ATTACHMENT6 0x8CE6
+#define LOCAL_GL_COLOR_ATTACHMENT7 0x8CE7
+#define LOCAL_GL_COLOR_ATTACHMENT8 0x8CE8
+#define LOCAL_GL_COLOR_ATTACHMENT9 0x8CE9
+#define LOCAL_GL_COLOR_ATTACHMENT10 0x8CEA
+#define LOCAL_GL_COLOR_ATTACHMENT11 0x8CEB
+#define LOCAL_GL_COLOR_ATTACHMENT12 0x8CEC
+#define LOCAL_GL_COLOR_ATTACHMENT13 0x8CED
+#define LOCAL_GL_COLOR_ATTACHMENT14 0x8CEE
+#define LOCAL_GL_COLOR_ATTACHMENT15 0x8CEF
+#define LOCAL_GL_DEPTH_ATTACHMENT 0x8D00
+#define LOCAL_GL_STENCIL_ATTACHMENT 0x8D20
+#define LOCAL_GL_FRAMEBUFFER 0x8D40
+#define LOCAL_GL_RENDERBUFFER 0x8D41
+#define LOCAL_GL_RENDERBUFFER_WIDTH 0x8D42
+#define LOCAL_GL_RENDERBUFFER_HEIGHT 0x8D43
+#define LOCAL_GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
+#define LOCAL_GL_STENCIL_INDEX1 0x8D46
+#define LOCAL_GL_STENCIL_INDEX4 0x8D47
+#define LOCAL_GL_STENCIL_INDEX8 0x8D48
+#define LOCAL_GL_STENCIL_INDEX16 0x8D49
+#define LOCAL_GL_RENDERBUFFER_RED_SIZE 0x8D50
+#define LOCAL_GL_RENDERBUFFER_GREEN_SIZE 0x8D51
+#define LOCAL_GL_RENDERBUFFER_BLUE_SIZE 0x8D52
+#define LOCAL_GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
+#define LOCAL_GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
+#define LOCAL_GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
+#define LOCAL_GL_EXT_histogram 1
+#define LOCAL_GL_HISTOGRAM_EXT 0x8024
+#define LOCAL_GL_PROXY_HISTOGRAM_EXT 0x8025
+#define LOCAL_GL_HISTOGRAM_WIDTH_EXT 0x8026
+#define LOCAL_GL_HISTOGRAM_FORMAT_EXT 0x8027
+#define LOCAL_GL_HISTOGRAM_RED_SIZE_EXT 0x8028
+#define LOCAL_GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
+#define LOCAL_GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
+#define LOCAL_GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
+#define LOCAL_GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
+#define LOCAL_GL_HISTOGRAM_SINK_EXT 0x802D
+#define LOCAL_GL_MINMAX_EXT 0x802E
+#define LOCAL_GL_MINMAX_FORMAT_EXT 0x802F
+#define LOCAL_GL_MINMAX_SINK_EXT 0x8030
+#define LOCAL_GL_EXT_index_array_formats 1
+#define LOCAL_GL_EXT_index_func 1
+#define LOCAL_GL_EXT_index_material 1
+#define LOCAL_GL_EXT_index_texture 1
+#define LOCAL_GL_EXT_light_texture 1
+#define LOCAL_GL_FRAGMENT_MATERIAL_EXT 0x8349
+#define LOCAL_GL_FRAGMENT_NORMAL_EXT 0x834A
+#define LOCAL_GL_FRAGMENT_COLOR_EXT 0x834C
+#define LOCAL_GL_ATTENUATION_EXT 0x834D
+#define LOCAL_GL_SHADOW_ATTENUATION_EXT 0x834E
+#define LOCAL_GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
+#define LOCAL_GL_TEXTURE_LIGHT_EXT 0x8350
+#define LOCAL_GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
+#define LOCAL_GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
+#define LOCAL_GL_FRAGMENT_DEPTH_EXT 0x8452
+#define LOCAL_GL_EXT_misc_attribute 1
+#define LOCAL_GL_EXT_multi_draw_arrays 1
+#define LOCAL_GL_EXT_multisample 1
+#define LOCAL_GL_MULTISAMPLE_EXT 0x809D
+#define LOCAL_GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
+#define LOCAL_GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
+#define LOCAL_GL_SAMPLE_MASK_EXT 0x80A0
+#define LOCAL_GL_1PASS_EXT 0x80A1
+#define LOCAL_GL_2PASS_0_EXT 0x80A2
+#define LOCAL_GL_2PASS_1_EXT 0x80A3
+#define LOCAL_GL_4PASS_0_EXT 0x80A4
+#define LOCAL_GL_4PASS_1_EXT 0x80A5
+#define LOCAL_GL_4PASS_2_EXT 0x80A6
+#define LOCAL_GL_4PASS_3_EXT 0x80A7
+#define LOCAL_GL_SAMPLE_BUFFERS_EXT 0x80A8
+#define LOCAL_GL_SAMPLES_EXT 0x80A9
+#define LOCAL_GL_SAMPLE_MASK_VALUE_EXT 0x80AA
+#define LOCAL_GL_SAMPLE_MASK_INVERT_EXT 0x80AB
+#define LOCAL_GL_SAMPLE_PATTERN_EXT 0x80AC
+#define LOCAL_GL_MULTISAMPLE_BIT_EXT 0x20000000
+#define LOCAL_GL_EXT_packed_depth_stencil 1
+#define LOCAL_GL_DEPTH_STENCIL_EXT 0x84F9
+#define LOCAL_GL_UNSIGNED_INT_24_8_EXT 0x84FA
+#define LOCAL_GL_DEPTH24_STENCIL8_EXT 0x88F0
+#define LOCAL_GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
+#define LOCAL_GL_EXT_packed_pixels 1
+#define LOCAL_GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
+#define LOCAL_GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
+#define LOCAL_GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
+#define LOCAL_GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
+#define LOCAL_GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
+#define LOCAL_GL_EXT_paletted_texture 1
+#define LOCAL_GL_TEXTURE_1D 0x0DE0
+#define LOCAL_GL_TEXTURE_2D 0x0DE1
+#define LOCAL_GL_PROXY_TEXTURE_1D 0x8063
+#define LOCAL_GL_PROXY_TEXTURE_2D 0x8064
+#define LOCAL_GL_TEXTURE_3D_EXT 0x806F
+#define LOCAL_GL_PROXY_TEXTURE_3D_EXT 0x8070
+#define LOCAL_GL_COLOR_TABLE_FORMAT_EXT 0x80D8
+#define LOCAL_GL_COLOR_TABLE_WIDTH_EXT 0x80D9
+#define LOCAL_GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA
+#define LOCAL_GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB
+#define LOCAL_GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC
+#define LOCAL_GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD
+#define LOCAL_GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE
+#define LOCAL_GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
+#define LOCAL_GL_COLOR_INDEX1_EXT 0x80E2
+#define LOCAL_GL_COLOR_INDEX2_EXT 0x80E3
+#define LOCAL_GL_COLOR_INDEX4_EXT 0x80E4
+#define LOCAL_GL_COLOR_INDEX8_EXT 0x80E5
+#define LOCAL_GL_COLOR_INDEX12_EXT 0x80E6
+#define LOCAL_GL_COLOR_INDEX16_EXT 0x80E7
+#define LOCAL_GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
+#define LOCAL_GL_TEXTURE_CUBE_MAP_ARB 0x8513
+#define LOCAL_GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
+#define LOCAL_GL_EXT_pixel_buffer_object 1
+#define LOCAL_GL_PIXEL_PACK_BUFFER_EXT 0x88EB
+#define LOCAL_GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
+#define LOCAL_GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
+#define LOCAL_GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
+#define LOCAL_GL_EXT_pixel_transform 1
+#define LOCAL_GL_PIXEL_TRANSFORM_2D_EXT 0x8330
+#define LOCAL_GL_PIXEL_MAG_FILTER_EXT 0x8331
+#define LOCAL_GL_PIXEL_MIN_FILTER_EXT 0x8332
+#define LOCAL_GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
+#define LOCAL_GL_CUBIC_EXT 0x8334
+#define LOCAL_GL_AVERAGE_EXT 0x8335
+#define LOCAL_GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
+#define LOCAL_GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
+#define LOCAL_GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
+#define LOCAL_GL_EXT_pixel_transform_color_table 1
+#define LOCAL_GL_EXT_point_parameters 1
+#define LOCAL_GL_POINT_SIZE_MIN_EXT 0x8126
+#define LOCAL_GL_POINT_SIZE_MAX_EXT 0x8127
+#define LOCAL_GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
+#define LOCAL_GL_DISTANCE_ATTENUATION_EXT 0x8129
+#define LOCAL_GL_EXT_polygon_offset 1
+#define LOCAL_GL_POLYGON_OFFSET_EXT 0x8037
+#define LOCAL_GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
+#define LOCAL_GL_POLYGON_OFFSET_BIAS_EXT 0x8039
+#define LOCAL_GL_EXT_rescale_normal 1
+#define LOCAL_GL_EXT_scene_marker 1
+#define LOCAL_GL_EXT_secondary_color 1
+#define LOCAL_GL_COLOR_SUM_EXT 0x8458
+#define LOCAL_GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
+#define LOCAL_GL_EXT_separate_specular_color 1
+#define LOCAL_GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
+#define LOCAL_GL_SINGLE_COLOR_EXT 0x81F9
+#define LOCAL_GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
+#define LOCAL_GL_EXT_shadow_funcs 1
+#define LOCAL_GL_EXT_shared_texture_palette 1
+#define LOCAL_GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
+#define LOCAL_GL_EXT_stencil_clear_tag 1
+#define LOCAL_GL_STENCIL_TAG_BITS_EXT 0x88F2
+#define LOCAL_GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
+#define LOCAL_GL_EXT_stencil_two_side 1
+#define LOCAL_GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910
+#define LOCAL_GL_ACTIVE_STENCIL_FACE_EXT 0x8911
+#define LOCAL_GL_EXT_stencil_wrap 1
+#define LOCAL_GL_INCR_WRAP_EXT 0x8507
+#define LOCAL_GL_DECR_WRAP_EXT 0x8508
+#define LOCAL_GL_EXT_subtexture 1
+#define LOCAL_GL_EXT_texture 1
+#define LOCAL_GL_ALPHA4_EXT 0x803B
+#define LOCAL_GL_ALPHA8_EXT 0x803C
+#define LOCAL_GL_ALPHA12_EXT 0x803D
+#define LOCAL_GL_ALPHA16_EXT 0x803E
+#define LOCAL_GL_LUMINANCE4_EXT 0x803F
+#define LOCAL_GL_LUMINANCE8_EXT 0x8040
+#define LOCAL_GL_LUMINANCE12_EXT 0x8041
+#define LOCAL_GL_LUMINANCE16_EXT 0x8042
+#define LOCAL_GL_LUMINANCE4_ALPHA4_EXT 0x8043
+#define LOCAL_GL_LUMINANCE6_ALPHA2_EXT 0x8044
+#define LOCAL_GL_LUMINANCE8_ALPHA8_EXT 0x8045
+#define LOCAL_GL_LUMINANCE12_ALPHA4_EXT 0x8046
+#define LOCAL_GL_LUMINANCE12_ALPHA12_EXT 0x8047
+#define LOCAL_GL_LUMINANCE16_ALPHA16_EXT 0x8048
+#define LOCAL_GL_INTENSITY_EXT 0x8049
+#define LOCAL_GL_INTENSITY4_EXT 0x804A
+#define LOCAL_GL_INTENSITY8_EXT 0x804B
+#define LOCAL_GL_INTENSITY12_EXT 0x804C
+#define LOCAL_GL_INTENSITY16_EXT 0x804D
+#define LOCAL_GL_RGB2_EXT 0x804E
+#define LOCAL_GL_RGB4_EXT 0x804F
+#define LOCAL_GL_RGB5_EXT 0x8050
+#define LOCAL_GL_RGB8_EXT 0x8051
+#define LOCAL_GL_RGB10_EXT 0x8052
+#define LOCAL_GL_RGB12_EXT 0x8053
+#define LOCAL_GL_RGB16_EXT 0x8054
+#define LOCAL_GL_RGBA2_EXT 0x8055
+#define LOCAL_GL_RGBA4_EXT 0x8056
+#define LOCAL_GL_RGB5_A1_EXT 0x8057
+#define LOCAL_GL_RGBA8_EXT 0x8058
+#define LOCAL_GL_RGB10_A2_EXT 0x8059
+#define LOCAL_GL_RGBA12_EXT 0x805A
+#define LOCAL_GL_RGBA16_EXT 0x805B
+#define LOCAL_GL_TEXTURE_RED_SIZE_EXT 0x805C
+#define LOCAL_GL_TEXTURE_GREEN_SIZE_EXT 0x805D
+#define LOCAL_GL_TEXTURE_BLUE_SIZE_EXT 0x805E
+#define LOCAL_GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
+#define LOCAL_GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
+#define LOCAL_GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
+#define LOCAL_GL_REPLACE_EXT 0x8062
+#define LOCAL_GL_PROXY_TEXTURE_1D_EXT 0x8063
+#define LOCAL_GL_PROXY_TEXTURE_2D_EXT 0x8064
+#define LOCAL_GL_EXT_texture3D 1
+#define LOCAL_GL_PACK_SKIP_IMAGES_EXT 0x806B
+#define LOCAL_GL_PACK_IMAGE_HEIGHT_EXT 0x806C
+#define LOCAL_GL_UNPACK_SKIP_IMAGES_EXT 0x806D
+#define LOCAL_GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
+#define LOCAL_GL_TEXTURE_3D_EXT 0x806F
+#define LOCAL_GL_PROXY_TEXTURE_3D_EXT 0x8070
+#define LOCAL_GL_TEXTURE_DEPTH_EXT 0x8071
+#define LOCAL_GL_TEXTURE_WRAP_R_EXT 0x8072
+#define LOCAL_GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
+#define LOCAL_GL_EXT_texture_compression_dxt1 1
+#define LOCAL_GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#define LOCAL_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+#define LOCAL_GL_EXT_texture_compression_s3tc 1
+#define LOCAL_GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#define LOCAL_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+#define LOCAL_GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
+#define LOCAL_GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
+#define LOCAL_GL_EXT_texture_cube_map 1
+#define LOCAL_GL_NORMAL_MAP_EXT 0x8511
+#define LOCAL_GL_REFLECTION_MAP_EXT 0x8512
+#define LOCAL_GL_TEXTURE_CUBE_MAP_EXT 0x8513
+#define LOCAL_GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
+#define LOCAL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
+#define LOCAL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
+#define LOCAL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
+#define LOCAL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
+#define LOCAL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
+#define LOCAL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
+#define LOCAL_GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
+#define LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
+#define LOCAL_GL_EXT_texture_edge_clamp 1
+#define LOCAL_GL_CLAMP_TO_EDGE_EXT 0x812F
+#define LOCAL_GL_EXT_texture_env 1
+#define LOCAL_GL_TEXTURE_ENV0_EXT 0
+#define LOCAL_GL_ENV_BLEND_EXT 0
+#define LOCAL_GL_TEXTURE_ENV_SHIFT_EXT 0
+#define LOCAL_GL_ENV_REPLACE_EXT 0
+#define LOCAL_GL_ENV_ADD_EXT 0
+#define LOCAL_GL_ENV_SUBTRACT_EXT 0
+#define LOCAL_GL_TEXTURE_ENV_MODE_ALPHA_EXT 0
+#define LOCAL_GL_ENV_REVERSE_SUBTRACT_EXT 0
+#define LOCAL_GL_ENV_REVERSE_BLEND_EXT 0
+#define LOCAL_GL_ENV_COPY_EXT 0
+#define LOCAL_GL_ENV_MODULATE_EXT 0
+#define LOCAL_GL_EXT_texture_env_add 1
+#define LOCAL_GL_EXT_texture_env_combine 1
+#define LOCAL_GL_COMBINE_EXT 0x8570
+#define LOCAL_GL_COMBINE_RGB_EXT 0x8571
+#define LOCAL_GL_COMBINE_ALPHA_EXT 0x8572
+#define LOCAL_GL_RGB_SCALE_EXT 0x8573
+#define LOCAL_GL_ADD_SIGNED_EXT 0x8574
+#define LOCAL_GL_INTERPOLATE_EXT 0x8575
+#define LOCAL_GL_CONSTANT_EXT 0x8576
+#define LOCAL_GL_PRIMARY_COLOR_EXT 0x8577
+#define LOCAL_GL_PREVIOUS_EXT 0x8578
+#define LOCAL_GL_SOURCE0_RGB_EXT 0x8580
+#define LOCAL_GL_SOURCE1_RGB_EXT 0x8581
+#define LOCAL_GL_SOURCE2_RGB_EXT 0x8582
+#define LOCAL_GL_SOURCE0_ALPHA_EXT 0x8588
+#define LOCAL_GL_SOURCE1_ALPHA_EXT 0x8589
+#define LOCAL_GL_SOURCE2_ALPHA_EXT 0x858A
+#define LOCAL_GL_OPERAND0_RGB_EXT 0x8590
+#define LOCAL_GL_OPERAND1_RGB_EXT 0x8591
+#define LOCAL_GL_OPERAND2_RGB_EXT 0x8592
+#define LOCAL_GL_OPERAND0_ALPHA_EXT 0x8598
+#define LOCAL_GL_OPERAND1_ALPHA_EXT 0x8599
+#define LOCAL_GL_OPERAND2_ALPHA_EXT 0x859A
+#define LOCAL_GL_EXT_texture_env_dot3 1
+#define LOCAL_GL_DOT3_RGB_EXT 0x8740
+#define LOCAL_GL_DOT3_RGBA_EXT 0x8741
+#define LOCAL_GL_EXT_texture_filter_anisotropic 1
+#define LOCAL_GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
+#define LOCAL_GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
+#define LOCAL_GL_EXT_texture_lod_bias 1
+#define LOCAL_GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
+#define LOCAL_GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
+#define LOCAL_GL_TEXTURE_LOD_BIAS_EXT 0x8501
+#define LOCAL_GL_EXT_texture_mirror_clamp 1
+#define LOCAL_GL_MIRROR_CLAMP_EXT 0x8742
+#define LOCAL_GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743
+#define LOCAL_GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912
+#define LOCAL_GL_EXT_texture_object 1
+#define LOCAL_GL_TEXTURE_PRIORITY_EXT 0x8066
+#define LOCAL_GL_TEXTURE_RESIDENT_EXT 0x8067
+#define LOCAL_GL_TEXTURE_1D_BINDING_EXT 0x8068
+#define LOCAL_GL_TEXTURE_2D_BINDING_EXT 0x8069
+#define LOCAL_GL_TEXTURE_3D_BINDING_EXT 0x806A
+#define LOCAL_GL_EXT_texture_perturb_normal 1
+#define LOCAL_GL_PERTURB_EXT 0x85AE
+#define LOCAL_GL_TEXTURE_NORMAL_EXT 0x85AF
+#define LOCAL_GL_EXT_texture_rectangle 1
+#define LOCAL_GL_TEXTURE_RECTANGLE_EXT 0x84F5
+#define LOCAL_GL_TEXTURE_BINDING_RECTANGLE_EXT 0x84F6
+#define LOCAL_GL_PROXY_TEXTURE_RECTANGLE_EXT 0x84F7
+#define LOCAL_GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT 0x84F8
+#define LOCAL_GL_EXT_texture_sRGB 1
+#define LOCAL_GL_SRGB_EXT 0x8C40
+#define LOCAL_GL_SRGB8_EXT 0x8C41
+#define LOCAL_GL_SRGB_ALPHA_EXT 0x8C42
+#define LOCAL_GL_SRGB8_ALPHA8_EXT 0x8C43
+#define LOCAL_GL_SLUMINANCE_ALPHA_EXT 0x8C44
+#define LOCAL_GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
+#define LOCAL_GL_SLUMINANCE_EXT 0x8C46
+#define LOCAL_GL_SLUMINANCE8_EXT 0x8C47
+#define LOCAL_GL_COMPRESSED_SRGB_EXT 0x8C48
+#define LOCAL_GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
+#define LOCAL_GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
+#define LOCAL_GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
+#define LOCAL_GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
+#define LOCAL_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
+#define LOCAL_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
+#define LOCAL_GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
+#define LOCAL_GL_EXT_vertex_array 1
+#define LOCAL_GL_DOUBLE_EXT 0x140A
+#define LOCAL_GL_VERTEX_ARRAY_EXT 0x8074
+#define LOCAL_GL_NORMAL_ARRAY_EXT 0x8075
+#define LOCAL_GL_COLOR_ARRAY_EXT 0x8076
+#define LOCAL_GL_INDEX_ARRAY_EXT 0x8077
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_EXT 0x8078
+#define LOCAL_GL_EDGE_FLAG_ARRAY_EXT 0x8079
+#define LOCAL_GL_VERTEX_ARRAY_SIZE_EXT 0x807A
+#define LOCAL_GL_VERTEX_ARRAY_TYPE_EXT 0x807B
+#define LOCAL_GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
+#define LOCAL_GL_VERTEX_ARRAY_COUNT_EXT 0x807D
+#define LOCAL_GL_NORMAL_ARRAY_TYPE_EXT 0x807E
+#define LOCAL_GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
+#define LOCAL_GL_NORMAL_ARRAY_COUNT_EXT 0x8080
+#define LOCAL_GL_COLOR_ARRAY_SIZE_EXT 0x8081
+#define LOCAL_GL_COLOR_ARRAY_TYPE_EXT 0x8082
+#define LOCAL_GL_COLOR_ARRAY_STRIDE_EXT 0x8083
+#define LOCAL_GL_COLOR_ARRAY_COUNT_EXT 0x8084
+#define LOCAL_GL_INDEX_ARRAY_TYPE_EXT 0x8085
+#define LOCAL_GL_INDEX_ARRAY_STRIDE_EXT 0x8086
+#define LOCAL_GL_INDEX_ARRAY_COUNT_EXT 0x8087
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
+#define LOCAL_GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
+#define LOCAL_GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
+#define LOCAL_GL_VERTEX_ARRAY_POINTER_EXT 0x808E
+#define LOCAL_GL_NORMAL_ARRAY_POINTER_EXT 0x808F
+#define LOCAL_GL_COLOR_ARRAY_POINTER_EXT 0x8090
+#define LOCAL_GL_INDEX_ARRAY_POINTER_EXT 0x8091
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
+#define LOCAL_GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
+#define LOCAL_GL_EXT_vertex_shader 1
+#define LOCAL_GL_VERTEX_SHADER_EXT 0x8780
+#define LOCAL_GL_VERTEX_SHADER_BINDING_EXT 0x8781
+#define LOCAL_GL_OP_INDEX_EXT 0x8782
+#define LOCAL_GL_OP_NEGATE_EXT 0x8783
+#define LOCAL_GL_OP_DOT3_EXT 0x8784
+#define LOCAL_GL_OP_DOT4_EXT 0x8785
+#define LOCAL_GL_OP_MUL_EXT 0x8786
+#define LOCAL_GL_OP_ADD_EXT 0x8787
+#define LOCAL_GL_OP_MADD_EXT 0x8788
+#define LOCAL_GL_OP_FRAC_EXT 0x8789
+#define LOCAL_GL_OP_MAX_EXT 0x878A
+#define LOCAL_GL_OP_MIN_EXT 0x878B
+#define LOCAL_GL_OP_SET_GE_EXT 0x878C
+#define LOCAL_GL_OP_SET_LT_EXT 0x878D
+#define LOCAL_GL_OP_CLAMP_EXT 0x878E
+#define LOCAL_GL_OP_FLOOR_EXT 0x878F
+#define LOCAL_GL_OP_ROUND_EXT 0x8790
+#define LOCAL_GL_OP_EXP_BASE_2_EXT 0x8791
+#define LOCAL_GL_OP_LOG_BASE_2_EXT 0x8792
+#define LOCAL_GL_OP_POWER_EXT 0x8793
+#define LOCAL_GL_OP_RECIP_EXT 0x8794
+#define LOCAL_GL_OP_RECIP_SQRT_EXT 0x8795
+#define LOCAL_GL_OP_SUB_EXT 0x8796
+#define LOCAL_GL_OP_CROSS_PRODUCT_EXT 0x8797
+#define LOCAL_GL_OP_MULTIPLY_MATRIX_EXT 0x8798
+#define LOCAL_GL_OP_MOV_EXT 0x8799
+#define LOCAL_GL_OUTPUT_VERTEX_EXT 0x879A
+#define LOCAL_GL_OUTPUT_COLOR0_EXT 0x879B
+#define LOCAL_GL_OUTPUT_COLOR1_EXT 0x879C
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
+#define LOCAL_GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
+#define LOCAL_GL_OUTPUT_FOG_EXT 0x87BD
+#define LOCAL_GL_SCALAR_EXT 0x87BE
+#define LOCAL_GL_VECTOR_EXT 0x87BF
+#define LOCAL_GL_MATRIX_EXT 0x87C0
+#define LOCAL_GL_VARIANT_EXT 0x87C1
+#define LOCAL_GL_INVARIANT_EXT 0x87C2
+#define LOCAL_GL_LOCAL_CONSTANT_EXT 0x87C3
+#define LOCAL_GL_LOCAL_EXT 0x87C4
+#define LOCAL_GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
+#define LOCAL_GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
+#define LOCAL_GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
+#define LOCAL_GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
+#define LOCAL_GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
+#define LOCAL_GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
+#define LOCAL_GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
+#define LOCAL_GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CC
+#define LOCAL_GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CD
+#define LOCAL_GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
+#define LOCAL_GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
+#define LOCAL_GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
+#define LOCAL_GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
+#define LOCAL_GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
+#define LOCAL_GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
+#define LOCAL_GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
+#define LOCAL_GL_X_EXT 0x87D5
+#define LOCAL_GL_Y_EXT 0x87D6
+#define LOCAL_GL_Z_EXT 0x87D7
+#define LOCAL_GL_W_EXT 0x87D8
+#define LOCAL_GL_NEGATIVE_X_EXT 0x87D9
+#define LOCAL_GL_NEGATIVE_Y_EXT 0x87DA
+#define LOCAL_GL_NEGATIVE_Z_EXT 0x87DB
+#define LOCAL_GL_NEGATIVE_W_EXT 0x87DC
+#define LOCAL_GL_ZERO_EXT 0x87DD
+#define LOCAL_GL_ONE_EXT 0x87DE
+#define LOCAL_GL_NEGATIVE_ONE_EXT 0x87DF
+#define LOCAL_GL_NORMALIZED_RANGE_EXT 0x87E0
+#define LOCAL_GL_FULL_RANGE_EXT 0x87E1
+#define LOCAL_GL_CURRENT_VERTEX_EXT 0x87E2
+#define LOCAL_GL_MVP_MATRIX_EXT 0x87E3
+#define LOCAL_GL_VARIANT_VALUE_EXT 0x87E4
+#define LOCAL_GL_VARIANT_DATATYPE_EXT 0x87E5
+#define LOCAL_GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
+#define LOCAL_GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
+#define LOCAL_GL_VARIANT_ARRAY_EXT 0x87E8
+#define LOCAL_GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
+#define LOCAL_GL_INVARIANT_VALUE_EXT 0x87EA
+#define LOCAL_GL_INVARIANT_DATATYPE_EXT 0x87EB
+#define LOCAL_GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
+#define LOCAL_GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
+#define LOCAL_GL_EXT_vertex_weighting 1
+#define LOCAL_GL_MODELVIEW0_STACK_DEPTH_EXT 0x0BA3
+#define LOCAL_GL_MODELVIEW0_MATRIX_EXT 0x0BA6
+#define LOCAL_GL_MODELVIEW0_EXT 0x1700
+#define LOCAL_GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
+#define LOCAL_GL_MODELVIEW1_MATRIX_EXT 0x8506
+#define LOCAL_GL_VERTEX_WEIGHTING_EXT 0x8509
+#define LOCAL_GL_MODELVIEW1_EXT 0x850A
+#define LOCAL_GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
+#define LOCAL_GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
+#define LOCAL_GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
+#define LOCAL_GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
+#define LOCAL_GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
+#define LOCAL_GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
+#define LOCAL_GL_GREMEDY_string_marker 1
+#define LOCAL_GL_HP_convolution_border_modes 1
+#define LOCAL_GL_HP_image_transform 1
+#define LOCAL_GL_HP_occlusion_test 1
+#define LOCAL_GL_OCCLUSION_TEST_HP 0x8165
+#define LOCAL_GL_OCCLUSION_TEST_RESULT_HP 0x8166
+#define LOCAL_GL_HP_texture_lighting 1
+#define LOCAL_GL_IBM_cull_vertex 1
+#define LOCAL_GL_CULL_VERTEX_IBM 103050
+#define LOCAL_GL_IBM_multimode_draw_arrays 1
+#define LOCAL_GL_IBM_rasterpos_clip 1
+#define LOCAL_GL_RASTER_POSITION_UNCLIPPED_IBM 103010
+#define LOCAL_GL_IBM_static_data 1
+#define LOCAL_GL_ALL_STATIC_DATA_IBM 103060
+#define LOCAL_GL_STATIC_VERTEX_ARRAY_IBM 103061
+#define LOCAL_GL_IBM_texture_mirrored_repeat 1
+#define LOCAL_GL_MIRRORED_REPEAT_IBM 0x8370
+#define LOCAL_GL_IBM_vertex_array_lists 1
+#define LOCAL_GL_VERTEX_ARRAY_LIST_IBM 103070
+#define LOCAL_GL_NORMAL_ARRAY_LIST_IBM 103071
+#define LOCAL_GL_COLOR_ARRAY_LIST_IBM 103072
+#define LOCAL_GL_INDEX_ARRAY_LIST_IBM 103073
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
+#define LOCAL_GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
+#define LOCAL_GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
+#define LOCAL_GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
+#define LOCAL_GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
+#define LOCAL_GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
+#define LOCAL_GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
+#define LOCAL_GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
+#define LOCAL_GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
+#define LOCAL_GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
+#define LOCAL_GL_INGR_color_clamp 1
+#define LOCAL_GL_RED_MIN_CLAMP_INGR 0x8560
+#define LOCAL_GL_GREEN_MIN_CLAMP_INGR 0x8561
+#define LOCAL_GL_BLUE_MIN_CLAMP_INGR 0x8562
+#define LOCAL_GL_ALPHA_MIN_CLAMP_INGR 0x8563
+#define LOCAL_GL_RED_MAX_CLAMP_INGR 0x8564
+#define LOCAL_GL_GREEN_MAX_CLAMP_INGR 0x8565
+#define LOCAL_GL_BLUE_MAX_CLAMP_INGR 0x8566
+#define LOCAL_GL_ALPHA_MAX_CLAMP_INGR 0x8567
+#define LOCAL_GL_INGR_interlace_read 1
+#define LOCAL_GL_INTERLACE_READ_INGR 0x8568
+#define LOCAL_GL_INTEL_parallel_arrays 1
+#define LOCAL_GL_PARALLEL_ARRAYS_INTEL 0x83F4
+#define LOCAL_GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
+#define LOCAL_GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
+#define LOCAL_GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
+#define LOCAL_GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
+#define LOCAL_GL_INTEL_texture_scissor 1
+#define LOCAL_GL_KTX_buffer_region 1
+#define LOCAL_GL_KTX_FRONT_REGION 0x0
+#define LOCAL_GL_KTX_BACK_REGION 0x1
+#define LOCAL_GL_KTX_Z_REGION 0x2
+#define LOCAL_GL_KTX_STENCIL_REGION 0x3
+#define LOCAL_GL_MESAX_texture_stack 1
+#define LOCAL_GL_TEXTURE_1D_STACK_MESAX 0x8759
+#define LOCAL_GL_TEXTURE_2D_STACK_MESAX 0x875A
+#define LOCAL_GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
+#define LOCAL_GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
+#define LOCAL_GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
+#define LOCAL_GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
+#define LOCAL_GL_MESA_pack_invert 1
+#define LOCAL_GL_PACK_INVERT_MESA 0x8758
+#define LOCAL_GL_MESA_resize_buffers 1
+#define LOCAL_GL_MESA_window_pos 1
+#define LOCAL_GL_MESA_ycbcr_texture 1
+#define LOCAL_GL_UNSIGNED_SHORT_8_8_MESA 0x85BA
+#define LOCAL_GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB
+#define LOCAL_GL_YCBCR_MESA 0x8757
+#define LOCAL_GL_NV_blend_square 1
+#define LOCAL_GL_NV_copy_depth_to_color 1
+#define LOCAL_GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
+#define LOCAL_GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
+#define LOCAL_GL_NV_depth_clamp 1
+#define LOCAL_GL_DEPTH_CLAMP_NV 0x864F
+#define LOCAL_GL_NV_evaluators 1
+#define LOCAL_GL_EVAL_2D_NV 0x86C0
+#define LOCAL_GL_EVAL_TRIANGULAR_2D_NV 0x86C1
+#define LOCAL_GL_MAP_TESSELLATION_NV 0x86C2
+#define LOCAL_GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
+#define LOCAL_GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
+#define LOCAL_GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
+#define LOCAL_GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
+#define LOCAL_GL_MAX_MAP_TESSELLATION_NV 0x86D6
+#define LOCAL_GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
+#define LOCAL_GL_NV_fence 1
+#define LOCAL_GL_ALL_COMPLETED_NV 0x84F2
+#define LOCAL_GL_FENCE_STATUS_NV 0x84F3
+#define LOCAL_GL_FENCE_CONDITION_NV 0x84F4
+#define LOCAL_GL_NV_float_buffer 1
+#define LOCAL_GL_FLOAT_R_NV 0x8880
+#define LOCAL_GL_FLOAT_RG_NV 0x8881
+#define LOCAL_GL_FLOAT_RGB_NV 0x8882
+#define LOCAL_GL_FLOAT_RGBA_NV 0x8883
+#define LOCAL_GL_FLOAT_R16_NV 0x8884
+#define LOCAL_GL_FLOAT_R32_NV 0x8885
+#define LOCAL_GL_FLOAT_RG16_NV 0x8886
+#define LOCAL_GL_FLOAT_RG32_NV 0x8887
+#define LOCAL_GL_FLOAT_RGB16_NV 0x8888
+#define LOCAL_GL_FLOAT_RGB32_NV 0x8889
+#define LOCAL_GL_FLOAT_RGBA16_NV 0x888A
+#define LOCAL_GL_FLOAT_RGBA32_NV 0x888B
+#define LOCAL_GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C
+#define LOCAL_GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D
+#define LOCAL_GL_FLOAT_RGBA_MODE_NV 0x888E
+#define LOCAL_GL_NV_fog_distance 1
+#define LOCAL_GL_FOG_DISTANCE_MODE_NV 0x855A
+#define LOCAL_GL_EYE_RADIAL_NV 0x855B
+#define LOCAL_GL_EYE_PLANE_ABSOLUTE_NV 0x855C
+#define LOCAL_GL_NV_fragment_program 1
+#define LOCAL_GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868
+#define LOCAL_GL_FRAGMENT_PROGRAM_NV 0x8870
+#define LOCAL_GL_MAX_TEXTURE_COORDS_NV 0x8871
+#define LOCAL_GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872
+#define LOCAL_GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873
+#define LOCAL_GL_PROGRAM_ERROR_STRING_NV 0x8874
+#define LOCAL_GL_NV_fragment_program2 1
+#define LOCAL_GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
+#define LOCAL_GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
+#define LOCAL_GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
+#define LOCAL_GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
+#define LOCAL_GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
+#define LOCAL_GL_NV_fragment_program_option 1
+#define LOCAL_GL_NV_half_float 1
+#define LOCAL_GL_HALF_FLOAT_NV 0x140B
+#define LOCAL_GL_NV_light_max_exponent 1
+#define LOCAL_GL_MAX_SHININESS_NV 0x8504
+#define LOCAL_GL_MAX_SPOT_EXPONENT_NV 0x8505
+#define LOCAL_GL_NV_multisample_filter_hint 1
+#define LOCAL_GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
+#define LOCAL_GL_NV_occlusion_query 1
+#define LOCAL_GL_PIXEL_COUNTER_BITS_NV 0x8864
+#define LOCAL_GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
+#define LOCAL_GL_PIXEL_COUNT_NV 0x8866
+#define LOCAL_GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
+#define LOCAL_GL_NV_packed_depth_stencil 1
+#define LOCAL_GL_DEPTH_STENCIL_NV 0x84F9
+#define LOCAL_GL_UNSIGNED_INT_24_8_NV 0x84FA
+#define LOCAL_GL_NV_pixel_data_range 1
+#define LOCAL_GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878
+#define LOCAL_GL_READ_PIXEL_DATA_RANGE_NV 0x8879
+#define LOCAL_GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A
+#define LOCAL_GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B
+#define LOCAL_GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C
+#define LOCAL_GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D
+#define LOCAL_GL_NV_point_sprite 1
+#define LOCAL_GL_POINT_SPRITE_NV 0x8861
+#define LOCAL_GL_COORD_REPLACE_NV 0x8862
+#define LOCAL_GL_POINT_SPRITE_R_MODE_NV 0x8863
+#define LOCAL_GL_NV_primitive_restart 1
+#define LOCAL_GL_PRIMITIVE_RESTART_NV 0x8558
+#define LOCAL_GL_PRIMITIVE_RESTART_INDEX_NV 0x8559
+#define LOCAL_GL_NV_register_combiners 1
+#define LOCAL_GL_REGISTER_COMBINERS_NV 0x8522
+#define LOCAL_GL_VARIABLE_A_NV 0x8523
+#define LOCAL_GL_VARIABLE_B_NV 0x8524
+#define LOCAL_GL_VARIABLE_C_NV 0x8525
+#define LOCAL_GL_VARIABLE_D_NV 0x8526
+#define LOCAL_GL_VARIABLE_E_NV 0x8527
+#define LOCAL_GL_VARIABLE_F_NV 0x8528
+#define LOCAL_GL_VARIABLE_G_NV 0x8529
+#define LOCAL_GL_CONSTANT_COLOR0_NV 0x852A
+#define LOCAL_GL_CONSTANT_COLOR1_NV 0x852B
+#define LOCAL_GL_PRIMARY_COLOR_NV 0x852C
+#define LOCAL_GL_SECONDARY_COLOR_NV 0x852D
+#define LOCAL_GL_SPARE0_NV 0x852E
+#define LOCAL_GL_SPARE1_NV 0x852F
+#define LOCAL_GL_DISCARD_NV 0x8530
+#define LOCAL_GL_E_TIMES_F_NV 0x8531
+#define LOCAL_GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
+#define LOCAL_GL_UNSIGNED_IDENTITY_NV 0x8536
+#define LOCAL_GL_UNSIGNED_INVERT_NV 0x8537
+#define LOCAL_GL_EXPAND_NORMAL_NV 0x8538
+#define LOCAL_GL_EXPAND_NEGATE_NV 0x8539
+#define LOCAL_GL_HALF_BIAS_NORMAL_NV 0x853A
+#define LOCAL_GL_HALF_BIAS_NEGATE_NV 0x853B
+#define LOCAL_GL_SIGNED_IDENTITY_NV 0x853C
+#define LOCAL_GL_SIGNED_NEGATE_NV 0x853D
+#define LOCAL_GL_SCALE_BY_TWO_NV 0x853E
+#define LOCAL_GL_SCALE_BY_FOUR_NV 0x853F
+#define LOCAL_GL_SCALE_BY_ONE_HALF_NV 0x8540
+#define LOCAL_GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
+#define LOCAL_GL_COMBINER_INPUT_NV 0x8542
+#define LOCAL_GL_COMBINER_MAPPING_NV 0x8543
+#define LOCAL_GL_COMBINER_COMPONENT_USAGE_NV 0x8544
+#define LOCAL_GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
+#define LOCAL_GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
+#define LOCAL_GL_COMBINER_MUX_SUM_NV 0x8547
+#define LOCAL_GL_COMBINER_SCALE_NV 0x8548
+#define LOCAL_GL_COMBINER_BIAS_NV 0x8549
+#define LOCAL_GL_COMBINER_AB_OUTPUT_NV 0x854A
+#define LOCAL_GL_COMBINER_CD_OUTPUT_NV 0x854B
+#define LOCAL_GL_COMBINER_SUM_OUTPUT_NV 0x854C
+#define LOCAL_GL_MAX_GENERAL_COMBINERS_NV 0x854D
+#define LOCAL_GL_NUM_GENERAL_COMBINERS_NV 0x854E
+#define LOCAL_GL_COLOR_SUM_CLAMP_NV 0x854F
+#define LOCAL_GL_COMBINER0_NV 0x8550
+#define LOCAL_GL_COMBINER1_NV 0x8551
+#define LOCAL_GL_COMBINER2_NV 0x8552
+#define LOCAL_GL_COMBINER3_NV 0x8553
+#define LOCAL_GL_COMBINER4_NV 0x8554
+#define LOCAL_GL_COMBINER5_NV 0x8555
+#define LOCAL_GL_COMBINER6_NV 0x8556
+#define LOCAL_GL_COMBINER7_NV 0x8557
+#define LOCAL_GL_NV_register_combiners2 1
+#define LOCAL_GL_PER_STAGE_CONSTANTS_NV 0x8535
+#define LOCAL_GL_NV_texgen_emboss 1
+#define LOCAL_GL_EMBOSS_LIGHT_NV 0x855D
+#define LOCAL_GL_EMBOSS_CONSTANT_NV 0x855E
+#define LOCAL_GL_EMBOSS_MAP_NV 0x855F
+#define LOCAL_GL_NV_texgen_reflection 1
+#define LOCAL_GL_NORMAL_MAP_NV 0x8511
+#define LOCAL_GL_REFLECTION_MAP_NV 0x8512
+#define LOCAL_GL_NV_texture_compression_vtc 1
+#define LOCAL_GL_NV_texture_env_combine4 1
+#define LOCAL_GL_COMBINE4_NV 0x8503
+#define LOCAL_GL_SOURCE3_RGB_NV 0x8583
+#define LOCAL_GL_SOURCE3_ALPHA_NV 0x858B
+#define LOCAL_GL_OPERAND3_RGB_NV 0x8593
+#define LOCAL_GL_OPERAND3_ALPHA_NV 0x859B
+#define LOCAL_GL_NV_texture_expand_normal 1
+#define LOCAL_GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F
+#define LOCAL_GL_NV_texture_rectangle 1
+#define LOCAL_GL_TEXTURE_RECTANGLE_NV 0x84F5
+#define LOCAL_GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
+#define LOCAL_GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
+#define LOCAL_GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8
+#define LOCAL_GL_NV_texture_shader 1
+#define LOCAL_GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
+#define LOCAL_GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
+#define LOCAL_GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
+#define LOCAL_GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
+#define LOCAL_GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
+#define LOCAL_GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
+#define LOCAL_GL_DSDT_MAG_INTENSITY_NV 0x86DC
+#define LOCAL_GL_SHADER_CONSISTENT_NV 0x86DD
+#define LOCAL_GL_TEXTURE_SHADER_NV 0x86DE
+#define LOCAL_GL_SHADER_OPERATION_NV 0x86DF
+#define LOCAL_GL_CULL_MODES_NV 0x86E0
+#define LOCAL_GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
+#define LOCAL_GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
+#define LOCAL_GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
+#define LOCAL_GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
+#define LOCAL_GL_CONST_EYE_NV 0x86E5
+#define LOCAL_GL_PASS_THROUGH_NV 0x86E6
+#define LOCAL_GL_CULL_FRAGMENT_NV 0x86E7
+#define LOCAL_GL_OFFSET_TEXTURE_2D_NV 0x86E8
+#define LOCAL_GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
+#define LOCAL_GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
+#define LOCAL_GL_DOT_PRODUCT_NV 0x86EC
+#define LOCAL_GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
+#define LOCAL_GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
+#define LOCAL_GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
+#define LOCAL_GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
+#define LOCAL_GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
+#define LOCAL_GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
+#define LOCAL_GL_HILO_NV 0x86F4
+#define LOCAL_GL_DSDT_NV 0x86F5
+#define LOCAL_GL_DSDT_MAG_NV 0x86F6
+#define LOCAL_GL_DSDT_MAG_VIB_NV 0x86F7
+#define LOCAL_GL_HILO16_NV 0x86F8
+#define LOCAL_GL_SIGNED_HILO_NV 0x86F9
+#define LOCAL_GL_SIGNED_HILO16_NV 0x86FA
+#define LOCAL_GL_SIGNED_RGBA_NV 0x86FB
+#define LOCAL_GL_SIGNED_RGBA8_NV 0x86FC
+#define LOCAL_GL_SIGNED_RGB_NV 0x86FE
+#define LOCAL_GL_SIGNED_RGB8_NV 0x86FF
+#define LOCAL_GL_SIGNED_LUMINANCE_NV 0x8701
+#define LOCAL_GL_SIGNED_LUMINANCE8_NV 0x8702
+#define LOCAL_GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
+#define LOCAL_GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
+#define LOCAL_GL_SIGNED_ALPHA_NV 0x8705
+#define LOCAL_GL_SIGNED_ALPHA8_NV 0x8706
+#define LOCAL_GL_SIGNED_INTENSITY_NV 0x8707
+#define LOCAL_GL_SIGNED_INTENSITY8_NV 0x8708
+#define LOCAL_GL_DSDT8_NV 0x8709
+#define LOCAL_GL_DSDT8_MAG8_NV 0x870A
+#define LOCAL_GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
+#define LOCAL_GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
+#define LOCAL_GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
+#define LOCAL_GL_HI_SCALE_NV 0x870E
+#define LOCAL_GL_LO_SCALE_NV 0x870F
+#define LOCAL_GL_DS_SCALE_NV 0x8710
+#define LOCAL_GL_DT_SCALE_NV 0x8711
+#define LOCAL_GL_MAGNITUDE_SCALE_NV 0x8712
+#define LOCAL_GL_VIBRANCE_SCALE_NV 0x8713
+#define LOCAL_GL_HI_BIAS_NV 0x8714
+#define LOCAL_GL_LO_BIAS_NV 0x8715
+#define LOCAL_GL_DS_BIAS_NV 0x8716
+#define LOCAL_GL_DT_BIAS_NV 0x8717
+#define LOCAL_GL_MAGNITUDE_BIAS_NV 0x8718
+#define LOCAL_GL_VIBRANCE_BIAS_NV 0x8719
+#define LOCAL_GL_TEXTURE_BORDER_VALUES_NV 0x871A
+#define LOCAL_GL_TEXTURE_HI_SIZE_NV 0x871B
+#define LOCAL_GL_TEXTURE_LO_SIZE_NV 0x871C
+#define LOCAL_GL_TEXTURE_DS_SIZE_NV 0x871D
+#define LOCAL_GL_TEXTURE_DT_SIZE_NV 0x871E
+#define LOCAL_GL_TEXTURE_MAG_SIZE_NV 0x871F
+#define LOCAL_GL_NV_texture_shader2 1
+#define LOCAL_GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
+#define LOCAL_GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
+#define LOCAL_GL_DSDT_MAG_INTENSITY_NV 0x86DC
+#define LOCAL_GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
+#define LOCAL_GL_HILO_NV 0x86F4
+#define LOCAL_GL_DSDT_NV 0x86F5
+#define LOCAL_GL_DSDT_MAG_NV 0x86F6
+#define LOCAL_GL_DSDT_MAG_VIB_NV 0x86F7
+#define LOCAL_GL_HILO16_NV 0x86F8
+#define LOCAL_GL_SIGNED_HILO_NV 0x86F9
+#define LOCAL_GL_SIGNED_HILO16_NV 0x86FA
+#define LOCAL_GL_SIGNED_RGBA_NV 0x86FB
+#define LOCAL_GL_SIGNED_RGBA8_NV 0x86FC
+#define LOCAL_GL_SIGNED_RGB_NV 0x86FE
+#define LOCAL_GL_SIGNED_RGB8_NV 0x86FF
+#define LOCAL_GL_SIGNED_LUMINANCE_NV 0x8701
+#define LOCAL_GL_SIGNED_LUMINANCE8_NV 0x8702
+#define LOCAL_GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
+#define LOCAL_GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
+#define LOCAL_GL_SIGNED_ALPHA_NV 0x8705
+#define LOCAL_GL_SIGNED_ALPHA8_NV 0x8706
+#define LOCAL_GL_SIGNED_INTENSITY_NV 0x8707
+#define LOCAL_GL_SIGNED_INTENSITY8_NV 0x8708
+#define LOCAL_GL_DSDT8_NV 0x8709
+#define LOCAL_GL_DSDT8_MAG8_NV 0x870A
+#define LOCAL_GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
+#define LOCAL_GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
+#define LOCAL_GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
+#define LOCAL_GL_NV_texture_shader3 1
+#define LOCAL_GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
+#define LOCAL_GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
+#define LOCAL_GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
+#define LOCAL_GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
+#define LOCAL_GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
+#define LOCAL_GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
+#define LOCAL_GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
+#define LOCAL_GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
+#define LOCAL_GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
+#define LOCAL_GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
+#define LOCAL_GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
+#define LOCAL_GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
+#define LOCAL_GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
+#define LOCAL_GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
+#define LOCAL_GL_HILO8_NV 0x885E
+#define LOCAL_GL_SIGNED_HILO8_NV 0x885F
+#define LOCAL_GL_FORCE_BLUE_TO_ONE_NV 0x8860
+#define LOCAL_GL_NV_vertex_array_range 1
+#define LOCAL_GL_VERTEX_ARRAY_RANGE_NV 0x851D
+#define LOCAL_GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
+#define LOCAL_GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
+#define LOCAL_GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
+#define LOCAL_GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
+#define LOCAL_GL_NV_vertex_array_range2 1
+#define LOCAL_GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
+#define LOCAL_GL_NV_vertex_program 1
+#define LOCAL_GL_VERTEX_PROGRAM_NV 0x8620
+#define LOCAL_GL_VERTEX_STATE_PROGRAM_NV 0x8621
+#define LOCAL_GL_ATTRIB_ARRAY_SIZE_NV 0x8623
+#define LOCAL_GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
+#define LOCAL_GL_ATTRIB_ARRAY_TYPE_NV 0x8625
+#define LOCAL_GL_CURRENT_ATTRIB_NV 0x8626
+#define LOCAL_GL_PROGRAM_LENGTH_NV 0x8627
+#define LOCAL_GL_PROGRAM_STRING_NV 0x8628
+#define LOCAL_GL_MODELVIEW_PROJECTION_NV 0x8629
+#define LOCAL_GL_IDENTITY_NV 0x862A
+#define LOCAL_GL_INVERSE_NV 0x862B
+#define LOCAL_GL_TRANSPOSE_NV 0x862C
+#define LOCAL_GL_INVERSE_TRANSPOSE_NV 0x862D
+#define LOCAL_GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
+#define LOCAL_GL_MAX_TRACK_MATRICES_NV 0x862F
+#define LOCAL_GL_MATRIX0_NV 0x8630
+#define LOCAL_GL_MATRIX1_NV 0x8631
+#define LOCAL_GL_MATRIX2_NV 0x8632
+#define LOCAL_GL_MATRIX3_NV 0x8633
+#define LOCAL_GL_MATRIX4_NV 0x8634
+#define LOCAL_GL_MATRIX5_NV 0x8635
+#define LOCAL_GL_MATRIX6_NV 0x8636
+#define LOCAL_GL_MATRIX7_NV 0x8637
+#define LOCAL_GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
+#define LOCAL_GL_CURRENT_MATRIX_NV 0x8641
+#define LOCAL_GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
+#define LOCAL_GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
+#define LOCAL_GL_PROGRAM_PARAMETER_NV 0x8644
+#define LOCAL_GL_ATTRIB_ARRAY_POINTER_NV 0x8645
+#define LOCAL_GL_PROGRAM_TARGET_NV 0x8646
+#define LOCAL_GL_PROGRAM_RESIDENT_NV 0x8647
+#define LOCAL_GL_TRACK_MATRIX_NV 0x8648
+#define LOCAL_GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
+#define LOCAL_GL_VERTEX_PROGRAM_BINDING_NV 0x864A
+#define LOCAL_GL_PROGRAM_ERROR_POSITION_NV 0x864B
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
+#define LOCAL_GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
+#define LOCAL_GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
+#define LOCAL_GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
+#define LOCAL_GL_NV_vertex_program1_1 1
+#define LOCAL_GL_NV_vertex_program2 1
+#define LOCAL_GL_NV_vertex_program2_option 1
+#define LOCAL_GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
+#define LOCAL_GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
+#define LOCAL_GL_NV_vertex_program3 1
+#define LOCAL_GL_OML_interlace 1
+#define LOCAL_GL_INTERLACE_OML 0x8980
+#define LOCAL_GL_INTERLACE_READ_OML 0x8981
+#define LOCAL_GL_OML_resample 1
+#define LOCAL_GL_PACK_RESAMPLE_OML 0x8984
+#define LOCAL_GL_UNPACK_RESAMPLE_OML 0x8985
+#define LOCAL_GL_RESAMPLE_REPLICATE_OML 0x8986
+#define LOCAL_GL_RESAMPLE_ZERO_FILL_OML 0x8987
+#define LOCAL_GL_RESAMPLE_AVERAGE_OML 0x8988
+#define LOCAL_GL_RESAMPLE_DECIMATE_OML 0x8989
+#define LOCAL_GL_OML_subsample 1
+#define LOCAL_GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
+#define LOCAL_GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
+#define LOCAL_GL_PGI_misc_hints 1
+#define LOCAL_GL_PREFER_DOUBLEBUFFER_HINT_PGI 107000
+#define LOCAL_GL_CONSERVE_MEMORY_HINT_PGI 107005
+#define LOCAL_GL_RECLAIM_MEMORY_HINT_PGI 107006
+#define LOCAL_GL_NATIVE_GRAPHICS_HANDLE_PGI 107010
+#define LOCAL_GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 107011
+#define LOCAL_GL_NATIVE_GRAPHICS_END_HINT_PGI 107012
+#define LOCAL_GL_ALWAYS_FAST_HINT_PGI 107020
+#define LOCAL_GL_ALWAYS_SOFT_HINT_PGI 107021
+#define LOCAL_GL_ALLOW_DRAW_OBJ_HINT_PGI 107022
+#define LOCAL_GL_ALLOW_DRAW_WIN_HINT_PGI 107023
+#define LOCAL_GL_ALLOW_DRAW_FRG_HINT_PGI 107024
+#define LOCAL_GL_ALLOW_DRAW_MEM_HINT_PGI 107025
+#define LOCAL_GL_STRICT_DEPTHFUNC_HINT_PGI 107030
+#define LOCAL_GL_STRICT_LIGHTING_HINT_PGI 107031
+#define LOCAL_GL_STRICT_SCISSOR_HINT_PGI 107032
+#define LOCAL_GL_FULL_STIPPLE_HINT_PGI 107033
+#define LOCAL_GL_CLIP_NEAR_HINT_PGI 107040
+#define LOCAL_GL_CLIP_FAR_HINT_PGI 107041
+#define LOCAL_GL_WIDE_LINE_HINT_PGI 107042
+#define LOCAL_GL_BACK_NORMALS_HINT_PGI 107043
+#define LOCAL_GL_PGI_vertex_hints 1
+#define LOCAL_GL_VERTEX23_BIT_PGI 0x00000004
+#define LOCAL_GL_VERTEX4_BIT_PGI 0x00000008
+#define LOCAL_GL_COLOR3_BIT_PGI 0x00010000
+#define LOCAL_GL_COLOR4_BIT_PGI 0x00020000
+#define LOCAL_GL_EDGEFLAG_BIT_PGI 0x00040000
+#define LOCAL_GL_INDEX_BIT_PGI 0x00080000
+#define LOCAL_GL_MAT_AMBIENT_BIT_PGI 0x00100000
+#define LOCAL_GL_VERTEX_DATA_HINT_PGI 107050
+#define LOCAL_GL_VERTEX_CONSISTENT_HINT_PGI 107051
+#define LOCAL_GL_MATERIAL_SIDE_HINT_PGI 107052
+#define LOCAL_GL_MAX_VERTEX_HINT_PGI 107053
+#define LOCAL_GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
+#define LOCAL_GL_MAT_DIFFUSE_BIT_PGI 0x00400000
+#define LOCAL_GL_MAT_EMISSION_BIT_PGI 0x00800000
+#define LOCAL_GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
+#define LOCAL_GL_MAT_SHININESS_BIT_PGI 0x02000000
+#define LOCAL_GL_MAT_SPECULAR_BIT_PGI 0x04000000
+#define LOCAL_GL_NORMAL_BIT_PGI 0x08000000
+#define LOCAL_GL_TEXCOORD1_BIT_PGI 0x10000000
+#define LOCAL_GL_TEXCOORD2_BIT_PGI 0x20000000
+#define LOCAL_GL_TEXCOORD3_BIT_PGI 0x40000000
+#define LOCAL_GL_TEXCOORD4_BIT_PGI 0x80000000
+#define LOCAL_GL_REND_screen_coordinates 1
+#define LOCAL_GL_SCREEN_COORDINATES_REND 0x8490
+#define LOCAL_GL_INVERTED_SCREEN_W_REND 0x8491
+#define LOCAL_GL_S3_s3tc 1
+#define LOCAL_GL_RGB_S3TC 0x83A0
+#define LOCAL_GL_RGB4_S3TC 0x83A1
+#define LOCAL_GL_RGBA_S3TC 0x83A2
+#define LOCAL_GL_RGBA4_S3TC 0x83A3
+#define LOCAL_GL_RGBA_DXT5_S3TC 0x83A4
+#define LOCAL_GL_RGBA4_DXT5_S3TC 0x83A5
+#define LOCAL_GL_SGIS_color_range 1
+#define LOCAL_GL_EXTENDED_RANGE_SGIS 0x85A5
+#define LOCAL_GL_MIN_RED_SGIS 0x85A6
+#define LOCAL_GL_MAX_RED_SGIS 0x85A7
+#define LOCAL_GL_MIN_GREEN_SGIS 0x85A8
+#define LOCAL_GL_MAX_GREEN_SGIS 0x85A9
+#define LOCAL_GL_MIN_BLUE_SGIS 0x85AA
+#define LOCAL_GL_MAX_BLUE_SGIS 0x85AB
+#define LOCAL_GL_MIN_ALPHA_SGIS 0x85AC
+#define LOCAL_GL_MAX_ALPHA_SGIS 0x85AD
+#define LOCAL_GL_SGIS_detail_texture 1
+#define LOCAL_GL_SGIS_fog_function 1
+#define LOCAL_GL_SGIS_generate_mipmap 1
+#define LOCAL_GL_GENERATE_MIPMAP_SGIS 0x8191
+#define LOCAL_GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
+#define LOCAL_GL_SGIS_multisample 1
+#define LOCAL_GL_MULTISAMPLE_SGIS 0x809D
+#define LOCAL_GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
+#define LOCAL_GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
+#define LOCAL_GL_SAMPLE_MASK_SGIS 0x80A0
+#define LOCAL_GL_1PASS_SGIS 0x80A1
+#define LOCAL_GL_2PASS_0_SGIS 0x80A2
+#define LOCAL_GL_2PASS_1_SGIS 0x80A3
+#define LOCAL_GL_4PASS_0_SGIS 0x80A4
+#define LOCAL_GL_4PASS_1_SGIS 0x80A5
+#define LOCAL_GL_4PASS_2_SGIS 0x80A6
+#define LOCAL_GL_4PASS_3_SGIS 0x80A7
+#define LOCAL_GL_SAMPLE_BUFFERS_SGIS 0x80A8
+#define LOCAL_GL_SAMPLES_SGIS 0x80A9
+#define LOCAL_GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
+#define LOCAL_GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
+#define LOCAL_GL_SAMPLE_PATTERN_SGIS 0x80AC
+#define LOCAL_GL_MULTISAMPLE_BIT_EXT 0x20000000
+#define LOCAL_GL_SGIS_pixel_texture 1
+#define LOCAL_GL_SGIS_sharpen_texture 1
+#define LOCAL_GL_SGIS_texture4D 1
+#define LOCAL_GL_SGIS_texture_border_clamp 1
+#define LOCAL_GL_CLAMP_TO_BORDER_SGIS 0x812D
+#define LOCAL_GL_SGIS_texture_edge_clamp 1
+#define LOCAL_GL_CLAMP_TO_EDGE_SGIS 0x812F
+#define LOCAL_GL_SGIS_texture_filter4 1
+#define LOCAL_GL_SGIS_texture_lod 1
+#define LOCAL_GL_TEXTURE_MIN_LOD_SGIS 0x813A
+#define LOCAL_GL_TEXTURE_MAX_LOD_SGIS 0x813B
+#define LOCAL_GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
+#define LOCAL_GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
+#define LOCAL_GL_SGIS_texture_select 1
+#define LOCAL_GL_SGIX_async 1
+#define LOCAL_GL_ASYNC_MARKER_SGIX 0x8329
+#define LOCAL_GL_SGIX_async_histogram 1
+#define LOCAL_GL_ASYNC_HISTOGRAM_SGIX 0x832C
+#define LOCAL_GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
+#define LOCAL_GL_SGIX_async_pixel 1
+#define LOCAL_GL_ASYNC_TEX_IMAGE_SGIX 0x835C
+#define LOCAL_GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
+#define LOCAL_GL_ASYNC_READ_PIXELS_SGIX 0x835E
+#define LOCAL_GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
+#define LOCAL_GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
+#define LOCAL_GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
+#define LOCAL_GL_SGIX_blend_alpha_minmax 1
+#define LOCAL_GL_ALPHA_MIN_SGIX 0x8320
+#define LOCAL_GL_ALPHA_MAX_SGIX 0x8321
+#define LOCAL_GL_SGIX_clipmap 1
+#define LOCAL_GL_SGIX_depth_texture 1
+#define LOCAL_GL_DEPTH_COMPONENT16_SGIX 0x81A5
+#define LOCAL_GL_DEPTH_COMPONENT24_SGIX 0x81A6
+#define LOCAL_GL_DEPTH_COMPONENT32_SGIX 0x81A7
+#define LOCAL_GL_SGIX_flush_raster 1
+#define LOCAL_GL_SGIX_fog_offset 1
+#define LOCAL_GL_FOG_OFFSET_SGIX 0x8198
+#define LOCAL_GL_FOG_OFFSET_VALUE_SGIX 0x8199
+#define LOCAL_GL_SGIX_fog_texture 1
+#define LOCAL_GL_TEXTURE_FOG_SGIX 0
+#define LOCAL_GL_FOG_PATCHY_FACTOR_SGIX 0
+#define LOCAL_GL_FRAGMENT_FOG_SGIX 0
+#define LOCAL_GL_SGIX_fragment_specular_lighting 1
+#define LOCAL_GL_SGIX_framezoom 1
+#define LOCAL_GL_SGIX_interlace 1
+#define LOCAL_GL_INTERLACE_SGIX 0x8094
+#define LOCAL_GL_SGIX_ir_instrument1 1
+#define LOCAL_GL_SGIX_list_priority 1
+#define LOCAL_GL_SGIX_pixel_texture 1
+#define LOCAL_GL_SGIX_pixel_texture_bits 1
+#define LOCAL_GL_SGIX_reference_plane 1
+#define LOCAL_GL_SGIX_resample 1
+#define LOCAL_GL_PACK_RESAMPLE_SGIX 0x842E
+#define LOCAL_GL_UNPACK_RESAMPLE_SGIX 0x842F
+#define LOCAL_GL_RESAMPLE_DECIMATE_SGIX 0x8430
+#define LOCAL_GL_RESAMPLE_REPLICATE_SGIX 0x8433
+#define LOCAL_GL_RESAMPLE_ZERO_FILL_SGIX 0x8434
+#define LOCAL_GL_SGIX_shadow 1
+#define LOCAL_GL_TEXTURE_COMPARE_SGIX 0x819A
+#define LOCAL_GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
+#define LOCAL_GL_TEXTURE_LEQUAL_R_SGIX 0x819C
+#define LOCAL_GL_TEXTURE_GEQUAL_R_SGIX 0x819D
+#define LOCAL_GL_SGIX_shadow_ambient 1
+#define LOCAL_GL_SHADOW_AMBIENT_SGIX 0x80BF
+#define LOCAL_GL_SGIX_sprite 1
+#define LOCAL_GL_SGIX_tag_sample_buffer 1
+#define LOCAL_GL_SGIX_texture_add_env 1
+#define LOCAL_GL_SGIX_texture_coordinate_clamp 1
+#define LOCAL_GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
+#define LOCAL_GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
+#define LOCAL_GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
+#define LOCAL_GL_SGIX_texture_lod_bias 1
+#define LOCAL_GL_SGIX_texture_multi_buffer 1
+#define LOCAL_GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
+#define LOCAL_GL_SGIX_texture_range 1
+#define LOCAL_GL_RGB_SIGNED_SGIX 0x85E0
+#define LOCAL_GL_RGBA_SIGNED_SGIX 0x85E1
+#define LOCAL_GL_ALPHA_SIGNED_SGIX 0x85E2
+#define LOCAL_GL_LUMINANCE_SIGNED_SGIX 0x85E3
+#define LOCAL_GL_INTENSITY_SIGNED_SGIX 0x85E4
+#define LOCAL_GL_LUMINANCE_ALPHA_SIGNED_SGIX 0x85E5
+#define LOCAL_GL_RGB16_SIGNED_SGIX 0x85E6
+#define LOCAL_GL_RGBA16_SIGNED_SGIX 0x85E7
+#define LOCAL_GL_ALPHA16_SIGNED_SGIX 0x85E8
+#define LOCAL_GL_LUMINANCE16_SIGNED_SGIX 0x85E9
+#define LOCAL_GL_INTENSITY16_SIGNED_SGIX 0x85EA
+#define LOCAL_GL_LUMINANCE16_ALPHA16_SIGNED_SGIX 0x85EB
+#define LOCAL_GL_RGB_EXTENDED_RANGE_SGIX 0x85EC
+#define LOCAL_GL_RGBA_EXTENDED_RANGE_SGIX 0x85ED
+#define LOCAL_GL_ALPHA_EXTENDED_RANGE_SGIX 0x85EE
+#define LOCAL_GL_LUMINANCE_EXTENDED_RANGE_SGIX 0x85EF
+#define LOCAL_GL_INTENSITY_EXTENDED_RANGE_SGIX 0x85F0
+#define LOCAL_GL_LUMINANCE_ALPHA_EXTENDED_RANGE_SGIX 0x85F1
+#define LOCAL_GL_RGB16_EXTENDED_RANGE_SGIX 0x85F2
+#define LOCAL_GL_RGBA16_EXTENDED_RANGE_SGIX 0x85F3
+#define LOCAL_GL_ALPHA16_EXTENDED_RANGE_SGIX 0x85F4
+#define LOCAL_GL_LUMINANCE16_EXTENDED_RANGE_SGIX 0x85F5
+#define LOCAL_GL_INTENSITY16_EXTENDED_RANGE_SGIX 0x85F6
+#define LOCAL_GL_LUMINANCE16_ALPHA16_EXTENDED_RANGE_SGIX 0x85F7
+#define LOCAL_GL_MIN_LUMINANCE_SGIS 0x85F8
+#define LOCAL_GL_MAX_LUMINANCE_SGIS 0x85F9
+#define LOCAL_GL_MIN_INTENSITY_SGIS 0x85FA
+#define LOCAL_GL_MAX_INTENSITY_SGIS 0x85FB
+#define LOCAL_GL_SGIX_texture_scale_bias 1
+#define LOCAL_GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
+#define LOCAL_GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
+#define LOCAL_GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
+#define LOCAL_GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
+#define LOCAL_GL_SGIX_vertex_preclip 1
+#define LOCAL_GL_VERTEX_PRECLIP_SGIX 0x83EE
+#define LOCAL_GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
+#define LOCAL_GL_SGIX_vertex_preclip_hint 1
+#define LOCAL_GL_VERTEX_PRECLIP_SGIX 0x83EE
+#define LOCAL_GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
+#define LOCAL_GL_SGIX_ycrcb 1
+#define LOCAL_GL_SGI_color_matrix 1
+#define LOCAL_GL_COLOR_MATRIX_SGI 0x80B1
+#define LOCAL_GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
+#define LOCAL_GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
+#define LOCAL_GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
+#define LOCAL_GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
+#define LOCAL_GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
+#define LOCAL_GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
+#define LOCAL_GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
+#define LOCAL_GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
+#define LOCAL_GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
+#define LOCAL_GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
+#define LOCAL_GL_SGI_color_table 1
+#define LOCAL_GL_COLOR_TABLE_SGI 0x80D0
+#define LOCAL_GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
+#define LOCAL_GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
+#define LOCAL_GL_PROXY_COLOR_TABLE_SGI 0x80D3
+#define LOCAL_GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
+#define LOCAL_GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
+#define LOCAL_GL_COLOR_TABLE_SCALE_SGI 0x80D6
+#define LOCAL_GL_COLOR_TABLE_BIAS_SGI 0x80D7
+#define LOCAL_GL_COLOR_TABLE_FORMAT_SGI 0x80D8
+#define LOCAL_GL_COLOR_TABLE_WIDTH_SGI 0x80D9
+#define LOCAL_GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
+#define LOCAL_GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
+#define LOCAL_GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
+#define LOCAL_GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
+#define LOCAL_GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
+#define LOCAL_GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
+#define LOCAL_GL_SGI_texture_color_table 1
+#define LOCAL_GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
+#define LOCAL_GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
+#define LOCAL_GL_SUNX_constant_data 1
+#define LOCAL_GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
+#define LOCAL_GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
+#define LOCAL_GL_SUN_convolution_border_modes 1
+#define LOCAL_GL_WRAP_BORDER_SUN 0x81D4
+#define LOCAL_GL_SUN_global_alpha 1
+#define LOCAL_GL_GLOBAL_ALPHA_SUN 0x81D9
+#define LOCAL_GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
+#define LOCAL_GL_SUN_mesh_array 1
+#define LOCAL_GL_QUAD_MESH_SUN 0x8614
+#define LOCAL_GL_TRIANGLE_MESH_SUN 0x8615
+#define LOCAL_GL_SUN_read_video_pixels 1
+#define LOCAL_GL_SUN_slice_accum 1
+#define LOCAL_GL_SLICE_ACCUM_SUN 0x85CC
+#define LOCAL_GL_SUN_triangle_list 1
+#define LOCAL_GL_RESTART_SUN 0x01
+#define LOCAL_GL_REPLACE_MIDDLE_SUN 0x02
+#define LOCAL_GL_REPLACE_OLDEST_SUN 0x03
+#define LOCAL_GL_TRIANGLE_LIST_SUN 0x81D7
+#define LOCAL_GL_REPLACEMENT_CODE_SUN 0x81D8
+#define LOCAL_GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
+#define LOCAL_GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
+#define LOCAL_GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
+#define LOCAL_GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
+#define LOCAL_GL_R1UI_V3F_SUN 0x85C4
+#define LOCAL_GL_R1UI_C4UB_V3F_SUN 0x85C5
+#define LOCAL_GL_R1UI_C3F_V3F_SUN 0x85C6
+#define LOCAL_GL_R1UI_N3F_V3F_SUN 0x85C7
+#define LOCAL_GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
+#define LOCAL_GL_R1UI_T2F_V3F_SUN 0x85C9
+#define LOCAL_GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
+#define LOCAL_GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
+#define LOCAL_GL_SUN_vertex 1
+#define LOCAL_GL_WIN_phong_shading 1
+#define LOCAL_GL_PHONG_WIN 0x80EA
+#define LOCAL_GL_PHONG_HINT_WIN 0x80EB
+#define LOCAL_GL_WIN_specular_fog 1
+#define LOCAL_GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
+#define LOCAL_GL_WIN_swap_hint 1
+
+#define LOCAL_GL_FRAMEBUFFER_EXT 0x8D40
+#define LOCAL_GL_COLOR_ATTACHMENT0_EXT 0x8CE0
+
+#endif
new file mode 100644
--- /dev/null
+++ b/gfx/layers/opengl/glWrapper.cpp
@@ -0,0 +1,215 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Corporation code.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Bas Schouten <bschouten@mozilla.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "glWrapper.h"
+#include "nsDebug.h"
+
+#ifdef XP_WIN
+#define glGetProcAddress wGetProcAddress
+#else
+// We do not know how to glGetProcAddress on this platform.
+PRFuncPtr glGetProcAddress(const char *)
+{
+  return NULL;
+}
+#endif
+
+glWrapper sglWrapper;
+
+struct OGLFunction {
+  PRFuncPtr *functor;
+  const char *name;
+};
+
+glWrapper::glWrapper()
+  : mIsInitialized(PR_FALSE)
+  , mOGLLibrary(NULL)
+{
+}
+
+#ifdef XP_WIN
+HGLRC
+glWrapper::wCreateContext(HDC aDC)
+{
+  if (!wCreateContextInternal) {
+    if (!mOGLLibrary) {
+#ifdef XP_WIN
+      mOGLLibrary = PR_LoadLibrary("Opengl32.dll");
+#else
+      return NULL;
+#endif
+      if (!mOGLLibrary) {
+        NS_WARNING("Couldn't load OpenGL DLL.");
+        return NULL;
+      }
+    }
+    
+    wCreateContextInternal = (PFNWGLCREATECONTEXTPROC)
+      PR_FindSymbol(mOGLLibrary, "wglCreateContext");
+    wDeleteContext = (PFNWGLDELETECONTEXTPROC)
+      PR_FindSymbol(mOGLLibrary, "wglDeleteContext");
+    wMakeCurrent = (PFNWGLMAKECURRENTPROC)
+      PR_FindSymbol(mOGLLibrary, "wglMakeCurrent");
+    wGetProcAddress = (PFNWGLGETPROCADDRESSPROC)
+      PR_FindSymbol(mOGLLibrary, "wglGetProcAddress");
+  }
+  HGLRC retval = wCreateContextInternal(aDC);
+
+  if (!retval) {
+    return retval;
+  }
+  wMakeCurrent(aDC, retval);
+
+  if (!EnsureInitialized()) {
+    NS_WARNING("Failed to initialize OpenGL wrapper.");
+    return NULL;
+  }
+
+  return retval;
+}
+#endif
+
+PRBool
+glWrapper::LoadSymbols(OGLFunction *functions)
+{
+  for (int i = 0; functions[i].functor; i++) {
+    *functions[i].functor =
+      PR_FindFunctionSymbol(mOGLLibrary, functions[i].name);
+
+    if (*functions[i].functor) {
+      continue;
+    }
+
+    if (!glGetProcAddress) {
+      return PR_FALSE;
+    }
+    *functions[i].functor = (PRFuncPtr)glGetProcAddress(functions[i].name);
+    if (!*functions[i].functor) {
+      return PR_FALSE;
+    }
+  }
+
+  return PR_TRUE;
+}
+
+PRBool
+glWrapper::EnsureInitialized()
+{
+  if (mIsInitialized) {
+    return PR_TRUE;
+  }
+
+  OGLFunction functions[] = {
+
+    { (PRFuncPtr*) &BlendFuncSeparate, "glBlendFuncSeparate" },
+    
+    { (PRFuncPtr*) &Enable, "glEnable" },
+    { (PRFuncPtr*) &EnableClientState, "glEnableClientState" },
+    { (PRFuncPtr*) &EnableVertexAttribArray, "glEnableVertexAttribArray" },
+    { (PRFuncPtr*) &Disable, "glDisable" },
+    { (PRFuncPtr*) &DisableClientState, "glDisableClientState" },
+    { (PRFuncPtr*) &DisableVertexAttribArray, "glDisableVertexAttribArray" },
+
+    { (PRFuncPtr*) &DrawArrays, "glDrawArrays" },
+
+    { (PRFuncPtr*) &Finish, "glFinish" },
+    { (PRFuncPtr*) &Clear, "glClear" },
+    { (PRFuncPtr*) &Scissor, "glScissor" },
+    { (PRFuncPtr*) &Viewport, "glViewport" },
+    { (PRFuncPtr*) &ClearColor, "glClearColor" },
+    { (PRFuncPtr*) &ReadBuffer, "glReadBuffer" },
+    { (PRFuncPtr*) &ReadPixels, "glReadPixels" },
+
+    { (PRFuncPtr*) &TexEnvf, "glTexEnvf" },
+    { (PRFuncPtr*) &TexParameteri, "glTexParameteri" },
+    { (PRFuncPtr*) &ActiveTexture, "glActiveTexture" },
+    { (PRFuncPtr*) &PixelStorei, "glPixelStorei" },
+
+    { (PRFuncPtr*) &GenTextures, "glGenTextures" },
+    { (PRFuncPtr*) &GenBuffers, "glGenBuffers" },
+    { (PRFuncPtr*) &GenFramebuffersEXT, "glGenFramebuffersEXT" },
+    { (PRFuncPtr*) &DeleteTextures, "glDeleteTextures" },
+    { (PRFuncPtr*) &DeleteFramebuffersEXT, "glDeleteFramebuffersEXT" },
+    
+    { (PRFuncPtr*) &BindTexture, "glBindTexture" },
+    { (PRFuncPtr*) &BindBuffer, "glBindBuffer" },
+    { (PRFuncPtr*) &BindFramebufferEXT, "glBindFramebufferEXT" },
+
+    { (PRFuncPtr*) &FramebufferTexture2DEXT, "glFramebufferTexture2DEXT" }, 
+
+    { (PRFuncPtr*) &BufferData, "glBufferData" },
+
+    { (PRFuncPtr*) &VertexPointer, "glVertexPointer" },
+    { (PRFuncPtr*) &TexCoordPointer, "glTexCoordPointer" },
+
+    { (PRFuncPtr*) &TexImage2D, "glTexImage2D" },
+    { (PRFuncPtr*) &TexSubImage2D, "glTexSubImage2D" },
+
+    { (PRFuncPtr*) &CreateShader, "glCreateShader" },
+    { (PRFuncPtr*) &CreateProgram, "glCreateProgram" },
+    { (PRFuncPtr*) &DeleteProgram, "glDeleteProgram" },
+    { (PRFuncPtr*) &UseProgram, "glUseProgram" },
+    { (PRFuncPtr*) &ShaderSource, "glShaderSource" },
+    { (PRFuncPtr*) &CompileShader, "glCompileShader" },
+    { (PRFuncPtr*) &AttachShader, "glAttachShader" },
+    { (PRFuncPtr*) &LinkProgram, "glLinkProgram" },
+    { (PRFuncPtr*) &GetProgramiv, "glGetProgramiv" },
+    { (PRFuncPtr*) &GetShaderiv, "glGetShaderiv" },
+
+    { (PRFuncPtr*) &BindAttribLocation, "glBindAttribLocation" },
+    { (PRFuncPtr*) &VertexAttribPointer, "glVertexAttribPointer" },
+
+    { (PRFuncPtr*) &Uniform1i, "glUniform1i" },
+    { (PRFuncPtr*) &Uniform1f, "glUniform1f" },
+    { (PRFuncPtr*) &Uniform4f, "glUniform4f" },
+    { (PRFuncPtr*) &UniformMatrix4fv, "glUniformMatrix4fv" },
+    { (PRFuncPtr*) &GetUniformLocation, "glGetUniformLocation" },
+
+    { (PRFuncPtr*) &GetString, "glGetString" },
+
+    { NULL, NULL }
+
+  };
+
+  if (!LoadSymbols(functions)) {
+    return PR_FALSE;
+  }
+
+  mIsInitialized = PR_TRUE;
+
+  return PR_TRUE;
+}
new file mode 100644
--- /dev/null
+++ b/gfx/layers/opengl/glWrapper.h
@@ -0,0 +1,277 @@
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Corporation code.
+ *
+ * The Initial Developer of the Original Code is Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Bas Schouten <bschouten@mozilla.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef GFX_GLWRAPPER_H
+#define GFX_GLWRAPPER_H
+
+#ifdef XP_WIN
+#include <windows.h>
+#endif
+#include "prlink.h"
+
+#include "glDefs.h"
+
+struct OGLFunction;
+
+class glWrapper
+{
+public:
+  glWrapper();
+
+  typedef void (GLAPIENTRY * PFNGLBLENDFUNCSEPARATEPROC) (GLenum,
+                                                        GLenum,
+                                                        GLenum,
+                                                        GLenum);
+  
+  typedef void (GLAPIENTRY * PFNGLENABLEPROC) (GLenum);
+  typedef void (GLAPIENTRY * PFNGLENABLECLIENTSTATEPROC) (GLenum);
+  typedef void (GLAPIENTRY * PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint);
+  typedef void (GLAPIENTRY * PFNGLDISABLEPROC) (GLenum);
+  typedef void (GLAPIENTRY * PFNGLDISABLECLIENTSTATEPROC) (GLenum);
+  typedef void (GLAPIENTRY * PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint);
+
+  typedef void (GLAPIENTRY * PFNGLDRAWARRAYSPROC) (GLenum, GLint, GLsizei);
+
+  typedef void (GLAPIENTRY * PFNGLFINISHPROC) (void);
+  typedef void (GLAPIENTRY * PFNGLCLEARPROC) (GLbitfield);
+  typedef void (GLAPIENTRY * PFNGLSCISSORPROC) (GLint, GLint, GLsizei, GLsizei);
+  typedef void (GLAPIENTRY * PFNGLVIEWPORTPROC) (GLint, GLint, GLsizei, GLsizei);
+  typedef void (GLAPIENTRY * PFNGLCLEARCOLORPROC) (GLclampf,
+                                                 GLclampf,
+                                                 GLclampf,
+                                                 GLclampf);
+  typedef void (GLAPIENTRY * PFNGLREADBUFFERPROC) (GLenum);
+  typedef void (GLAPIENTRY * PFNGLREADPIXELSPROC) (GLint,
+                                                 GLint,
+                                                 GLsizei,
+                                                 GLsizei,
+                                                 GLenum,
+                                                 GLenum,
+                                                 GLvoid *);
+
+  typedef void (GLAPIENTRY * PFNGLTEXENVFPROC) (GLenum, GLenum, GLfloat);
+  typedef void (GLAPIENTRY * PFNGLTEXPARAMETERIPROC) (GLenum, GLenum, GLint);
+  typedef void (GLAPIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum);
+  typedef void (GLAPIENTRY * PFNGLPIXELSTOREIPROC) (GLenum, GLint);
+
+  typedef void (GLAPIENTRY * PFNGLGENTEXTURESPROC) (GLsizei, GLuint *);
+  typedef void (GLAPIENTRY * PFNGLGENBUFFERSPROC) (GLsizei, GLuint *);
+  typedef void (GLAPIENTRY * PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei, GLuint *);
+  typedef void (GLAPIENTRY * PFNGLDELETETEXTURESPROC) (GLsizei, const GLuint *);
+  typedef void (GLAPIENTRY * PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei,
+                                                            const GLuint *);
+  
+  typedef void (GLAPIENTRY * PFNGLBINDTEXTUREPROC) (GLenum, GLuint);
+  typedef void (GLAPIENTRY * PFNGLBINDBUFFERPROC) (GLenum, GLuint);
+  typedef void (GLAPIENTRY * PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum, GLuint);
+
+  typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum,
+                                                              GLenum,
+                                                              GLenum,
+                                                              GLuint,
+                                                              GLint); 
+
+  typedef void (GLAPIENTRY * PFNGLBUFFERDATAPROC) (GLenum,
+                                                 GLsizeiptr,
+                                                 const GLvoid *,
+                                                 GLenum);
+
+  typedef void (GLAPIENTRY * PFNGLVERTEXPOINTERPROC) (GLint,
+                                                    GLenum,
+                                                    GLsizei,
+                                                    const GLvoid *);
+  typedef void (GLAPIENTRY * PFNGLTEXCOORDPOINTERPROC) (GLint,
+                                                      GLenum,
+                                                      GLsizei,
+                                                      const GLvoid *);
+
+  typedef void (GLAPIENTRY * PFNGLTEXIMAGE2DPROC) (GLenum,
+                                                 GLint,
+                                                 GLint,
+                                                 GLsizei,
+                                                 GLsizei,
+                                                 GLint,
+                                                 GLenum,
+                                                 GLenum,
+                                                 const GLvoid *);
+  typedef void (GLAPIENTRY * PFNGLTEXSUBIMAGE2DPROC) (GLenum,
+                                                    GLint,
+                                                    GLint,
+                                                    GLint,
+                                                    GLsizei,
+                                                    GLsizei,
+                                                    GLenum,
+                                                    GLenum,
+                                                    const GLvoid *);
+
+  typedef GLuint (GLAPIENTRY * PFNGLCREATESHADERPROC) (GLenum);
+  typedef GLuint (GLAPIENTRY * PFNGLCREATEPROGRAMPROC) (void);
+  typedef void (GLAPIENTRY * PFNGLDELETEPROGRAMPROC) (GLuint);
+  typedef void (GLAPIENTRY * PFNGLUSEPROGRAMPROC) (GLuint);
+  typedef void (GLAPIENTRY * PFNGLSHADERSOURCEPROC) (GLuint,
+                                                   GLsizei,
+                                                   const GLchar **,
+                                                   const GLint *);
+  typedef void (GLAPIENTRY * PFNGLCOMPILESHADERPROC) (GLuint);
+  typedef void (GLAPIENTRY * PFNGLATTACHSHADERPROC) (GLuint, GLuint);
+  typedef void (GLAPIENTRY * PFNGLLINKPROGRAMPROC) (GLuint);
+  typedef void (GLAPIENTRY * PFNGLGETPROGRAMIVPROC) (GLuint, GLenum, GLint *);
+  typedef void (GLAPIENTRY * PFNGLGETSHADERIVPROC) (GLuint, GLenum, GLint *);
+
+  typedef void (GLAPIENTRY * PFNGLBINDATTRIBLOCATIONPROC) (GLuint,
+                                                         GLuint,
+                                                         const GLchar *);
+  typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBPOINTERPROC) (GLuint,
+                                                          GLint,
+                                                          GLenum,
+                                                          GLboolean,
+                                                          GLsizei,
+                                                          const GLvoid *);
+
+  typedef void (GLAPIENTRY * PFNGLUNIFORM1IPROC) (GLint, GLint);
+  typedef void (GLAPIENTRY * PFNGLUNIFORM1FPROC) (GLint, GLfloat);
+  typedef void (GLAPIENTRY * PFNGLUNIFORM4FPROC) (GLint,
+                                                GLfloat,
+                                                GLfloat,
+                                                GLfloat,
+                                                GLfloat);
+  typedef void (GLAPIENTRY * PFNGLUNIFORMMATRIX4FVPROC) (GLint,
+                                                       GLsizei,
+                                                       GLboolean,
+                                                       const GLfloat *);
+  typedef GLint (GLAPIENTRY * PFNGLGETUNIFORMLOCATIONPROC) (GLuint,
+                                                          const GLchar *);
+
+  typedef GLubyte* (GLAPIENTRY * PFNGLGETSTRINGPROC) (GLenum);
+
+#ifdef XP_WIN
+  typedef HGLRC (GLAPIENTRY * PFNWGLCREATECONTEXTPROC) (HDC);
+  typedef BOOL (GLAPIENTRY * PFNWGLDELETECONTEXTPROC) (HGLRC);
+  typedef BOOL (GLAPIENTRY * PFNWGLMAKECURRENTPROC) (HDC, HGLRC);
+  typedef PROC (GLAPIENTRY * PFNWGLGETPROCADDRESSPROC) (LPCSTR);
+#endif
+
+  PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate;
+  
+  PFNGLENABLEPROC Enable;
+  PFNGLENABLECLIENTSTATEPROC EnableClientState;
+  PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray;
+  PFNGLDISABLEPROC Disable;
+  PFNGLDISABLECLIENTSTATEPROC DisableClientState;
+  PFNGLDISABLEVERTEXATTRIBARRAYPROC DisableVertexAttribArray;
+
+  PFNGLDRAWARRAYSPROC DrawArrays;
+
+  PFNGLFINISHPROC Finish;
+  PFNGLCLEARPROC Clear;
+  PFNGLSCISSORPROC Scissor;
+  PFNGLVIEWPORTPROC Viewport;
+  PFNGLCLEARCOLORPROC ClearColor;
+  PFNGLREADBUFFERPROC ReadBuffer;
+  PFNGLREADPIXELSPROC ReadPixels;
+
+  PFNGLTEXENVFPROC TexEnvf;
+  PFNGLTEXPARAMETERIPROC TexParameteri;
+  PFNGLACTIVETEXTUREPROC ActiveTexture;
+  PFNGLPIXELSTOREIPROC PixelStorei;
+
+  PFNGLGENTEXTURESPROC GenTextures;
+  PFNGLGENBUFFERSPROC GenBuffers;
+  PFNGLGENFRAMEBUFFERSEXTPROC GenFramebuffersEXT;
+  PFNGLDELETETEXTURESPROC DeleteTextures;
+  PFNGLDELETEFRAMEBUFFERSEXTPROC DeleteFramebuffersEXT;
+  
+  PFNGLBINDTEXTUREPROC BindTexture;
+  PFNGLBINDBUFFERPROC BindBuffer;
+  PFNGLBINDFRAMEBUFFEREXTPROC BindFramebufferEXT;
+
+  PFNGLFRAMEBUFFERTEXTURE2DEXTPROC FramebufferTexture2DEXT; 
+
+  PFNGLBUFFERDATAPROC BufferData;
+
+  PFNGLVERTEXPOINTERPROC VertexPointer;
+  PFNGLTEXCOORDPOINTERPROC TexCoordPointer;
+
+  PFNGLTEXIMAGE2DPROC TexImage2D;
+  PFNGLTEXSUBIMAGE2DPROC TexSubImage2D;
+
+  PFNGLCREATESHADERPROC CreateShader;
+  PFNGLCREATEPROGRAMPROC CreateProgram;
+  PFNGLDELETEPROGRAMPROC DeleteProgram;
+  PFNGLUSEPROGRAMPROC UseProgram;
+  PFNGLSHADERSOURCEPROC ShaderSource;
+  PFNGLCOMPILESHADERPROC CompileShader;
+  PFNGLATTACHSHADERPROC AttachShader;
+  PFNGLLINKPROGRAMPROC LinkProgram;
+  PFNGLGETPROGRAMIVPROC GetProgramiv;
+  PFNGLGETSHADERIVPROC GetShaderiv;
+
+  PFNGLBINDATTRIBLOCATIONPROC BindAttribLocation;
+  PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer;
+
+  PFNGLUNIFORM1IPROC Uniform1i;
+  PFNGLUNIFORM1FPROC Uniform1f;
+  PFNGLUNIFORM4FPROC Uniform4f;
+  PFNGLUNIFORMMATRIX4FVPROC UniformMatrix4fv;
+  PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation;
+
+  PFNGLGETSTRINGPROC GetString;
+
+#ifdef XP_WIN
+  /**
+   * We intercept this call and do some stuff (like load the wglCreateContext
+   * and ensure our other function pointers are initialized.
+   */
+  HGLRC wCreateContext(HDC aDC);
+  PFNWGLCREATECONTEXTPROC wCreateContextInternal;
+  PFNWGLDELETECONTEXTPROC wDeleteContext;
+  PFNWGLMAKECURRENTPROC wMakeCurrent;
+  PFNWGLGETPROCADDRESSPROC wGetProcAddress;
+#endif
+
+private:
+  PRBool EnsureInitialized();
+
+  PRBool LoadSymbols(OGLFunction *functions);
+
+  PRBool mIsInitialized;
+  PRLibrary *mOGLLibrary;
+};
+
+extern glWrapper sglWrapper;
+
+#endif