Docsity

Opengl Functions Notes, Exams of Computer Graphics

Partial preview of the text

Download Opengl Functions Notes and more Exams Computer Graphics in PDF only on Docsity!

Discuss the following OpenGL function 1. | glOrtho(left,right,bottom,top,near,far); | gluOrtho2D(left,right,bott,top); 2. | glClear(GL_COLOR_BUFFER_BIT); glFlush(); 3. | glClearColor(R,G,B,A); giColor3f(R,G,B) | giColor3b() [ giColor3d() 4. | glutWireSphere(radius,slices, stacks); glutSolidSphere(.55,30,10); 5. | glutWireCone(rad,length,slices,stacks); | glutSolidCone(.6,1,100,10); 6. | glutWireTorus(inner rad,out rad,60,50); | glutSolidTorus(0.3, 0.7, 60,50); 7. | glutWireCube(size); glutSolidTeapot(radius); 8. | glutSwapBuffers(); glFlush(); 9. | glutinitDisplayMode(GLUT DOUBLE | GLUT_RGBA); 10.| glViewport(x,y,width, height); | glutMainLoop(); 11] glBegin(GL_LINE_LOOP); GL_LINE_STRIP, GL_LINES, GL_POLYGON,GL_POINTS 12] glVertex2i(x, y); | glVertex3f(x,y,z); 13,| glEnd(); 14 glRecti(x1,y1,x2,y2); 15,| glutCreateMenu(handling function) glutAttachMenu(GLUT_RIGHT BUTTON); 16,| glutAddMenuEntry(“visible text”, value); 17,| glutDisplayFunc(f) glutMouseFunc(f) | glutkeyboardFunc(f) | glutMotionFunc() 18,| glutidleFunc(renderScene); 19,| giScaled(x,y,z) glRotated(ang,x,y,z) | glTranslated(x,y,z) 20,| glMatrixMode(GL_PROJECTION); glloadidentity();