I am rendering 3 squares on which I have stretched the texture, and as I move them in space, I change the coordinates of the vertices of these squares. Everything works, but as soon as I want to render another image, the texture of which is already on the stage, for some reason it is not displayed in the position where I need it, but is superimposed on the same texture on the stage. That is, when I want to render two identical images in different parts of the scene, they overlap each other (I see this due to the fact that there are almost transparent pixels in the image, and when I add it, it can be seen that they overlap each other), although in the console I see that their coordinates are different. What's wrong?
I use SharpGL
private void DrawTexture(int idTexture)
{
gl.PushMatrix();
gl.LoadIdentity();
gl.Scale(-0.15, 0.28, 1);
gl.Rotate(180, 0, 0, 0);
gl.BindTexture(GL_TEXTURE_2D, _textureParams[idTexture].textures);
gl.Begin(GL_QUADS);
float dist = DistanceTextureMultipler;
gl.TexCoord(0, 0); gl.Vertex(_textureParams[idTexture].textureScaleX * (-1 + _textureParams[idTexture].texturePostitonX / dist), _textureParams[idTexture].textureScaleY * (-1 + _textureParams[idTexture].texturePostitonY / dist));
gl.TexCoord(1, 0); gl.Vertex(_textureParams[idTexture].textureScaleX * (1 + _textureParams[idTexture].texturePostitonX / dist), _textureParams[idTexture].textureScaleY * (-1 + _textureParams[idTexture].texturePostitonY / dist));
gl.TexCoord(1, 1); gl.Vertex(_textureParams[idTexture].textureScaleX * (1 + _textureParams[idTexture].texturePostitonX / dist), _textureParams[idTexture].textureScaleY * (1 + _textureParams[idTexture].texturePostitonY / dist));
gl.TexCoord(0, 1); gl.Vertex(_textureParams[idTexture].textureScaleX * (-1 + _textureParams[idTexture].texturePostitonX / dist), _textureParams[idTexture].textureScaleY * (1 + _textureParams[idTexture].texturePostitonY / dist));
gl.End();
gl.PopMatrix();
}