Zero streaming textures at the driver level

This commit is contained in:
Sam Lantinga 2011-02-26 21:39:34 -08:00
parent c506aacb3a
commit ce2aa2ee1d
3 changed files with 3 additions and 3 deletions

View file

@ -322,7 +322,7 @@ GLES_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
if (texture->access == SDL_TEXTUREACCESS_STREAMING) {
data->pitch = texture->w * SDL_BYTESPERPIXEL(texture->format);
data->pixels = SDL_malloc(texture->h * data->pitch);
data->pixels = SDL_calloc(1, texture->h * data->pitch);
if (!data->pixels) {
SDL_OutOfMemory();
SDL_free(data);