Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
LWJGL (with Slick-util) image question?
I have recently joined the LWJGL life. I have a problem though... I was given this code to work with... I built some of it (text.X()). I have no idea what any of the functions represents (does). Do you know what these functions do separately? Thanks!
I am not a novice java programmer.
GL11.glTexCoord2f(0,0);
GL11.glVertex2f(100,100);
GL11.glTexCoord2f(1,0);
GL11.glVertex2f(100+tex.getTextureWidth(),100);
GL11.glTexCoord2f(1,1);
GL11.glVertex2f(100+tex.getTextureWidth(),100+tex.getTextureHeight());
GL11.glTexCoord2f(0,1);
GL11.glVertex2f(100,100+tex.getTextureHeight());
When I was messing with it, it started curving from the bottom middle of the corner down to the tip.
1 Answer
- ?Lv 77 years agoFavorite Answer
Assuming the texture is 200x50, it tells OpenGL to paint its upper left corner at 100,100 and its lower right corner at 300, 150.
It's about mapping the texture to a rectangle on the screen.