I just want to draw an image that fits the screen.
I know there is no scaling function for images, but the image would be scaled, when I use it for texturing a 3d object. So how can I create a textured plane (or a box) that fits the screen?
Scaling images
This will strech a texture to fill the entire window
Code: Select all
core::dimension2d<s32> textureSize = Texture->getSize();
core::dimension2d<s32> screenSize = Driver->getScreenSize();
core::rect<s32> srcRect(0, 0, textureSize.X, textureSize.Y);
core::rect<s32> dstRect(0, 0, screenSize.X, screenSize.Y);
Driver->draw2DImage(Texture, dstRect, srcRect);