예제 #1
0
파일: main.c 프로젝트: astrofimov/LBE_DOCS
int main () {
	
	int i, j, k, m;
	int total_pitch = 320 * 2; /*2 bpp*/
	
	uint16_t *pixels = malloc (320 * 200 * sizeof(uint16_t));
	init_egl();

	gles2_init(320, 200, 16, false);

	clear_screen (320, 200,  pixels);
	
	for (m = 0; m < 2; m++) {
		for (j = 0; j < 320 - 50; j++) {
			
			clear_screen (320, 200,  pixels);
			
			for (i = 0; i < 200; i++) {
				
				for (k = 0; k < 50; k++) 
					pixels[i * 320 + j + k] = 0x0FF0;
				
			}
			
			gles2_draw(pixels);
			eglSwapBuffers(eglInfo.display, eglInfo.surface);
		}
	}
	free (pixels);
	
	return 0;
}
예제 #2
0
void DisplayScreen(struct osd_bitmap *bitmap)
{
	extern int throttle;
	static int save_throttle=0;

	if (throttle != save_throttle)
	{
		if(throttle)
			eglSwapInterval(display, 1);
		else
			eglSwapInterval(display, 0);

		save_throttle=throttle;
	}

    //Draw to the screen
	if (bitmap->depth == 8)
    	gles2_draw(gp2x_screen8, surface_width, surface_height, bitmap->depth);
	else
    	gles2_draw(gp2x_screen15, surface_width, surface_height, bitmap->depth);
    eglSwapBuffers(display, surface);
}
예제 #3
0
void pi_video_flip() {
    //	extern int throttle;
    static int throttle = 1;
    static int save_throttle = 0;

    if (throttle != save_throttle) {
        if (throttle)
            eglSwapInterval(display, 1);
        else
            eglSwapInterval(display, 0);

        save_throttle = throttle;
    }

    //Draw to the screen
    gles2_draw(VideoBuffer, surface_width, surface_height, 16);
    eglSwapBuffers(display, surface);
}