   OGL FBO RTT  Troubles
  I am trying to use a Frame Buffer Object in OpenGL.  Essentially, I want to do a Render-To-Texture with a shader that i've written, and then use that shader-rendered-texture as a texture on a billboard.  I'm having a couple of issues that are confounding me, however.First of all for the RTT I call glBindFrameBuffer to bind the frame buffer I've set up (no renderbuffers attached, such as depth buffer; just a glFramebufferTexture2DEXT)  Then I call glPushAttrib(GL_VIEWPORT_BIT) to save my viewport, and then call glViewport with the size of my texture (32x32).  I set a clear color and clear the texture, then set my shader with glUseProgramObjectARB(gl_program).  (I've tested that the shader works as expected in straightforward rendering).  With the shader set I draw a single quad on the texture, then glPopAttrib so that the viewport will be reset for the regular rendering to the screen.  Then I draw a billboard using the texture that's associated with the frame buffer I just did an RTT with.There are two problems with the result I'm getting.  First of all, when drawing the quad, I use glVertex2i, except the input value seem to correspond with what the viewport is in the regular render-to-screen (100x100, a tiny viewport) rather than what I've just set it to for the render-texture (32x32, size of the RTT).  In other words, 50x50 puts the vertex at the middle of the texture rather than 16x16.  The rendering itself is of a 32x32 image, as I can clearly see all the pixels as blocks, but the numbers passed to glVertex2i don't match up to 32x32.Secondly, I want to turn off the shader and use the texture that I've just rendered on a new billboard(the "final quad").  If I call glUseProgramObjectARB(NULL) after the glEnd of the RTT, then the rendered texture on the final quad comes out all black.  If I don't call that, then the correctly shader-drawn RTT gets used as the textre, but instead of clearing the back of the final quad, it uses the shader on that as well.  Why does glUseProgramObjectARB(NULL) erase what I've done on the RTT?   