Use SDL inside Irrlicht

I know you can do the same in lrrlicht, but I want to use the SDL code / functions to draw text, images inside Irrlicht (for 2d processing) and use Irrlicht to work with hardcore 3D, how can you apply text or images from sdl to this irrlicht engine, can you show me simple code so i can understand?

In the SDL, you can do the following:

// I start by declare the SDL video Name SDL_Surface *screen; // set the video mode: screen = SDL_SetVideoMode(640, 480, 32, SDL_DOUBLEBUF | SDL_FULLSCREEN); if (screen == NULL) { printf("Unable to set video mode: %s\n", SDL_GetError()); return 1; } // I can now display data, image, text on the screen by using the declared SDL video Name " screen " SDL_BlitSurface(my_image, &src, screen, &dest); 
+4
source share
1 answer

If you use / target Windows and are a little familiar with WinApi, you can use SDL with Irrlicht , working as inside a Win32 window , using a combination of SDL Window ID Hack (also see this thread ) and running Irrlicht in a Win32 window . The only problems you may encounter is that running SDL in a Win32 window is extremely complex and unpredictable.

You can also achieve a similar result using GTK + (for cross-platform purposes), but I personally have never managed to run SDL or Irrlicht in the GTK + window.

Also, if you need light graphics and a media library like SDL, can I suggest SFML . It can work in Win32 and X / 11 without problems and can easily work with Irrlicht.

0
source

Source: https://habr.com/ru/post/1388388/


All Articles