Prechádzať zdrojové kódy

explicit error for auto mipmaps (close #914)

Nicolas Cannasse 4 rokov pred
rodič
commit
bad5339992
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  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;
 		}