hedgewars/uLandTexture.pas
changeset 1808 2fc248766d57
parent 1807 795f97007833
child 1852 fa04a27005c3
equal deleted inserted replaced
1807:795f97007833 1808:2fc248766d57
    74 	for x:= 0 to LANDTEXARW -1 do
    74 	for x:= 0 to LANDTEXARW -1 do
    75 		for y:= 0 to LANDTEXARH - 1 do
    75 		for y:= 0 to LANDTEXARH - 1 do
    76 			with LandTextures[x, y] do
    76 			with LandTextures[x, y] do
    77 				if shouldUpdate then
    77 				if shouldUpdate then
    78 					begin
    78 					begin
       
    79 					shouldUpdate:= false;
    79 					glBindTexture(GL_TEXTURE_2D, tex^.id);
    80 					glBindTexture(GL_TEXTURE_2D, tex^.id);
    80 					glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, TEXSIZE, TEXSIZE, GL_RGBA, GL_UNSIGNED_BYTE, Pixels(x, y));
    81 					glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, TEXSIZE, TEXSIZE, GL_RGBA, GL_UNSIGNED_BYTE, Pixels(x, y));
    81 					end
    82 					end
    82 end;
    83 end;
    83 
    84