I have created a method to render a triangle, but the triangle won’t show up. Just so you know, I’m new to LWJGL, so bare with me here. Anywho, here is the code to render the triangle:
public void renderTriangle() {
GL11.glPushMatrix();
GL11.glBegin(GL11.GL_TRIANGLES);
GL11.glVertex3d(-50, 0, 0);
GL11.glVertex3d(50, 0, 0);
GL11.glVertex3d(50, -50, 0);
GL11.glEnd();
GL11.glPopMatrix();
}
I know I properly configured OpenGL, since I rendered a quad, which shows up properly. Or is there possibly stuff I need to enable/disable for 3D rendering? Anyway, please tell me what I did wrong or what I need to add.
Here is the whole class file so you can see how I configured the OpenGL part: http://www.jamisongames.info/Test.java
Thanks in advanced,
Jamison