MCQs > IT & Programming > OpenGL > what will be drawn on the screen when the following drawing code is entered?

OpenGL MCQs

If the viewport is 1024 by 768, the projection matrix is a 45 degree perspective matrix with the viewport ratio and the modelview matrix is the identity, what will be drawn on the screen when the following drawing code is entered?


void draw (void)

{

    glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

    

    glMatrixMode (GL_MODELVIEW);

    glLoadIdentity ();

    

    glTranslatef (0, 0, -10);

    

    glColor3f (1.0, 1.0, 0.0);

    

    glBegin (GL_QUADS);

    glVertex2i (1, 0);

    glVertex2i (1, 1);

    glVertex2i (-1, 1);

    glVertex2i (-1, 0);

    glEnd ();

    glFlush ();

}

Answer

Correct Answer:

Yellow rectangle 

Explanation:

Note: This Question is unanswered, help us to find answer for this one

OpenGL Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

OpenGL Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it