bind ofFBOTexture with Vertex buffer object (VBO)

I am trying to map a dynamic texture onto a terrain created by vertex buffer (VBO). The off screen texture can be displayed by the draw() function separately, but when I map it on the terrain nothing is displayed on the surface of the terrain. The Here is the code, what do I miss here ?

  
  
   glEnableClientState(GL_TEXTURE_COORD_ARRAY);  
   glEnable(GL_TEXTURE_2D);  
  
   testFBO.bind();   // trying bind ofxFBOTexture on to the terrain created by VBO  
  
   glBindBufferARB(GL_ARRAY_BUFFER_ARB, vhVBOTexCoords);  
   glTexCoordPointer(2, GL_FLOAT, 0, (char *) NULL);     
   glEnableClientState(GL_VERTEX_ARRAY);  
     
   glBindBufferARB(GL_ARRAY_BUFFER_ARB, vhVBOVertices);  
   glVertexPointer(3, GL_FLOAT, 0,(char *) NULL);     
   glDrawArrays(GL_TRIANGLES , 0, vhVertexCount );     
     
   glDisableClientState(GL_VERTEX_ARRAY);  
   glDisable(GL_TEXTURE_2D);  
   glDisableClientState(GL_TEXTURE_COORD_ARRAY);  
   glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);      //  unbind the buffer for other drawing  
     
   testFBO.unbind();  
  
     
   testFBO.begin();     
  
// ... stuff to modify the off screen texture  
  
   testFBO.end();  
  
   testFBO.draw(0,0 );    
  
  
  

Same problem over hereā€¦ any ones know how to fix it?

Bind method probably is what it says it is. It is binding the fbo not the attached texture(s)
Look for other method like getTextureId or something close to that.

Edit:
From the code at github i can see getTextureReference(). Use it to get access to attached textures and bind those.