Simplified and improved the process of creating a texture from a surface.
This commit is contained in:
parent
31b3ad2414
commit
fe2b0d9703
5 changed files with 40 additions and 248 deletions
|
@ -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++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue