tags:

views:

187

answers:

1

When i export sio2 file of 3d game on simulator it is loading but then black screen appears.

Even i getting "current frame does not matches this frame" this error.

Can anybody help me out with his problem.

To be more technical while getting material objects its happening so

A: 

You have to write the code in templateRender as follows

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();
    }
}

Then in templateLoading:

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;
}
Jyotsna