Search
lxdream.org :: lxdream/src/drivers/video_egl.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_egl.c
changeset 1251:b8ab59d39756
prev1245:01e0020adf88
next1256:a9d29fe74bf3
author nkeynes
date Sat Mar 03 16:11:28 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Support depth component 16 as well as 24 (add capability flag for the available bits)
Put remaining TODOs inside HAVE_OPENGL_FIXEDFUNC blocks
Add swap-buffer calls for EGL (does not appear to support rendering directly
to front-buffer)
file annotate diff log raw
1.1 --- a/src/drivers/video_egl.c Fri Mar 02 23:49:10 2012 +1000
1.2 +++ b/src/drivers/video_egl.c Sat Mar 03 16:11:28 2012 +1000
1.3 @@ -122,7 +122,8 @@
1.4 }
1.5
1.6 if( gl_fbo_is_supported() ) {
1.7 - display_gl_driver.capabilities.has_gl = TRUE;
1.8 + display_egl_driver.capabilities.has_gl = TRUE;
1.9 + display_egl_driver.capabilities.depth_bits = 16; /* TODO: get from config info */
1.10 gl_fbo_init(&display_egl_driver);
1.11 gl_vbo_init(&display_egl_driver);
1.12 fbo_created = TRUE;
1.13 @@ -131,6 +132,7 @@
1.14 video_egl_clear_window();
1.15 return FALSE;
1.16 }
1.17 + gl_set_video_size(width, height, 0);
1.18 pvr2_setup_gl_context();
1.19 INFO( "Initialised EGL %d.%d\n", major, minor );
1.20 return TRUE;
1.21 @@ -154,6 +156,10 @@
1.22 eglTerminate(display);
1.23 }
1.24
1.25 +static void video_egl_swap_buffers()
1.26 +{
1.27 + eglSwapBuffers(display, surface);
1.28 +}
1.29
1.30
1.31 /**
1.32 @@ -164,5 +170,5 @@
1.33 NULL, NULL, NULL,
1.34 NULL, NULL, NULL, NULL,
1.35 gl_load_frame_buffer, gl_display_render_buffer, gl_display_blank,
1.36 - NULL, gl_read_render_buffer, NULL, NULL
1.37 + video_egl_swap_buffers, gl_read_render_buffer, NULL, NULL
1.38 };
.