|

楼主 |
发表于 2008-11-12 13:42:00
|
显示全部楼层
Re: 谁还有h12_tree.zip吗,万分感谢!
没有资源,只好用Lost Coast的了。可是读vtf文件出错,文件头格式与代码不匹配,研究一晚终于通过,在vtf下的vtf.cpp中把VTFFileHeader_t改成如下:
- struct VTFFileHeader_t
- {
- char fileTypeString[4]; // "VTF" Valve texture file
- int version[2]; // version[0].version[1]
- int headerSize;
- unsigned short width;
- unsigned short height;
- unsigned int flags;
- unsigned short numFrames;
- unsigned short startFrame;
- int tmp;
- VectorAligned reflectivity; // This is a linear value, right? Average of all frames?
- int tmp2;
- float bumpScale;
- ImageFormat imageFormat;
- unsigned char numMipLevels;
- ImageFormat lowResImageFormat;
- unsigned char lowResImageWidth;
- unsigned char lowResImageHeight;
- char tmp3;
- int tmp4;
- int tmp5;
- };
复制代码
可以读出vtf了,不过DXT5格式的纹理仍不正常。 |
|