Exemplo n.º 1
0
/*===========================================================
Swap EGL buffers and update the display
===========================================================*/
void EGL_SwapBuffers( void )
{
    if (VSync != 0) {
        Platform_VSync();
    }
    peglSwapBuffers( g_eglDisplay, g_eglSurface );
}
Exemplo n.º 2
0
/** @brief Swap the surface buffer onto the display
 */
void EGL_SwapBuffers( void )
{
    if (eglSettings[CFG_VSYNC] != 0) {
        Platform_VSync();
    }

    peglSwapBuffers( eglDisplay, eglSurface );

    if (eglSettings[CFG_FPS] != 0) {
        fpsCount++;
		
        if (Platform_GetTicks() - fpsTime >= 1000<<3)	// print fps every 8 seconds
        {
            printf( "EGLport: %d fps\n", fpsCount>>3 );
            fpsTime = Platform_GetTicks();
            fpsCount = 0;
        }
Exemplo n.º 3
0
/** @brief Swap the surface buffer onto the display
 */
void EGL_SwapBuffers( void )
{
    if (eglSettings[CFG_VSYNC] != 0) {
        Platform_VSync();
    }

    peglSwapBuffers( eglDisplay, eglSurface );

    if (eglSettings[CFG_FPS] != 0) {
        fpsCount++;

        if (fpsTime - Platform_GetTicks() >= 1000)
        {
            printf( "EGLport: %d fps\n", fpsCount );
            fpsTime = Platform_GetTicks();
            fpsCount = 0;
        }
    }
}