I just don't get it.
My textures are getting shrunken somehow.
I am currently drawing 2 triangles using this code:
public void drawTexturedQuad(float x, float y, float width, float height) {
glBegin(GL_TRIANGLES);
{
/**
* TL
*/
glTexCoord2f(0.0f, 0.0f);
glVertex2f(x, y);
/**
* TR
*/
glTexCoord2f(1.0f, 0.0f);
glVertex2f(x + width, y);
/**
* BL
*/
glTexCoord2f(0.0f, 1.0f);
glVertex2f(x, y + height);
/**
* TR
*/
glTexCoord2f(1.0f, 0.0f);
glVertex2f(x + width, y);
/**
* BR
*/
glTexCoord2f(1.0f, 1.0f);
glVertex2f(x + width, y + height);
/**
* BL
*/
glTexCoord2f(0.0f, 1.0f);
glVertex2f(x, y + height);
}
glEnd();
}
I am using the spaceinvaders example textureloader to load textures.
If you look at the image, you can see the red background (glClearColor)
And you can see the black parts, which are the 2 triangles beeing drawn.
But the textures are shrunk It doesn't make sence.
And yes I tried drawing the textures on quads too.
Oh and also if it's worth mentioning.
I am using the slick library for loading/drawing unicode fonts.