Search
lxdream.org :: lxdream :: r868:c5b4ed31d819
lxdream 0.9.1
released Jun 29
Download Now
changeset868:c5b4ed31d819
parent867:3af8840d5d8c
child869:b6f38c7ee7a3
authornkeynes
dateFri Oct 10 00:07:54 2008 +0000 (12 years ago)
Update the texture dimensions regardless of whether we created the texture here
or not - safer than depending on the caller to do it
src/drivers/gl_fbo.c
1.1 --- a/src/drivers/gl_fbo.c Tue Oct 07 11:14:49 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 );
.