Fix FBO/Texture/renderbuffer class hierarchy issues
TRAC #14744
Issue=51/52
Delegated format queries to RenderbufferStorage.
Eliminated TextureColorbufferProxy by merging it into Colorbuffer.
Abstracted texture colorbuffer queries.
Moved some conversion functions to the right namespace.
Fixed line-endings in Texture.cpp
Signed-off-by: Daniel Koch

Author:    Nicolas Capens <nicolas@transgaming.com>

git-svn-id: https://angleproject.googlecode.com/svn/trunk@553 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Framebuffer.cpp b/src/libGLESv2/Framebuffer.cpp
index 5fe01e0..dd34725 100644
--- a/src/libGLESv2/Framebuffer.cpp
+++ b/src/libGLESv2/Framebuffer.cpp
@@ -46,7 +46,7 @@
     }
     else if (IsTextureTarget(type))
     {
-        buffer = context->getTexture(handle)->getColorbuffer(type);
+        buffer = context->getTexture(handle)->getRenderbuffer(type);
     }
     else
     {
@@ -307,14 +307,14 @@
 
         if (mColorbufferType == GL_RENDERBUFFER)
         {
-            if (!gl::IsColorRenderable(colorbuffer->getFormat()))
+            if (!gl::IsColorRenderable(colorbuffer->getInternalFormat()))
             {
                 return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
             }
         }
         else if (IsTextureTarget(mColorbufferType))
         {
-            if (IsCompressed(colorbuffer->getFormat()))
+            if (IsCompressed(colorbuffer->getInternalFormat()))
             {
                 return GL_FRAMEBUFFER_UNSUPPORTED;
             }
@@ -325,7 +325,7 @@
                 return GL_FRAMEBUFFER_UNSUPPORTED;
             }
 
-            if (colorbuffer->getFormat() == GL_LUMINANCE || colorbuffer->getFormat() == GL_LUMINANCE_ALPHA)
+            if (colorbuffer->getInternalFormat() == GL_LUMINANCE || colorbuffer->getInternalFormat() == GL_LUMINANCE_ALPHA)
             {
                 return GL_FRAMEBUFFER_UNSUPPORTED;
             }
@@ -424,8 +424,8 @@
 
     if (mDepthbufferType == GL_RENDERBUFFER && mStencilbufferType == GL_RENDERBUFFER)
     {
-        if (depthbuffer->getFormat() != GL_DEPTH24_STENCIL8_OES ||
-            stencilbuffer->getFormat() != GL_DEPTH24_STENCIL8_OES ||
+        if (depthbuffer->getInternalFormat() != GL_DEPTH24_STENCIL8_OES ||
+            stencilbuffer->getInternalFormat() != GL_DEPTH24_STENCIL8_OES ||
             depthbuffer->getSerial() != stencilbuffer->getSerial())
         {
             return GL_FRAMEBUFFER_UNSUPPORTED;