This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
Полезные советы
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Программирование
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Application with Direct3D11 via SlimDX Library

This article describes the sample located in the <UnigineSDK>/source/csharp/samples/App/D3D11SlimAppForm/ folder. This sample demonstrates how to:

  • Create a Windows Forms application and embed Unigine into it.
  • Initialize Direct3D11 by using SlimDX library.
Notice
The sample can be run on Windows only.

Running Sample#

To run the sample, you should do the following:

  1. Prepare the development environment:
    Notice
    Microsoft .NET Framework 4 or higher is required.
    Notice
    SlimDX library will be installed automatically when you install UNIGINE SDK.
  2. Open the Visual C# main_x64.csproj project file located in the <UnigineSDK>/source/csharp/samples/App/D3D11SlimAppForm/ folder.
  3. Click the button on the toolbar (or DEBUG -> Start Debugging) to start the project.

    Windows Form Application will open.

Description of C# classes#

This sample contains 4 classes:

  • AppForm - inherits the Unigine.App class. In this class thedoUpdate(), doRender() anddoSwap() functions are overridden and call the update(), render() andswap() functions respectively.
  • AppFormControl - inherits the System.Windows.Forms.Form class. This class implements all the necessary events, which will be performed when user interacts with the application.
  • D3D11SlimAppForm - inherits the AppForm class and initializes the graphics Direct3D11 API in the Windows Forms Application via the SlimDX library.
  • UnigineApp - defines the entry point of the program. C# Wrapper and Engine are initialized here.
Notice
AppForm, AppFormControl, D3D11SlimAppForm are defined in the Unigine namespace.

See Also#

Last update: 31.07.2020
Build: ()