Implement GL_OES_element_index_uint

TRAC #11951

Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch

Author:    Andrew Lewycky

git-svn-id: https://angleproject.googlecode.com/svn/trunk@240 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/geometry/IndexDataManager.h b/src/libGLESv2/geometry/IndexDataManager.h
index 087b5fe..0165640 100644
--- a/src/libGLESv2/geometry/IndexDataManager.h
+++ b/src/libGLESv2/geometry/IndexDataManager.h
@@ -31,8 +31,9 @@
     GLuint minIndex;
     GLuint maxIndex;
     GLuint count;
+    GLuint indexSize;
 
-    const Index *indices;
+    const void *indices;
 
     TranslatedIndexBuffer *buffer;
     GLsizei offset;
@@ -47,12 +48,17 @@
     TranslatedIndexData preRenderValidate(GLenum mode, GLenum type, GLsizei count, Buffer *arrayElementBuffer, const void *indices);
 
   private:
-    std::size_t spaceRequired(GLenum type, GLsizei count);
+    std::size_t IndexDataManager::indexSize(GLenum type) const;
+    std::size_t spaceRequired(GLenum type, GLsizei count) const;
+    TranslatedIndexBuffer *prepareIndexBuffer(GLenum type, std::size_t requiredSpace);
 
     Context *mContext;
     BufferBackEnd *mBackend;
 
-    TranslatedIndexBuffer *mStreamBuffer;
+    bool mIntIndicesSupported;
+
+    TranslatedIndexBuffer *mStreamBufferShort;
+    TranslatedIndexBuffer *mStreamBufferInt;
 };
 
 }