MCQs > IT & Programming > OpenGL > With depth test enabled, will the following drawing code work for depth testing?

OpenGL MCQs

With depth test enabled, will the following drawing code work for depth testing?

void draw (void)

{

    glClear (GL_COLOR_BUFFER_BIT);

    glPolygonMode (GL_FRONT_AND_BACK, GL_LINE);

    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:

No 

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