Okay here are portions of my code:
static GLfloat body[2]=
{
{0.0, 0.0}, {1.0, 1.0},
{-1.0, 0.0}, {0.0, 1.0},
{-2.0, 0.0}, {-1.0, 1.0},
{-3.0, 0.0}, {-2.0, 1.0}
};static GLfloat vector[1]=
{
{0.001}, {0.0},
{0.001}, {0.0},
{0.001}, {0.0},
{0.001}, {0.0}
};
and then i use the arrays in the following code portion:
glTranslatefv(vector[i], vector[f]);
glRectfv(body[i], body[f]);
The glRectfv works but i can’t get the glTranslate call to work with vectors or arrays.
I know tha glTranslate requires 3 float values, so my glTranslate function looks like this:
GLfloat empty=0;
glTranslatef( vector[i], vector[f], empty);
I’m doing 2d based stuff and don’t need to modify the z values hence the “empty”.
Well i hope i made sense. I’m just trying out different ways to work with opengl codes and i thought it would be simpler to work with moving objects in a 3d space by using glTranslate in parallel, and then working on the glTranslate values, as apposed to working on the values for the object’s vertices/body.
Thanks for the help.
Cheers