Tag Info

New answers tagged


You need to move all the SDL functions out of the compound for loop. for { for { pixels[y*width+x] = argb; //Updating them all at once should be fine //Nothing else can happen while this is running } } //Update entire array at once, then... SDL_UpdateTexture(texture, NULL, pixels, width * 4); //Copy entire array only once ...

Top 50 recent answers are included