Zero streaming textures at the driver level
This commit is contained in:
parent
c506aacb3a
commit
ce2aa2ee1d
3 changed files with 3 additions and 3 deletions
|
@ -427,7 +427,7 @@ GL_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
|
|||
/* Need to add size for the U and V planes */
|
||||
size += (2 * (texture->h * data->pitch) / 4);
|
||||
}
|
||||
data->pixels = SDL_malloc(size);
|
||||
data->pixels = SDL_calloc(1, size);
|
||||
if (!data->pixels) {
|
||||
SDL_OutOfMemory();
|
||||
SDL_free(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue