Simplified and improved the process of creating a texture from a surface.

This commit is contained in:
Sam Lantinga 2011-02-03 00:54:29 -08:00
parent 31b3ad2414
commit fe2b0d9703
5 changed files with 40 additions and 248 deletions

View file

@ -118,7 +118,7 @@ int main(int argc,char** argv)
for(i=0;i<num_pictures;i++)
pictures[i].texture = NULL;
for(i=0;i<num_pictures;i++) {
pictures[i].texture = SDL_CreateTextureFromSurface(renderer,0,pictures[i].surface);
pictures[i].texture = SDL_CreateTextureFromSurface(renderer,pictures[i].surface);
if(pictures[i].texture == NULL) {
j = 0;
for(j=0;j<num_pictures;i++)