コード例 #1
0
 internal RenderTarget2D CreateRenderTarget(int width, int height, CCSurfaceFormat colorFormat, CCDepthFormat depthFormat,
                                            CCRenderTargetUsage usage)
 {
     if (!allowNonPower2Textures)
     {
         width  = CCUtils.CCNextPOT(width);
         height = CCUtils.CCNextPOT(height);
     }
     return(new RenderTarget2D(graphicsDevice, width, height, false, (SurfaceFormat)colorFormat, (DepthFormat)depthFormat, 0, (RenderTargetUsage)usage));
 }
コード例 #2
0
        internal Texture2D CreateTexture2D(int width, int height)
        {
            PresentationParameters pp = graphicsDevice.PresentationParameters;

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