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 669:ab344e42bca9
prev665:99ae9dc4cab7
next676:705a5707da13
author nkeynes
date Mon May 12 10:00:13 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Cleanup most of the -Wall warnings (getting a bit sloppy...)
Convert FP code to use fixed banks rather than indirect pointer
(3-4% faster this way now)
file annotate diff log raw
1.1 --- a/src/drivers/video_glx.c Sat Apr 19 00:36:36 2008 +0000
1.2 +++ b/src/drivers/video_glx.c Mon May 12 10:00:13 2008 +0000
1.3 @@ -31,7 +31,6 @@
1.4 */
1.5 Display *video_x11_display = NULL;
1.6 Window video_x11_window = 0;
1.7 -static gboolean glsl_loaded = FALSE;
1.8
1.9 static int glx_version = 100;
1.10 static XVisualInfo *glx_visual = NULL;
1.11 @@ -40,16 +39,16 @@
1.12 static gboolean glx_is_initialized = FALSE;
1.13 static gboolean glx_fbconfig_supported = FALSE;
1.14 static gboolean glx_pbuffer_supported = FALSE;
1.15 -static int glx_pbuffer_texture = 0;
1.16 +static GLuint glx_pbuffer_texture = 0;
1.17
1.18 /* Prototypes for pbuffer support methods */
1.19 static void glx_pbuffer_init( display_driver_t driver );
1.20 static render_buffer_t glx_pbuffer_create_render_buffer( uint32_t width, uint32_t height );
1.21 static void glx_pbuffer_destroy_render_buffer( render_buffer_t buffer );
1.22 static gboolean glx_pbuffer_set_render_target( render_buffer_t buffer );
1.23 -static gboolean glx_pbuffer_display_render_buffer( render_buffer_t buffer );
1.24 +static void glx_pbuffer_display_render_buffer( render_buffer_t buffer );
1.25 static void glx_pbuffer_load_frame_buffer( frame_buffer_t frame, render_buffer_t buffer );
1.26 -static gboolean glx_pbuffer_display_blank( uint32_t colour );
1.27 +static void glx_pbuffer_display_blank( uint32_t colour );
1.28 static gboolean glx_pbuffer_read_render_buffer( unsigned char *target, render_buffer_t buffer, int rowstride, int format );
1.29
1.30 /**
1.31 @@ -300,7 +299,7 @@
1.32 * Render the texture holding the given buffer to the front window
1.33 * buffer.
1.34 */
1.35 -static gboolean glx_pbuffer_display_render_buffer( render_buffer_t buffer )
1.36 +static void glx_pbuffer_display_render_buffer( render_buffer_t buffer )
1.37 {
1.38 glFinish();
1.39 glReadBuffer( GL_FRONT );
1.40 @@ -310,7 +309,6 @@
1.41 glCopyTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, 0, 0, buffer->width, buffer->height, 0 );
1.42 video_glx_make_window_current();
1.43 gl_texture_window( buffer->width, buffer->height, glx_pbuffer_texture, buffer->inverted );
1.44 - return TRUE;
1.45 }
1.46
1.47 static void glx_pbuffer_load_frame_buffer( frame_buffer_t frame, render_buffer_t buffer )
1.48 @@ -330,11 +328,11 @@
1.49 glFlush();
1.50 }
1.51
1.52 -static gboolean glx_pbuffer_display_blank( uint32_t colour )
1.53 +static void glx_pbuffer_display_blank( uint32_t colour )
1.54 {
1.55 glFinish();
1.56 video_glx_make_window_current();
1.57 - return gl_display_blank( colour );
1.58 + gl_display_blank( colour );
1.59 }
1.60
1.61 static gboolean glx_pbuffer_read_render_buffer( unsigned char *target, render_buffer_t buffer,
.