首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在iPhone上导出sio2文件?

如何在iPhone上导出sio2文件?
EN

Stack Overflow用户
提问于 2009-06-25 18:49:34
回答 1查看 309关注 0票数 0

当我在模拟器上导出3d游戏的sio2文件时,它正在加载,但随后出现黑屏。

甚至我得到“当前帧不匹配此帧”这个错误。

有人能帮我解决他的问题吗?

为了在获取物质对象时更具技术性,就这样发生了

EN

回答 1

Stack Overflow用户

发布于 2009-09-18 07:11:38

您必须用templateRender编写代码,如下所示

代码语言:javascript
复制
void templateRender( void )
{
    glMatrixMode( GL_MODELVIEW );
    glLoadIdentity();

    glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT );
    SIO2camera *_SIO2camera = ( SIO2camera * )sio2ResourceGet(
            sio2->_SIO2resource, SIO2_CAMERA, "camera/Camera" );

    if( _SIO2camera )
    {
        // Adjust the perspective, please take not
        // that this operation should only be done
        // once everytime you are switching cameras.
        sio2Perspective( _SIO2camera->fov,
                        sio2->_SIO2window->scl->x / sio2->_SIO2window->scl->y,
                        _SIO2camera->cstart,
                        _SIO2camera->cend );

        // Enter the 3D landscape mode
        sio2WindowEnterLandscape3D();
        {
            sio2CameraRender( _SIO2camera );
            sio2ResourceRender( sio2->_SIO2resource,
                               sio2->_SIO2window,
                               _SIO2camera,
                               SIO2_RENDER_SOLID_OBJECT );
        }

        sio2WindowLeaveLandscape3D();
    }
}

然后在templateLoading

代码语言:javascript
复制
void templateLoading( void )
{
    unsigned int i = 0;
    sio2ResourceCreateDictionary( sio2->_SIO2resource );


    sio2ResourceOpen( sio2->_SIO2resource,
                      "Tutorial1.sio2", 1 );

    while( i != sio2->_SIO2resource->gi.number_entry )
    {
        sio2ResourceExtract( sio2->_SIO2resource, NULL );
        ++i;
    }

    sio2ResourceClose( sio2->_SIO2resource );
    sio2ResourceBindAllMatrix( sio2->_SIO2resource );
    sio2ResourceGenId( sio2->_SIO2resource );
    sio2ResetState();
    sio2->_SIO2window->_SIO2windowrender = templateRender;
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/1045582

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档