Enclose error(GLint) and error(EGLint) into gl and egl namespaces.

This should generate a compile time error if we try to call the wrong function.

TRAC #22411

Signed-off-by: Geoff Lang
Signed-off-by: Shannon Woods
Author: Jamie Madill

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1856 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/renderer/TextureStorage11.cpp b/src/libGLESv2/renderer/TextureStorage11.cpp
index bebd588..b75d94e 100644
--- a/src/libGLESv2/renderer/TextureStorage11.cpp
+++ b/src/libGLESv2/renderer/TextureStorage11.cpp
@@ -239,7 +239,7 @@
         {
             ASSERT(result == E_OUTOFMEMORY);
             ERR("Creating image failed.");
-            error(GL_OUT_OF_MEMORY);
+            gl::error(GL_OUT_OF_MEMORY);
         }
         else
         {
@@ -298,7 +298,7 @@
 
             if (result == E_OUTOFMEMORY)
             {
-                return error(GL_OUT_OF_MEMORY, static_cast<RenderTarget*>(NULL));
+                return gl::error(GL_OUT_OF_MEMORY, static_cast<RenderTarget*>(NULL));
             }
             ASSERT(SUCCEEDED(result));
 
@@ -314,7 +314,7 @@
             if (result == E_OUTOFMEMORY)
             {
                 rtv->Release();
-                return error(GL_OUT_OF_MEMORY, static_cast<RenderTarget*>(NULL));
+                return gl::error(GL_OUT_OF_MEMORY, static_cast<RenderTarget*>(NULL));
             }
             ASSERT(SUCCEEDED(result));
 
@@ -352,7 +352,7 @@
 
         if (result == E_OUTOFMEMORY)
         {
-            return error(GL_OUT_OF_MEMORY, static_cast<ID3D11ShaderResourceView*>(NULL));
+            return gl::error(GL_OUT_OF_MEMORY, static_cast<ID3D11ShaderResourceView*>(NULL));
         }
         ASSERT(SUCCEEDED(result));
     }
@@ -414,7 +414,7 @@
         {
             ASSERT(result == E_OUTOFMEMORY);
             ERR("Creating image failed.");
-            error(GL_OUT_OF_MEMORY);
+            gl::error(GL_OUT_OF_MEMORY);
         }
         else
         {
@@ -481,7 +481,7 @@
 
                 if (result == E_OUTOFMEMORY)
                 {
-                    return error(GL_OUT_OF_MEMORY, static_cast<RenderTarget*>(NULL));
+                    return gl::error(GL_OUT_OF_MEMORY, static_cast<RenderTarget*>(NULL));
                 }
                 ASSERT(SUCCEEDED(result));
 
@@ -499,7 +499,7 @@
                 if (result == E_OUTOFMEMORY)
                 {
                     rtv->Release();
-                    return error(GL_OUT_OF_MEMORY, static_cast<RenderTarget*>(NULL));
+                    return gl::error(GL_OUT_OF_MEMORY, static_cast<RenderTarget*>(NULL));
                 }
                 ASSERT(SUCCEEDED(result));
 
@@ -544,7 +544,7 @@
 
         if (result == E_OUTOFMEMORY)
         {
-            return error(GL_OUT_OF_MEMORY, static_cast<ID3D11ShaderResourceView*>(NULL));
+            return gl::error(GL_OUT_OF_MEMORY, static_cast<ID3D11ShaderResourceView*>(NULL));
         }
         ASSERT(SUCCEEDED(result));
     }