glViewport(0, 0, (GLsizei) w, (GLsizei) h);\r
glMatrixMode(GL_PROJECTION);\r
glLoadIdentity();\r
glViewport(0, 0, (GLsizei) w, (GLsizei) h);\r
glMatrixMode(GL_PROJECTION);\r
glLoadIdentity();\r
glOrtho(near, far, near*(GLfloat)h/(GLfloat)w,\r
far*(GLfloat)h/(GLfloat)w, -100, 100);\r
else\r
glOrtho(near*(GLfloat)w/(GLfloat)h,\r
far*(GLfloat)w/(GLfloat)h, near, far, nearClip, farClip);\r
glOrtho(near, far, near*(GLfloat)h/(GLfloat)w,\r
far*(GLfloat)h/(GLfloat)w, -100, 100);\r
else\r
glOrtho(near*(GLfloat)w/(GLfloat)h,\r
far*(GLfloat)w/(GLfloat)h, near, far, nearClip, farClip);\r
0.0, 0.0, 0.0, /* center is at (x,y,z) */\r
0.0, 1.0, 0.0 /* up is in postivie Y direction */\r
);\r
0.0, 0.0, 0.0, /* center is at (x,y,z) */\r
0.0, 1.0, 0.0 /* up is in postivie Y direction */\r
);\r
glLightfv(GL_LIGHT0, GL_POSITION, light0_pos);\r
glLightfv(GL_LIGHT0, GL_AMBIENT, ambient0);\r
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse0);\r
glLightfv(GL_LIGHT0, GL_POSITION, light0_pos);\r
glLightfv(GL_LIGHT0, GL_AMBIENT, ambient0);\r
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse0);\r