Hi,
i want to load a matrix with glLoadMatrix() function, simply to translate an object in my scene.
for begining, i replace “glLoadIdentity()” by glLoadMatrix(&aM);
but the result is not self than “glLoadIdentity()” .
Why ?
this is my code:
float aM = {1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1};
void Display()
{
glClear(GL_COLOR_BUFFER_BIT |
GL_DEPTH_BUFFER_BIT);
//glLoadIdentity();
glLoadMatrixf(&aM);
gluLookAt(0,0,10,0,0,0,0,1,0);
glBegin(GL_TRIANGLES);
glutSolidSphere(1, 20, 20);
glEnd();
glutSwapBuffers();
}