Search
lxdream.org :: lxdream/src/drivers/video_glx.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_glx.c
changeset 1076:18c164e8aec4
prev1066:ddffe9d2b332
next1134:f502f3d32f90
author nkeynes
date Mon Aug 03 08:41:11 2009 +1000 (12 years ago)
permissions -rw-r--r--
last change Rearrange frame output slightly.
pvr2_display_frame renamed to pvr2_next_frame and changed to update the
frame data without displaying it.
pvr2_redraw_display renamed to pvr2_draw_frame, called internally after
pvr2_next_frame
Add swap_buffers() method to the display driver
Remove explicit glDrawBuffer() calls where they're referencing the window.
pvr2_draw_frame now gets to decide where to draw.
Add force_vsync flag to force double-buffering (not configurable yet)
file annotate diff log raw
1.1 --- a/src/drivers/video_glx.c Sun Jul 05 13:53:48 2009 +1000
1.2 +++ b/src/drivers/video_glx.c Mon Aug 03 08:41:11 2009 +1000
1.3 @@ -42,6 +42,8 @@
1.4 static gboolean glx_pbuffer_supported = FALSE;
1.5 static GLuint glx_pbuffer_texture = 0;
1.6
1.7 +static void video_glx_swap_buffers( void );
1.8 +
1.9 /* Prototypes for pbuffer support methods */
1.10 static void glx_pbuffer_init( display_driver_t driver );
1.11 static render_buffer_t glx_pbuffer_create_render_buffer( uint32_t width, uint32_t height, GLuint tex_id );
1.12 @@ -207,6 +209,7 @@
1.13
1.14 gboolean video_glx_init_driver( display_driver_t driver )
1.15 {
1.16 + driver->swap_buffers = video_glx_swap_buffers;
1.17 if( gl_fbo_is_supported() ) { // First preference
1.18 gl_fbo_init(driver);
1.19 } else if( glx_pbuffer_supported ) {
1.20 @@ -255,7 +258,7 @@
1.21 }
1.22
1.23
1.24 -void video_glx_swap_buffers( void )
1.25 +static void video_glx_swap_buffers( void )
1.26 {
1.27 glXSwapBuffers( video_x11_display, video_x11_window );
1.28 }
1.29 @@ -353,7 +356,6 @@
1.30 {
1.31 glFinish();
1.32 glReadBuffer( GL_FRONT );
1.33 - glDrawBuffer( GL_FRONT );
1.34 glXMakeContextCurrent( video_x11_display, (GLXPbuffer)buffer->buf_id, (GLXPbuffer)buffer->buf_id, glx_context );
1.35 glBindTexture( GL_TEXTURE_RECTANGLE_ARB, glx_pbuffer_texture );
1.36 glCopyTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, 0, 0, buffer->width, buffer->height, 0 );
.