It's better to load this in GIMP and convert to a better supported image format. Load file for use as an image in a new SDL::Surface. This can load all supported image files, including TGA as long as the filename ends with ". It is best to call this outside of event loops, and rather keep the loaded images around until you are really done with them, as disk speed and image conversion to a surface is not that speedy.
Note : If the image format loader requires initialization, it will attempt to do that the first time it is needed if you have not already called SDL::Image::init to load support for your image format.
Note : If the image format supports a transparent pixel, SDL::Image will set the colorkey for the surface. NULL is returned on errors, such as no support built for the image, or a file reading error. The image is loaded from this. Improve this question. Knarf Knarf 1, 3 3 gold badges 11 11 silver badges 29 29 bronze badges. Add a comment. Active Oldest Votes. Improve this answer. Piotr Praszmo Piotr Praszmo See documentation: wiki. Hi-Angel The important point here is that it might not be in the same place for everyone.
Hopefully knowing this will prevent some face-palms. In the third tutorial of lazyfoo is completely explained. GMD 5 5 silver badges 12 12 bronze badges. Alavro Alavro 39 1 1 bronze badge. J 11 1 1 bronze badge. Eric F Eric F 66 3 3 bronze badges. Softmixt Softmixt 1, 19 19 silver badges 15 15 bronze badges. I'm surprised it worked for you at all. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
Email Required, but never shown. The Overflow Blog. Does ES6 make JavaScript frameworks obsolete? Podcast Do polyglots have an edge when it comes to mastering programming
0コメント