1.1 --- a/src/drivers/video_gl.c Sun Jun 01 00:47:45 2008 +0000
1.2 +++ b/src/drivers/video_gl.c Mon Jul 21 01:01:39 2008 +0000
1.7 - top = ((float)height);
1.9 + top = ((float)height);
1.13 - bottom = ((float)height);
1.15 + bottom = ((float)height);
1.18 /* Reset display parameters */
1.20 int ah = video_width * 0.75;
1.22 if( ah > video_height ) {
1.23 - int w = (video_height/0.75);
1.24 - x1 = (video_width - w)/2;
1.26 + int w = (video_height/0.75);
1.27 + x1 = (video_width - w)/2;
1.30 - glBegin( GL_QUADS );
1.31 - glVertex2f( 0, 0 );
1.32 - glVertex2f( x1, 0 );
1.33 - glVertex2f( x1, video_height );
1.34 - glVertex2f( 0, video_height);
1.35 - glVertex2f( x2, 0 );
1.36 - glVertex2f( video_width, 0 );
1.37 - glVertex2f( video_width, video_height );
1.38 - glVertex2f( x2, video_height);
1.40 + glBegin( GL_QUADS );
1.41 + glVertex2f( 0, 0 );
1.42 + glVertex2f( x1, 0 );
1.43 + glVertex2f( x1, video_height );
1.44 + glVertex2f( 0, video_height);
1.45 + glVertex2f( x2, 0 );
1.46 + glVertex2f( video_width, 0 );
1.47 + glVertex2f( video_width, video_height );
1.48 + glVertex2f( x2, video_height);
1.50 } else if( ah < video_height ) {
1.51 - y1 = (video_height - ah)/2;
1.53 - glBegin( GL_QUADS );
1.54 - glVertex2f( 0, 0 );
1.55 - glVertex2f( video_width, 0 );
1.56 - glVertex2f( video_width, y1 );
1.57 - glVertex2f( 0, y1 );
1.58 - glVertex2f( 0, y2 );
1.59 - glVertex2f( video_width, y2 );
1.60 - glVertex2f( video_width, video_height );
1.61 - glVertex2f( 0, video_height );
1.63 + y1 = (video_height - ah)/2;
1.65 + glBegin( GL_QUADS );
1.66 + glVertex2f( 0, 0 );
1.67 + glVertex2f( video_width, 0 );
1.68 + glVertex2f( video_width, y1 );
1.69 + glVertex2f( 0, y1 );
1.70 + glVertex2f( 0, y2 );
1.71 + glVertex2f( video_width, y2 );
1.72 + glVertex2f( video_width, video_height );
1.73 + glVertex2f( 0, video_height );
1.77 /* Render the textured rectangle */
1.78 @@ -128,11 +128,11 @@
1.79 GLenum format = colour_formats[frame->colour_format].format;
1.80 int bpp = colour_formats[frame->colour_format].bpp;
1.81 int rowstride = (frame->rowstride / bpp) - frame->width;
1.84 glPixelStorei( GL_UNPACK_ROW_LENGTH, rowstride );
1.85 glBindTexture( GL_TEXTURE_RECTANGLE_ARB, tex_id );
1.86 glTexSubImage2D( GL_TEXTURE_RECTANGLE_ARB, 0, 0,0,
1.87 - frame->width, frame->height, format, type, frame->data );
1.88 + frame->width, frame->height, format, type, frame->data );
1.93 * there's only one buffer this needs to be wrapped.
1.95 gboolean gl_read_render_buffer( unsigned char *target, render_buffer_t buffer,
1.96 - int rowstride, int colour_format )
1.97 + int rowstride, int colour_format )
1.100 GLenum type = colour_formats[colour_format].type;
1.101 @@ -159,7 +159,7 @@
1.102 // int size = line_size * buffer->height;
1.103 int glrowstride = (rowstride / colour_formats[colour_format].bpp) - buffer->width;
1.104 glPixelStorei( GL_PACK_ROW_LENGTH, glrowstride );
1.107 glReadPixels( 0, 0, buffer->width, buffer->height, format, type, target );