Sharing for buffer, texture and renderbuffer objects.

TRAC #12496

Derive Renderbuffer, Texture and Buffer from RefCountObject.
This class keeps a reference count for all objects that need cross-context
reference counting, and also the object id.
Restructure Renderbuffers to create a wrapper object and a storage object.
Use BindingPointer for all binding points instead of binding by object id.

Signed-off-by: Shannon Woods
Signed-off-by: Daniel Koch

git-svn-id: https://angleproject.googlecode.com/svn/trunk@364 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/geometry/VertexDataManager.cpp b/src/libGLESv2/geometry/VertexDataManager.cpp
index cc1ff5b..db6df30 100644
--- a/src/libGLESv2/geometry/VertexDataManager.cpp
+++ b/src/libGLESv2/geometry/VertexDataManager.cpp
@@ -128,9 +128,9 @@
             void *output = mStreamBuffer->map(spaceRequired(attribs[i], count), &translated[i].offset);
 
             const void *input;
-            if (attribs[i].mBoundBuffer)
+            if (attribs[i].mBoundBuffer.get())
             {
-                Buffer *buffer = mContext->getBuffer(attribs[i].mBoundBuffer);
+                Buffer *buffer = attribs[i].mBoundBuffer.get();
 
                 size_t offset = reinterpret_cast<size_t>(attribs[i].mPointer);