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 868:c5b4ed31d819
prev863:a5e5310061e2
next877:8331f4aa3616
author nkeynes
date Fri Oct 10 00:07:54 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Update the texture dimensions regardless of whether we created the texture here
or not - safer than depending on the caller to do it
file annotate diff log raw
1.1 --- a/src/drivers/gl_fbo.c Sun Sep 28 01:09:51 2008 +0000
1.2 +++ b/src/drivers/gl_fbo.c Fri Oct 10 00:07:54 2008 +0000
1.3 @@ -228,12 +228,12 @@
1.4 GLuint tex;
1.5 glGenTextures( 1, &tex );
1.6 buffer->buf_id = tex;
1.7 - glBindTexture( GL_TEXTURE_RECTANGLE_ARB, tex );
1.8 - glTexImage2D( GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL );
1.9 } else {
1.10 buffer->buf_id = tex_id;
1.11 glBindTexture( GL_TEXTURE_RECTANGLE_ARB, tex_id );
1.12 }
1.13 + glBindTexture( GL_TEXTURE_RECTANGLE_ARB, buffer->buf_id );
1.14 + glTexImage2D( GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL );
1.15 glTexParameteri( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP );
1.16 glTexParameteri( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP );
1.17 glTexParameteri( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
.