Last active
February 22, 2018 11:28
-
-
Save Mikepicker/f8cbfdf8db90cefb3f171ba972d7da6a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Blank texture for silhouette blitting | |
| SDL_Texture* createBlankTexture(Sint32 w, Sint32 h, SDL_TextureAccess access) { | |
| //Create uninitialized texture | |
| SDL_Texture* newTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, access, w, h); | |
| if(newTexture == NULL) { | |
| printf( "Unable to create blank texture! SDL Error: %s\n", SDL_GetError() ); | |
| } | |
| return newTexture; | |
| } | |
| SDL_Texture* silhouetteTexture = createBlankTexture(SCREEN_WIDTH, SCREEN_HEIGHT, SDL_TEXTUREACCESS_TARGET); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment