   FBO: Performance issues with G_TEXTURE_2D and color + depth/stencil
  Hi, during writing my fbo code part I came across a problem. I create my fbo, color and depth/stencil target with the follorwin code part//creating FboGLuint mFboId;glGenFramebuffersEXT(1, &mFboId);glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mFboId);//creating color targetGLuint mGlTextureId;GLenum mGlTexTarget = GL_TEXTURE_RECTANGLE_ARB;glGenTextures(1, &mGlTextureId);glBindTexture(mGlTexTarget, mGlTextureId);glTexImage2D(mGlTexTarget, mMipLevel, GL_RGBA8,  mWidth, mHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);glTexParameterf(mGlTexTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);glTexParameterf(mGlTexTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);glTexParameteri(mGlTexTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR);glTexParameteri(mGlTexTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);glGenerateMipmapEXT(mGlTexTarget);glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, mGlTexTarget, mGlTextureId, 0 );//creating depth targetGLuint mGLDepthId;glGenTextures(1, &mGLDepthId);glBindTexture(GL_TEXTURE_RECTANGLE_ARB, mGLDepthId);glTexParameterf(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR);glTexParameterf(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_LINEAR);glTexParameterf(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);glTexParameterf(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL);glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_DEPTH24_STENCIL8_EXT, mWidth, mHeight, 0, GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, NULL);glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_RECTANGLE_ARB, mGLDepthId, 0);glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, GL_TEXTURE_RECTANGLE_ARB, mGLDepthId, 0);This code snipped works very good when it comes to performance, but if I change every occurance from GL_TEXTURE_RECTANGLE_ARB to GL_TEXTURE_2D the performance drops from ~200fps to 25fps.This strange behavior doesn't change if I change the depth attachment to a renderbuffer or remove the stencil part and use GL_DEPTH_COMPONENT. When I use texture_2d the framerate drops immediately if the depth buffer is attached (when I'm only rendering into the color buffer, the framerate is as fast as it is with rectangle and depth buffer).This occurs with a nvidia 7600Gt and a Quadro FX 3400 with the latest nvidia drivers. only on a 8800gtx the fps stay the same with both options.Does anybody know why, the rectangle version is faster, or do i have some wrong parameters in my code snippet, that makes my application perform that slow on non 8series gforce?yoursg3k   
  i dont think GL_TEXTURE_RECTANGLE_ARB supports mipmapsthus i assumewhen u update the FBO wih texture2d all the mipmaps are created each frame (hence the slowdown);  My home video card had a massive slow down if i use non-power-of-2 with GL_TEXTURE_2D as opposed to GL_TEXTURE_RECTANGLE_ARB, so it could be a case of NPOT2 not being handled as desired, or as zedz said, auto mipmap generation.If you're using the fbo for fullscreen effects, you would be better of disabling mip-mapping altogether for those textures regardless (although there is potential for simple Depth-of-feild from using mipmaps)   