tests/cuda3.2/tests/simpleTexture3D/simpleTexture3D.cpp
void display()
{
    cutilCheckError(cutStartTimer(timer));  

    render();

    // display results
    glClear(GL_COLOR_BUFFER_BIT);

    // draw image from PBO
    glDisable(GL_DEPTH_TEST);
    glRasterPos2i(0, 0);
    glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, pbo);
    glDrawPixels(width, height, GL_RGBA, GL_UNSIGNED_BYTE, 0);
    glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0);

    if (g_CheckRender && g_CheckRender->IsQAReadback() && g_Verify) {
        // readback for QA testing
        printf("> (Frame %d) Readback BackBuffer\n", frameCount);
        g_CheckRender->readback( width, height );
        g_CheckRender->savePPM(sOriginal[g_Index], true, NULL);
        if (!g_CheckRender->PPMvsPPM(sOriginal[g_Index], sReference[g_Index], MAX_EPSILON_ERROR, THRESHOLD)) {
            g_TotalErrors++;
        }
        g_Verify = false;
    }

    glutSwapBuffers();
    glutReportErrors();

    cutilCheckError(cutStopTimer(timer));  
    computeFPS();
}
// display results using OpenGL (called by GLUT)
display results using OpenGL (called by GLUT)
display results using OpenGL ( called by GLUT )
void display()
{
    cutilCheckError(cutStartTimer(timer));  
    render();
    glClear(GL_COLOR_BUFFER_BIT);
    glDisable(GL_DEPTH_TEST);
    glRasterPos2i(0, 0);
    glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, pbo);
    glDrawPixels(width, height, GL_RGBA, GL_UNSIGNED_BYTE, 0);
    glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0);
    if (g_CheckRender && g_CheckRender->IsQAReadback() && g_Verify) {
        printf("> (Frame %d) Readback BackBuffer\n", frameCount);
        g_CheckRender->readback( width, height );
        g_CheckRender->savePPM(sOriginal[g_Index], true, NULL);
        if (!g_CheckRender->PPMvsPPM(sOriginal[g_Index], sReference[g_Index], MAX_EPSILON_ERROR, THRESHOLD)) {
            g_TotalErrors++;
        }
        g_Verify = false;
    }
    glutSwapBuffers();
    glutReportErrors();
    cutilCheckError(cutStopTimer(timer));  
    computeFPS();
}
void display ( ) { cutilCheckError ( cutStartTimer ( timer ) ) ; render ( ) ; glClear ( GL_COLOR_BUFFER_BIT ) ; glDisable ( GL_DEPTH_TEST ) ; glRasterPos2i ( 0 , 0 ) ; glBindBufferARB ( GL_PIXEL_UNPACK_BUFFER_ARB , pbo ) ; glDrawPixels ( width , height , GL_RGBA , GL_UNSIGNED_BYTE , 0 ) ; glBindBufferARB ( GL_PIXEL_UNPACK_BUFFER_ARB , 0 ) ; if ( g_CheckRender && g_CheckRender -> IsQAReadback ( ) && g_Verify ) { printf ( " \n " , frameCount ) ; g_CheckRender -> readback ( width , height ) ; g_CheckRender -> savePPM ( sOriginal [ g_Index ] , true , NULL ) ; if ( ! g_CheckRender -> PPMvsPPM ( sOriginal [ g_Index ] , sReference [ g_Index ] , MAX_EPSILON_ERROR , THRESHOLD ) ) { g_TotalErrors ++ ; } g_Verify = false ; } glutSwapBuffers ( ) ; glutReportErrors ( ) ; cutilCheckError ( cutStopTimer ( timer ) ) ; computeFPS ( ) ; }
display results using OpenGL (called by GLUT)
display results using OpenGL ( called by GLUT )
// display results // draw image from PBO // readback for QA testing