Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 1 of 1

Thread: I have some problem ,I need some help,thanks!

Threaded View

  1. #1
    Newbie Newbie
    Join Date
    Oct 2012

    Question I have some problem ,I need some help,thanks!

    Recently,I have some problem in my program, I want to integrate OGRE & ScaleForm ,but I meet a problem ,as follow:
    this is the OGRE running screenshot


    this is the OGRE & ScaleForm running screenshot.

    and between above two the additive code is :

    Code cpp:
    /**/// 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);
        // 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;
        //Ptr<FSCommandHandler> pcommandHandler = *new FxPlayerFSCommandHandler;
        Ptr<FontProviderWin32> fontProvider = *new FontProviderWin32(::GetDC(0));
        Ptr<ASSupport> pAS2Support = *new GFx::AS2Support();
        Ptr<ASSupport> pASSupport = *new GFx::AS3Support();
        // 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);
        // 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();
        // 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.
         MovieLastTime = timeGetTime();

    Last edited by Dark Photon; 11-18-2012 at 10:38 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts