Ipo is not work,why?
2 posters
Ipo is not work,why?
I use Ipo in my demo,Upgrade to 1.4 from 1.35.
In the 1.35 version, Ipo can work properly,
but the 1.4 version, Ipo can not work, but can not see the object.
The following is the code to initialize Ipo:
Loading()
Run, suggesting that errors : In sio2IpoPlay( _SIO2camera->_SIO2ipo )function;the _SIO2camera->_SIO2ipo=NULL. Why? In 1.35 version,it work perfect. thank you!
In the 1.35 version, Ipo can work properly,
but the 1.4 version, Ipo can not work, but can not see the object.
The following is the code to initialize Ipo:
Loading()
- Code:
sio2ResourceCreateDictionary( sio2->_SIO2resource );
sio2ResourceOpen( sio2->_SIO2resource,
scenename, 1 );
while( i != sio2->_SIO2resource->gi.number_entry )
{
sio2ResourceExtract( sio2->_SIO2resource, NULL );
++i;
}
sio2ResourceClose( sio2->_SIO2resource );
sio2ResetState();
sio2ResourceBindAllImages( sio2->_SIO2resource );
sio2ResourceBindAllMaterials( sio2->_SIO2resource );
sio2ResourceBindAllMatrix( sio2->_SIO2resource );
sio2ResourceBindAllIpos( sio2->_SIO2resource ); //this initialize IPO
sio2ResourceGenId( sio2->_SIO2resource );
- Code:
if( !sio2->_SIO2camera )
{
SIO2camera *_SIO2camera = ( SIO2camera * )sio2ResourceGet( sio2->_SIO2resource,
SIO2_CAMERA,
"camera/Camera" );
if( !_SIO2camera )
{ return; }
sio2->_SIO2camera = _SIO2camera;
sio2IpoPlay( _SIO2camera->_SIO2ipo );
sio2Perspective( _SIO2camera->fov,
sio2->_SIO2window->scl->x / sio2->_SIO2window->scl->y,
_SIO2camera->cstart,
_SIO2camera->cend );
}
sio2ResourceRender( sio2->_SIO2resource,
sio2->_SIO2window,
sio2->_SIO2camera,
SIO2_RENDER_SOLID_OBJECT
|SIO2_RENDER_ALPHA_TESTED_OBJECT
|SIO2_RENDER_IPO );
Run, suggesting that errors : In sio2IpoPlay( _SIO2camera->_SIO2ipo )function;the _SIO2camera->_SIO2ipo=NULL. Why? In 1.35 version,it work perfect. thank you!
LuisLee- Posts : 85
Join date : 2009-04-26
Age : 37
Re: Ipo is not work,why?
Check tutorial14... there I demo how to work with IPO... (its on the camera)
Re: Ipo is not work,why?
sio2interactive wrote:Check tutorial14... there I demo how to work with IPO... (its on the camera)
I am sure that Initialization and rendering IPO code is the same as with tutorial14 ,but It was not work,May be set up problems.
LuisLee- Posts : 85
Join date : 2009-04-26
Age : 37
Re: Ipo is not work,why?
I will try to find some method of error. (v1.4)
1. Open 14 projects,SIO2 with my own to replace the original paper document SIO2. It is not work!
>> can you please be more clear... I don't understand what that means...
2. SIO2 into the original document of the Camera to my SIO2 file. It is not work!
(v1.3.5)
>> same here...
SIo2 with my file is successfully.
>> hummmmmmmm
Why? Whether or not to set up cameras in Blender?
1. Open 14 projects,SIO2 with my own to replace the original paper document SIO2. It is not work!
>> can you please be more clear... I don't understand what that means...
2. SIO2 into the original document of the Camera to my SIO2 file. It is not work!
(v1.3.5)
>> same here...
SIo2 with my file is successfully.
>> hummmmmmmm
Why? Whether or not to set up cameras in Blender?
LuisLee- Posts : 85
Join date : 2009-04-26
Age : 37
Re: Ipo is not work,why?
sorry!I have very poor Englis.I use my own fileSIO2 to replace the fileSIO2 in tutorial14, but it doesn't work.
I import the fileCAMERA in tutorial14 to my own fileSIO2, but it sill doesn't work.
what shall i do?
tutorial14 to rewrite the following code:
I import the fileCAMERA in tutorial14 to my own fileSIO2, but it sill doesn't work.
what shall i do?
tutorial14 to rewrite the following code:
- Code:
void templateLoading( void )
{
unsigned int i = 0;
sio2ResourceCreateDictionary( sio2->_SIO2resource );
sio2ResourceOpen( sio2->_SIO2resource,
"tutorial14.sio2", 1 );
while( i != sio2->_SIO2resource->gi.number_entry )
{
sio2ResourceExtract( sio2->_SIO2resource, NULL );
++i;
}
sio2ResourceClose( sio2->_SIO2resource );
sio2ResetState();
sio2ResourceBindAllImages( sio2->_SIO2resource );
sio2ResourceBindAllMaterials( sio2->_SIO2resource );
sio2ResourceBindAllMatrix( sio2->_SIO2resource );
sio2ResourceBindAllIpos( sio2->_SIO2resource );
sio2ResourceGenId( sio2->_SIO2resource );
sio2->_SIO2window->_SIO2windowrender = templateRender;
glActiveTexture( GL_TEXTURE1 );
{
glTexEnvf( GL_TEXTURE_ENV, GL_RGB_SCALE, 2.0f );
}
glActiveTexture( GL_TEXTURE0 );
printf("VRAM: %d bytes.\n", sio2ResourceGetVRAMSize( sio2->_SIO2resource ) );
}
void templateRender( void )
{
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT );
if( !sio2->_SIO2camera )
{
SIO2camera *_SIO2camera = ( SIO2camera * )sio2ResourceGet( sio2->_SIO2resource,
SIO2_CAMERA,
"camera/Camera" );
if( !_SIO2camera )
{ return; }
sio2->_SIO2camera = _SIO2camera;
sio2IpoPlay( _SIO2camera->_SIO2ipo );
sio2Perspective( _SIO2camera->fov,
sio2->_SIO2window->scl->x / sio2->_SIO2window->scl->y,
_SIO2camera->cstart,
_SIO2camera->cend );
}
sio2WindowEnterLandscape3D();
{
sio2CameraRender( sio2->_SIO2camera );
sio2ResourceRender( sio2->_SIO2resource,
sio2->_SIO2window,
sio2->_SIO2camera,
SIO2_RENDER_SOLID_OBJECT |
SIO2_RENDER_TRANSPARENT_OBJECT |
SIO2_RENDER_ALPHA_TESTED_OBJECT |
SIO2_RENDER_IPO );
sio2ObjectReset();
sio2MaterialReset();
}
sio2WindowLeaveLandscape3D();
}
LuisLee- Posts : 85
Join date : 2009-04-26
Age : 37
Re: Ipo is not work,why?
I found the error:I did not update the export script!
LuisLee- Posts : 85
Join date : 2009-04-26
Age : 37
Similar topics
» Multi-Touch Handling
» Load a texture directly from a .sio2 file
» Creating an object in run time
» How does Billboarding work?
» TEXTURE TILING -- Why Doesn't It Work?
» Load a texture directly from a .sio2 file
» Creating an object in run time
» How does Billboarding work?
» TEXTURE TILING -- Why Doesn't It Work?
Permissions in this forum:
You cannot reply to topics in this forum