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 1223:61684ca88599
prev1222:a4545699a82b
next1228:8168aa94e6d7
author nkeynes
date Wed Feb 15 18:09:02 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Add extension wrangling for max colour attachments
file annotate diff log raw
1.1 --- a/src/drivers/gl_fbo.c Wed Feb 15 17:54:51 2012 +1000
1.2 +++ b/src/drivers/gl_fbo.c Wed Feb 15 18:09:02 2012 +1000
1.3 @@ -80,7 +80,7 @@
1.4 GLuint fbids[MAX_FRAMEBUFFERS];
1.5 GLuint rbids[MAX_FRAMEBUFFERS*2]; /* depth buffer, stencil buffer per fb */
1.6
1.7 - glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, &gl_fbo_max_attachments);
1.8 + gl_fbo_max_attachments = glGetMaxColourAttachments();
1.9 glGenFramebuffers( MAX_FRAMEBUFFERS, &fbids[0] );
1.10 glGenRenderbuffers( MAX_FRAMEBUFFERS*2, &rbids[0] );
1.11 for( i=0; i<MAX_FRAMEBUFFERS; i++ ) {
1.12 @@ -255,8 +255,8 @@
1.13 }
1.14 glBindTexture( GL_TEXTURE_2D, buffer->buf_id );
1.15 glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL );
1.16 - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP );
1.17 - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP );
1.18 + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
1.19 + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
1.20 glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
1.21 glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
1.22 return buffer;
.