Search
lxdream.org :: lxdream/src/drivers/gl_fbo.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/gl_fbo.c
changeset 443:1163eb5c0590
prev438:f4d7774967d1
next445:75c668cdfdc0
author nkeynes
date Sat Oct 13 04:01:02 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Add ability to track the last displayed buffer, and handle expose/resize
events appropriately
file annotate diff log raw
1.1 --- a/src/drivers/gl_fbo.c Thu Oct 11 11:08:36 2007 +0000
1.2 +++ b/src/drivers/gl_fbo.c Sat Oct 13 04:01:02 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: gl_fbo.c,v 1.4 2007-10-11 11:08:36 nkeynes Exp $
1.6 + * $Id: gl_fbo.c,v 1.5 2007-10-13 04:01:02 nkeynes Exp $
1.7 *
1.8 * GL framebuffer-based driver shell. This requires the EXT_framebuffer_object
1.9 * extension, but is much nicer/faster/etc than pbuffers when it's available.
1.10 @@ -245,14 +245,16 @@
1.11 {
1.12 glFinish();
1.13 glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, 0 ); // real window
1.14 + glDrawBuffer( GL_FRONT );
1.15 + glReadBuffer( GL_FRONT );
1.16 + gl_display_tex_rectangle( buffer->buf_id, buffer->width, buffer->height, TRUE );
1.17 + /*
1.18 glViewport( 0, 0, video_width, video_height );
1.19 glEnable( GL_TEXTURE_RECTANGLE_ARB );
1.20 glBindTexture( GL_TEXTURE_RECTANGLE_ARB, buffer->buf_id );
1.21 glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
1.22 glTexParameteri( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
1.23 glTexParameteri( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
1.24 - glDrawBuffer( GL_FRONT );
1.25 - glReadBuffer( GL_FRONT );
1.26 glDisable( GL_ALPHA_TEST );
1.27 glDisable( GL_DEPTH_TEST );
1.28 glDisable( GL_SCISSOR_TEST );
1.29 @@ -278,6 +280,7 @@
1.30 glEnd();
1.31 glDisable( GL_TEXTURE_RECTANGLE_ARB );
1.32 glFlush();
1.33 + */
1.34 return TRUE;
1.35 }
1.36
.