PDA

View Full Version : I have some problem ,I need some help,thanks!



fux_jing
10-31-2012, 04:16 AM
Hello!
Recently,I have some problem in my program, I want to integrate OGRE & ScaleForm ,but I meet a problem ,as follow:
http://b109.photo.store.qq.com/psb?/80230873-f26c-42bc-bf1f-0a8e13540d79/AElQI58lT.5hIh5vyvqAgnnT69yge*Vsqz3vWo3SYxU!/b/dIO2*0AoHAAA&bo=ngLRAQAAAAABAGs!
this is the OGRE running screenshot

http://b110.photo.store.qq.com/psb?/80230873-f26c-42bc-bf1f-0a8e13540d79/GBJQPIWMpk4fSBY35ZgPVN1fujzpqZM*meRAcPpk0QE!/b/dBeAoUH6FgAA&bo=ngLRAQAAAAABAGs!

this is the OGRE & ScaleForm running screenshot.


and between above two the additive code is :


/**/// Create and Configure Loader.
Loader loader;


loader.SetLog(Ptr<GFx::Log>(*new GFxPlayerLog()));

Ptr<ActionControl> pactControl = *new ActionControl(ActionControl::Action_ErrorSuppress) ;
// Ptr<ActionControl> pactControl = *new ActionControl(ActionControl::Action_Verbose);
pactControl->SetVerboseAction(VerboseAction);
loader.SetActionControl(pactControl);

// Developers set states on the loader to modify loading and playback behavior.
// If you need to load files from a custom package, for example, you can
// create a FileOpener derived class that loads files in a custom way.
// Here FileOpener and FSCommandHandler are set for sample purposes.
Ptr<FileOpener> pfileOpener = *new FileOpener;
loader.SetFileOpener(pfileOpener);
//Ptr<FSCommandHandler> pcommandHandler = *new FxPlayerFSCommandHandler;
//loader.SetFSCommandHandler(pcommandHandler);

Ptr<FontProviderWin32> fontProvider = *new FontProviderWin32(::GetDC(0));
loader.SetFontProvider(fontProvider);

Ptr<ASSupport> pAS2Support = *new GFx::AS2Support();
loader.SetAS2Support(pAS2Support);

Ptr<ASSupport> pASSupport = *new GFx::AS3Support();
loader.SetAS3Support(pASSupport);

// Create renderer.
pRenderHAL = *new Render::GL::HAL;
if (!(pRenderer = *new Render::Renderer2D(pRenderHAL.GetPtr())))
return 1;

// Configure renderer in "Dependent mode", honoring externally
// configured device settings.
if (!pRenderHAL->SetDependentVideoMode())
return 1;

// Set renderer on loader so that it is also applied to all children.
//pRenderConfig = *new RenderConfig(pRenderer, RenderConfig::RF_EdgeAA | RenderConfig::RF_StrokeNormal);
//loader.SetRenderConfig(pRenderConfig);

// Load the movie file and create its instance.
if (!(pMovieDef = *loader.CreateMovie(FileName)))
{
Scaleform::String errorString = "Unable to load file: ";
errorString += FileName;
MessageBox(NULL, errorString.ToCStr(), "Error", MB_OK | MB_ICONEXCLAMATION);
return 1;
}

if (!(pMovie = *pMovieDef->CreateInstance()))
return 1;

hMovieDisplay = pMovie->GetDisplayHandle();

pMovie->SetMouseCursorCount(1);


// Set playback view to span the entire window.
pMovie->SetViewport(Width, Height, 0,0, Width, Height);

// If you wanted to use the movie as a transparent HUD overlay, you would
// set Background Alpha to 0. We don't need to do this for player sample.
pMovie->SetBackgroundAlpha(0.0f);


MovieLastTime = timeGetTime();


thanks!!