//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...
-
Group No.5 Project: Basic Mileage Calculator Group Member: NAZNI HANI BINTI ARSHAD - POLIMAS NOORAZURA BINTI NATHA @ MOKHTAR - P...
-
Assalamualaikum & Salam Sejahtera Welcome December 2013 Session, I'm delighted to welcome you all! FP303 Computer Network - Class...
-
Assalamualaikum dan Salam Sejahtera Saya ingin bertanya pendapat semua pembaca khususya pelajar dan pensyarah politeknik / IPTA / IPTS. Ap...
No comments:
Post a Comment