I have no idea what's wrong. Everything seems to be fine. Here's code (texture is loaded, just drawing) :

```
glBegin( GL_QUADS );
    float TX1,TX2,TY1,TY2;

    TX1=some_numbers_check_below_code;
    TX2=some_numbers_check_below_code;
    TY1=some_numbers_check_below_code;
    TY2=some_numbers_check_below_code;

    glTexCoord2f(TX1,TY2);
    glVertex3f( float(RectOutput.x), float(RectOutput.y), 0.0f );

    glTexCoord2f(TX2,TY2);
    glVertex3f( float(RectOutput.x+InputWidth), float(RectOutput.y), 0.0f );

    glTexCoord2i(TX2,TY1);
    glVertex3f( float(RectOutput.x+InputWidth), float(RectOutput.y+InputHeight), 0.0f );(InputY)/float(Input.H)) );

    glTexCoord2f(TX1,TY1);
    glVertex3f( float(RectOutput.x), float(RectOutput.y+InputHeight), 0.0f );

glEnd();

```

It's okay with :

```
TX1=0.0;
TX2=1.0;
TY1=1.0;
TY2=0.0;

```

(Good : <http://i.imgur.com/xLeBm.png>)

But gets broken with (eg.) :

```
TX1=0.0;
TX2=0.5;
TY1=1.0;
TY2=0.5;

```

(Like this : <http://i.imgur.com/UykBh.png>)

Really, it annoys me. Probably problem isn't in this code. Everything should be fine ... but it's not.

Any ideas?