Пример #1
0
/*===========================================================
Setup EGL context and surface
===========================================================*/
int8_t EGL_Init( void )
{
    int configIndex = 0;

    if (FindAppropriateEGLConfigs() != 0)
    {
        printf( "EGL ERROR: Unable to configure EGL. See previous error.\n" );
        return 1;
    }

    printf( "EGL Config %d\n", configIndex );

    if ( ConfigureEGL(g_allConfigs[configIndex]) != 0)
    {
        CheckEGLErrors( __FILE__, __LINE__ );
        printf( "EGL ERROR: Unable to configure EGL. See previous error.\n" );
        return 1;
    }

    return 0;
}
Пример #2
0
/*===========================================================
Setup EGL context and surface
===========================================================*/
int EGL_Init( void )
{
    FindAppropriateEGLConfigs();

    int configIndex = 0;

	printf( "Config %d\n", configIndex );

	if (!ConfigureEGL(g_allConfigs[configIndex]))
	{
		TestEGLError();
		fprintf(stderr, "ERROR: Unable to initialise EGL. See previous error.\n");
		return 1;
	}

    /* Pandora VSync */
    fbdev = open ("/dev/fb0", O_RDONLY /* O_RDWR */ );
    if ( fbdev < 0 ) {
      fprintf ( stderr, "Couldn't open /dev/fb0 for vsync\n" );
    }
    /* Pandora VSync End */

    return 0;
}