示例#1
0
 public static void TextureCube(TextureCube texCube, Format format, int x, int y, int mips, GraphicsContext graphicsContext)
 {
     if (texCube.width != x || texCube.height != y || texCube.mipLevels != mips || texCube.GetFormat() != format)
     {
         if (format == Format.D16_UNorm || format == Format.D24_UNorm_S8_UInt || format == Format.D32_Float)
         {
             texCube.ReloadAsDSV(x, y, mips, format);
         }
         else
         {
             texCube.ReloadAsRTVUAV(x, y, mips, format);
         }
         graphicsContext.UpdateRenderTexture(texCube);
     }
 }