Unigine Integration into MFC Application
This article describes the sample located in the <UnigineSDK>/source/samples/App/D3D9AppMFC/ folder.
The sample demonstrates how to embed Unigine into MFC-based application, namely:
- Create a simple MFC-based desktop application for Windows
- Integrate Unigine into the application
- Initialize the DirectX 9 mode
The sample can be run on Windows only.
MFC Windows libraries are located in the <UnigineSDK>/source/samples/App/D3D9AppMFC/lib/ folder.
In this sample, the MFC application controls the main loop: it calls the D3D9AppMFC::OnIdle() function defined in the D3D9AppMFC.cpp when the message queue of the application is empty. The D3D9AppMFC::OnIdle() function in turn calls the engine update(), render() and swap() functions.
Unigine integrated into the MFC application window
Running Sample
To run the sample, you should perform the following:
- Prepare the development environment.
- Run the main.py script from the current folder.
See Also
- Article on App Class to learn how to create an application based on the Unigine::App class.
Last update: 03.07.2017
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter