I know OgreSWF's development is dead for a while and the new version will only be restarted in march 2008. Even though, i still need to have it to work how it is right now.
I'd like to know if people have been able to have this library to work with Eihort (1.4.5 in my case)?
I have been wondering if some people in Ogre3D's community could help me to have this library to work.
I will post here some of my progress in my own application :
Jules Robichaud Gagnon wrote: _setBounds
Instead of doing like suggested in ogreaddons\ogreswf\ogreSwf\INSTALL.TXT :In SwfPanel i added this method...Code: Select all
//------------------ //OgreManualObject.h //------------------ public: ... void _setBounds(const AxisAlignedBox& bounds, bool pad = true); ... //-------------------- //OgreManualObject.cpp //-------------------- namespace Ogre { ... void ManualObject::_setBounds(const AxisAlignedBox& bounds, bool pad) { mAABB = bounds; Vector3 max = mAABB.getMaximum(); Vector3 min = mAABB.getMinimum(); if (pad) { // Pad out the AABB a little, helps with most bounds tests Vector3 scaler = (max - min) * MeshManager::getSingleton().getBoundsPaddingFactor(); mAABB.setExtents(min - scaler, max + scaler); } else { mAABB.setExtents(min, max); } } ... };
SwfPanel.hSwfPanel.cppCode: Select all
void _setBounds(Ogre::ManualObject * obj, const AxisAlignedBox& bounds, bool pad = true);
My "Reversed Move Method" is completely against of the good programming practises taught by Martin Fowler in Refactoring: Improving the Design of Existing Code but it avoids to recompile Ogre ... sorry for my laziness.Code: Select all
void SwfPanel::_setBounds(ManualObject * obj, const AxisAlignedBox& bounds, bool pad) { AxisAlignedBox AABB = bounds; Vector3 max = AABB.getMaximum(); Vector3 min = AABB.getMinimum(); if (pad) { // Pad out the AABB a little, helps with most bounds tests Vector3 scaler = (max - min) * MeshManager::getSingleton().getBoundsPaddingFactor(); AABB.setExtents(min - scaler, max + scaler); } else { AABB.setExtents(min, max); } obj->setBoundingBox( AABB ); }
For the moment it looks like this when i integrate the clock Hud in the game. The clock's hands refuse to show and update ... :Jules Robichaud Gagnon wrote:
Shader problem
GpuProgramParametersSharedPtr::setAutoAddParamName(bool) is used in OgreSwf but it had been removed completely from eihort. To fix this, i removed all references to this line and i did the following changes ( I believe i did the right move, i hope someone can confirm it was right ) :
In directX_ps_color.hlsl i changed this :to:Code: Select all
float4 color; float4 ps_main() : COLOR0 { return color; }
Then in Templates.program i changed the two PS in :Code: Select all
float4 ps_main( uniform float4 color : COLOR) : COLOR0 { return color; }
I changed the target to ps_2_0 since it is not supported anymore by Microsoft's HLSL compiler...Code: Select all
fragment_program directX_ps_color hlsl { source directX_ps_color.hlsl entry_point ps_main target ps_2_0 default_params { param_named color float4 1 1 1 1 } } fragment_program directX_ps_image hlsl { source directX_ps_image.hlsl entry_point ps_main target ps_2_0 }

I tried only the SwfHUD so far.
Problems :
- When i try with other animations it crashes in a SwfHud
- When creating and destroying a Hud , it will crash if we create the Hud again. It seems like the textures are not reinitialized properly again. Seems to be deep in GameSwf.
- The clock will not show the hands.
I hope some other people can try with me to have this to work.

TODO:
-Create an ogre example application from the CVS version of OgreSWF with Eihort (since i separated, recompiled and integrated them to my application as dependencies)