Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
CompressedTexture2DReader.cs
浏览该文件的文档.
1#if !DIRECT3D11
3
4namespace Game.IContentReader {
6 public override string Type => "Engine.Graphics.CompressedTexture2D";
7 public override string[] DefaultSuffix => ["astc", "astcsrgb"];
8
9 public override object Get(ContentInfo[] contents) {
10 ContentInfo contentInfo = contents[0];
11 string suffix = contentInfo.ContentSuffix.ToLower();
12 return suffix switch {
13 ".astcsrgb" => CompressedTexture2D.Load(contentInfo.Duplicate(), false),
14 _ => CompressedTexture2D.Load(contentInfo.Duplicate())
15 };
16 }
17 }
18}
19#endif
static new CompressedTexture2D Load(Stream stream, bool linear=true, int mipLevelsCount=1)