The problem is the black line that is created when approached two tile that are not Px2 Texture.
IMPORT "C" void __stdcall glTexParameteri(unsigned int flag0, unsigned int flag1, unsigned int flag2);
GLOBAL GL_CLAMP_TO_EDGE% = 0x812F
GLOBAL GL_TEXTURE_2D% = 0x0DE1
GLOBAL GL_TEXTURE_WRAP_S% = 0x2802
GLOBAL GL_TEXTURE_WRAP_T% = 0x2803
FUNCTION z_drawstage: num%,x%,y%
STARTPOLY num
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);// Changed \\
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);// Changed \\
POLYVECTOR x1,y1,0,0,color
POLYVECTOR x1,y1+y2,0,sy,color
POLYVECTOR x1+x2,y1+y2,sx,sy,color
POLYVECTOR x1+x2,y1,sx,0,color
ENDPOLY
ENDFUNCTION