我知道你可以在 lrrlicht 中做同样的事情,但我想使用 SDL 代码/函数在 Irrlicht 中绘制文本、图像(处理 2d)并使用 Irrlicht 来做核心 3D 事情,你如何应用来自 sdl 的文本或图像对于这个 Irrlicht Engine,你能给我看简单的代码,以便我理解吗?
在 SDL 中,您可以这样做:
// 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);