Okay, changing cube to a 3D Triangle(What are they called???)
Can anyone tell me if this data works, and what order I should draw the triangles?(right now, it’s not all joining together
)
typedef GLfloat Point3D[3];
Point3D BottomTri[3] =
{
{-1.75, -1.75, 1.0},
{1.75, -1.75, 1.0},
{0.0, -1.75, -1.0}
};
Point3D BackLeftTri[3] =
{
{0.0, -1.75, -1.0},
{0.0, 1.75, 0.0},
{-1.75, -1.75, 1.0}
};
Point3D BackRightTri[3] =
{
{0.0,-1.75, -1.0},
{0.0, 1.75, 0.0},
{1.75, -1.75, 1.0}
};
Point3D FrontTri[3] =
{
{-1.75, -1.75, 1.0},
{1.75, -1.75, 1.0},
{0.0, 1.75, 0.0}
};
I’m drawing the data in a display list that goes like:
glBegin(GL_TRIANGLES);
//Bottom Triangle display
//Back Left Triangle Display
//Back Right Triangle Display
//Front Triangle Display
glEnd();