fixed uninitialized warning by defaulting the switch values
authordavilla <davilla@4pi.com>
Sat, 8 Oct 2011 12:50:07 +0000 (08:50 -0400)
committerdavilla <davilla@4pi.com>
Sat, 8 Oct 2011 13:22:46 +0000 (09:22 -0400)
xbmc/guilib/TextureGL.cpp

index 99dd586..7701712 100644 (file)
@@ -90,8 +90,8 @@ void CGLTexture::LoadToGPU()
     m_textureWidth = maxSize;
   }
 
-  GLenum format;
-  GLint numcomponents;
+  GLenum format = GL_BGRA;
+  GLint numcomponents = GL_RGBA;
 
   switch (m_format)
   {
@@ -111,8 +111,6 @@ void CGLTexture::LoadToGPU()
     break;
   case XB_FMT_A8R8G8B8:
   default:
-    format = GL_BGRA;
-    numcomponents = GL_RGBA;
     break;
   }