I just know that is the blend of Irrlicht and SDL who products this bug
So is someone can tell me how to do to display an image with SDL, in an Irrlicht's environment?
This is a sheet of my code:
Code: Select all
while(Device->run() && driver)
{
if (Device->isWindowActive())
{
driver->beginScene(true, true, video::SColor(255,245,245,245));
smgr->drawAll();
env->drawAll();
/* SDL code */
if(surface != NULL)
{
pos.x = SDL_GetVideoSurface()->w/2 - surface->w/2;
pos.y = SDL_GetVideoSurface()->h/2 - surface->h/2;
SDL_BlitSurface(surface, NULL, SDL_GetVideoSurface(), &pos);
SDL_Flip(SDL_GetVideoSurface());
}
driver->endScene();
}
}