public static RenderTarget2D CreateRenderTarget(int width, int height, SurfaceFormat colorFormat, DepthFormat depthFormat,
                                                 RenderTargetUsage usage)
 {
     if (!m_AllowNonPower2Textures)
     {
         width  = CCUtils.CCNextPOT(width);
         height = CCUtils.CCNextPOT(height);
     }
     return(new RenderTarget2D(graphicsDevice, width, height, false, colorFormat, depthFormat, 0, usage));
 }
        public static Texture2D CreateTexture2D(int width, int height)
        {
            PresentationParameters pp = graphicsDevice.PresentationParameters;

            if (!m_AllowNonPower2Textures)
            {
                width  = CCUtils.CCNextPOT(width);
                height = CCUtils.CCNextPOT(height);
            }
            return(new Texture2D(graphicsDevice, width, height, false, SurfaceFormat.Color));
        }