我要发帖 回复

正式会员

15

主题

96

积分

0

专家分

:

私信
发表时间 : 2010-4-20 14:58:21 | 浏览 : 974    评论 : 1
本帖最后由 jgy86324 于 2010-4-20 02:59 PM 编辑

部分代码贴出如下:
        // Initialize Searchpath for images
        tmpSPath = vuImageFactory::getDefaultSearchPath();
        tmpSPath->set("$(MPI_INSTALL_RESOURCE_DEFAULT)\\resources\\data\\textures");
   
        const char* searchpath = vuImageFactory::getDefaultSearchPath()->get();
        // Initialize Searchpath for textures
        tmpSPath = vrTextureFactory::getDefaultSearchPath();
        tmpSPath->set( searchpath );

        // Read the uncompressed texture.
        vrTextureFactory* tFact = new vrTextureFactory();

       m_texUncompressed = tFact->read("mpi_logo.rgba");
        
        if (!m_texUncompressed)
        {
            vuNotify::print(vuNotify::LEVEL_FATAL,NULL,
                "Could not find file %s\n", "mpi_logo.rgba");
            m_box->unref();
            tFact->unref();
            
            exit(1);
        }
        m_texUncompressed->ref();

        // Read the compressed dds texture.
        
        m_texCompressed = tFact->read("mpi_logo.dds");

第一次加色处:tmpSPath->set("$(MPI_INSTALL_RESOURCE_DEFAULT)\\resources\\data\\textures");
这个是关于纹理的找寻途径,是我放文件mpi_logo.rgba和mpi_logo.dds的地方吗?

第二和第三次加色处:m_texUncompressed = tFact->read("mpi_logo.rgba");m_texCompressed = tFact->read("mpi_logo.dds");后缀为rgba和dds这两个文件分别是什么?这两个文件用什么做出来的?我加纹理支持哪些格式,比如说jpg,bup这些支持吗?

小弟现在在做一个天空盒练手,关于天空盒的纹理我怎么去得到然后直接贴到盒子上去,如果有这个纹理的话也希望传出来分享下,谢谢。。。。。还有就是天空盒贴纹理需要贴在盒子的内部,这个需要怎么去实现?

最近VR访客

jgy86324 评论于2010-4-20 22:49:29
没人解答啊,大侠些不吝赐教嘛。。。。。。

手机版|VR开发网 统计 津ICP备18009691号
网安备12019202000257

GMT+8, 2023-3-25 12:46 PM

返回顶部