index 6c348baeef3d8a95551225db70058bc0b8c4c6db..62ace83b459098298fa725a7ba72a71c34070314 100644 (file)
--- a/src/engine/e_texture.pas
+++ b/src/engine/e_texture.pas
e_WriteLog(Format('NPOT: %u is %ux%u; gl is %ux%u; u=%f; v=%f', [tex.id, Width, Height, tex.glwidth, tex.glheight, tex.u, tex.v]), MSG_NOTIFY);
// texture blends with object background
- glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
// texture does NOT blend with object background
//glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
glBindTexture(GL_TEXTURE_2D, 0);
+ // so driver will really upload the texture (this is *sometimes* required for buggy videodrivers)
+ glFlush();
+ glFinish();
+
Result := true;
end;
imageSize := Width*Height*4;
GetMem(image, imageSize);
try
- // it's slow, but i don't care for now
+ // it is slow, but i don't care for now
ii := image;
for y := height-1 downto 0 do
begin
imageSize := img.width*img.height*4;
GetMem(image, imageSize);
try
- // it's slow, but i don't care for now
+ // it is slow, but i don't care for now
ii := image;
for y := fY+fHeight-1 downto fY do
begin