This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

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
Notice
The sample can be run on Windows only.
Notice
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:

  1. Prepare the development environment.
  2. Run the main.py script from the current folder.

See Also

Last update: 2017-07-03
Build: ()