[SOLVED] LWJGL - Rendering

Well, I just started LWJGL so I can learn more stuff.
I’ve done some tutorials and stuff, added things to my game, so far, it’s really basic.
Now my problem is, I just rendered out a square, with a diagonal square bitten out of it.
What have I done wrong in my code?
Source:


Thanks :slight_smile:


		GL11.glVertex2f(-50, 50);
		GL11.glVertex2f(-50, -50);
		GL11.glVertex2f(50, 50);
		GL11.glVertex2f(50, -50);

I believe, is where your getting your problem, your setting the vertexs wrong

I have been taught to always draw from bottom right, bottom left, top right. top left so it would be



GL11.glVertex2f(-50, -50); //bottom left
GL11.glVertex2f(50, -50); //bottom right
GL11.glVertex2f(50, 50); //top right
GL11.glVertex2f(-50, 50); //top left

I believe that is now in the right order.

Yes, it worked!
Thanks man! I believe this forum will teach me a lot of things :P.

its ok, it was a super simple, It was pretty much the first thing I looked for lol.