浏览代码

explicit error for auto mipmaps (close #914)

Nicolas Cannasse 4 年之前
父节点
当前提交
bad5339992
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      h3d/impl/DirectXDriver.hx

+ 2 - 0
h3d/impl/DirectXDriver.hx

@@ -408,6 +408,8 @@ class DirectXDriver extends h3d.impl.Driver {
 		if( isArray )
 			desc.arraySize = t.layerCount;
 		if( t.flags.has(MipMapped) && !t.flags.has(ManualMipMapGen) ) {
+			if( t.format.match(S3TC(_)) )
+				throw "Cannot generate mipmaps for compressed texture "+t;
 			desc.bind |= RenderTarget;
 			desc.misc |= GenerateMips;
 		}