![]() |
|
[Java] LWJGL glTranslatef texture question - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Java] LWJGL glTranslatef texture question (/showthread.php?tid=5794240) |
LWJGL glTranslatef texture question - Womas - Feb 3, 2018 LWJGL question: im now writing a code which add a texture to a quad Code public static void DrawQuadTex(Texture texture, float x, float y, float width, float height) {Code public static void DrawQuadTex(Texture texture, float x, float y, float width, float height) {Assume i input 64,64 to the second code as x y parameters, why is the x y in glVertex2f be 0 , width and height at first? Shouldn't it be x,y, x or y + width and x or y + height? Like normally 0xy should be the top left corner of the computer. But now it changed to the top left corner of the quad. Is that what glTranslatef does? RE: LWJGL glTranslatef texture question - Sogomn - Feb 4, 2018 Quote:Is that what glTranslatef does? Yes. That's why it's called "translate". But is there any reason you're using like... OpenGL 1? It's endlessly slow and the code get super clumsy real fast. |