瀏覽代碼

some notes to self

Gargaj 11 年之前
父節點
當前提交
886a704c17
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      code/AssbinExporter.cpp

+ 2 - 2
code/AssbinExporter.cpp

@@ -337,7 +337,7 @@ namespace Assimp	{
 
 
 			if(!shortened) {
 			if(!shortened) {
 				if (!tex->mHeight) {
 				if (!tex->mHeight) {
-					chunk.Write(tex->pcData,1,tex->mWidth);
+					chunk.Write(tex->pcData,1,tex->mWidth); // BUG?! should be *4?
 				}
 				}
 				else {
 				else {
 					chunk.Write(tex->pcData,1,tex->mWidth*tex->mHeight*4);
 					chunk.Write(tex->pcData,1,tex->mWidth*tex->mHeight*4);
@@ -732,7 +732,7 @@ namespace Assimp	{
 
 
 				compress2( compressedBuffer, &compressedSize, (const Bytef*)uncompressedStream.GetBufferPointer(), uncompressedSize, 9 );
 				compress2( compressedBuffer, &compressedSize, (const Bytef*)uncompressedStream.GetBufferPointer(), uncompressedSize, 9 );
 
 
-				out->Write( &uncompressedSize, sizeof(uint32_t), 1 );
+				out->Write( &uncompressedSize, sizeof(uint32_t), 1 ); // BUG?! are we writing compressed or uncompressed size here?
 				out->Write( compressedBuffer, sizeof(char), compressedSize );
 				out->Write( compressedBuffer, sizeof(char), compressedSize );
 
 
 				delete[] compressedBuffer;
 				delete[] compressedBuffer;