Okay I''ve been trying to figure out why this doesn''t work for a while I can''t figure out what''s wrong here''s the code...
GLuint DrawGLWindow()
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(x,y,z);
if(keys[VK_UP])
{
z+=1.0f;
}
if(keys[VK_DOWN])
{
z-=1.0f;
}
glLoadIdentity();
glTranslatef(0.0f,0.0f,-6.0f);
glRotatef(move,0.0f,1.0f,1.0f);
p.SolidCube(1.0f);
move+=1.0f;
return TRUE;
}
As you can see the code is supposed to let you move only foward and backwards but it doesn''t move at all...I''m a noob here so please explain in plain english