//OpenGL include goes here
GLfloat year=0;
GLfloat day=0;
void reshape(int w, int h)
{
glViewport(0,0,w,h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(60,1,0.5,400);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glEnable(GL_DEPTH_TEST);
glLoadIdentity();
glRasterPos2f(0,0);
//glRasterPos3f(0,1,0);
glutBitmapCharacter(GLUT_BITMAP_9_BY_15,72);
glutBitmapCharacter(GLUT_BITMAP_9_BY_15,65);
glutBitmapCharacter(GLUT_BITMAP_9_BY_15,70);
glutBitmapCharacter(GLUT_BITMAP_9_BY_15,73);
glutBitmapCharacter(GLUT_BITMAP_9_BY_15,90);
glutBitmapCharacter(GLUT_BITMAP_9_BY_15,65);
glutBitmapCharacter(GLUT_BITMAP_9_BY_15,72);
gluLookAt(0,0,-2,0,0,0,0,1,0);
glutSwapBuffers();
}
int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
glutInitWindowPosition(100,100);
glutCreateWindow("Text Example");
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMainLoop();
return(0);
}
Subscribe to:
Post Comments (Atom)
Question 1: Introduction to Variable
Based on code below, create a dynamic program that solve problem below: Source Code: #include <iostream> using na...
-
Dear students, Added information based on data communication. These topic briefly discusses the modes of channel operation namely, simple...
-
Assalamualaikum dan Salam Sejahtera Saya ingin bertanya pendapat semua pembaca khususya pelajar dan pensyarah politeknik / IPTA / IPTS. Ap...
-
Assalamualaikum dan salam sejahtera, Pelajar-pelajar yang dikasihi... Just short reminder for all of you. Please read below article... Quiz,...
No comments:
Post a Comment