Andreas K
06-22-2010, 10:39 PM
For offscreen rendering I do the following:
glGenFramebuffersEXT(1, &myFBO);
2) Bind the framebuffer object
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, myFBO);
3) Attach a texture to the FBO
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, myTexture, 0);
Question: I saw that texture and buffer must be same size.
But my texture will be scaled. So can I then just do a
SDL_CurrentVideo->glBindTexture( GL_TEXTURE_2D, texture->Id() );
paintInfo->SetOpenGLTextureMode( Alpha(), cForm, xForm.IsScaled(), texture );
even if source texture (unscaled) is smaller than buffer?
andreas
glGenFramebuffersEXT(1, &myFBO);
2) Bind the framebuffer object
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, myFBO);
3) Attach a texture to the FBO
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, myTexture, 0);
Question: I saw that texture and buffer must be same size.
But my texture will be scaled. So can I then just do a
SDL_CurrentVideo->glBindTexture( GL_TEXTURE_2D, texture->Id() );
paintInfo->SetOpenGLTextureMode( Alpha(), cForm, xForm.IsScaled(), texture );
even if source texture (unscaled) is smaller than buffer?
andreas