Let's use the template application from Chapter 2, Creating a Basic Template Application as a base for this exercise. We'll load an image from Irrlicht's
media folder and draw it:
IVideoDriver* driver = device->getVideoDriver(); add
ITexture* image = driver->getTexture("../../media/irrlichtlogo2.png");.
You can use another image from the
media folder or any other image of your choice. Just make sure the filename and path are correctly passed to the getTexture() method.
driver->draw2DImage(image, position2d<s32>(50, 50), rect<s32>(0, 0, 128, 128), 0, SColor(255, 255, 255, 255), true);.
Your full source code should look like ...