shown in other instead.
Unigine Integration into SDL Application
This article describes the sample located in the <UnigineSDK>/source/samples/App/GLAppSDL/ folder.
The sample demonstrates how to embed Unigine into an SDL-based application, namely:
- Create a simple SDL-based application
- Integrate Unigine into the application
- Initialize the OpenGL mode
In this sample, the engine controls the main loop by itself: the doUpdate(), doRender() and doSwap() functions are overridden and call the update(), render() and swap() functions respectively.
To run the sample, you should perform the following:
- Download development libraries from the SDL website.
Only SDL version 1.2 is supported.
- Extract the downloaded compressed folder and place it into the sample folder.
- Change the path to the SDL.h header file in the GLAppSDL.cpp if necessary. For example:
#include "SDL/include/SDL.h"By default, the SDL/SDL.h path is used.
- Prepare the development environment (according to the operating system used).
- Specify paths to the SDL/include/ and SDL/lib/x86 (or SDL/lib/x64) folders in your IDE.
- Rebuild the sample (see how to rebuild a sample application in Windows or Linux)
- Run the main.py script from the sample folder.