ofImage slows down the performance of VBO (vertex array)

I have a VBO in draw() runs at about 29 fps, the vertex number (vhVertexCount) is about 6,300,000. I can draw a regular ofImage before the VBO with the same frame rate. However, as soon as I draw the ofImage directly after this chunk code, the frame rate drops down to less than 1fps:

  
  
         //if I put this ofImage before VBO, it would not affect the performance significantly   
        // map.draw(10,10,250,250);    
  
        glEnableClientState(GL_TEXTURE_COORD_ARRAY);  
	glEnable(GL_TEXTURE_2D);  
        moonTextureFBO.bind();  
	  
	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);  
        moonTextureFBO.unbind();  
  
        map.draw(10,10,250,250);  // But this drops the frame rate after VBO  
  
  

I think I unbinded the buffer and disabled everything I enabled. Why image draw after VBO will slow things down so terribly? What I am missing?

do you have depth testing on? and are the 6.3M million things being drawn large and with alpha? fillrate (number of pixels being drawn to screen) can also be a bottle neck in many instances. If the answer to the above questions is yes, then it is quite expected. If you draw the map first, and if a lot of the 6.3M million things is actually behind the map, then they won’t be drawn to the screen at all. they will still be processed, but not rendered. What kind of performance do you get if no image is drawn at all?

Yes, I have depth testing on. Actually the 6.3 million vertexes is making a terrain based on height map, so I have texture bind on the terrain. This time I optimize the mesh of terrain and reduced the vertexes to 1.5 million. if I do not draw anything other than the terrain, it runs at about 58 fps, but if I draw anything else (like a ofImage) either before or after the VBO terrain. The fps drops to about 24, which is acceptable. But the I monitored the CPU of my macBookPro, when drawing only the terrain, the program consumes only 15% CPU (I guess the graphic card taking care many thing), but as soon as I turn on a ofImage not using VBO, the program consume about 60% CPU.

I am going to show this program in a exhibition, so I am worried about the over heat issue. Is there a way to prevent this happen? What is the best way to draw regular ofImage next to VBO?

Thanks!!