draw ofImage after VBO (urgent help!!)

Sorry for duplicated post, but it is a little urgent question. Since I am showing a this work in one week.

I am using VBO to create a terrain based on height map, the vertex amount is optimized to be around 1.5 million. I have depth testing on and a FBO texture bind on the terrain. If I just render the terrain, it runs very fast at 180fps (without ofSetVerticalSync), but if I add even a tiny regular ofImage after the terrain not using VBO, the frame rate drops to 20fps. And CPU consumed by this program jumps from 30.0 to 90.0 (I read this from CPU monitor).

here is Memo’s reply from last post: "
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? "

1- I have depth testing on.
2- I tried draw the terrain large and small, the result are the same,
3- I tried to turn off the FBO texture on Terrain, the result is the same,
4- if no ofImage is drawn, the frame rate is 180fps, else it drops to 20fps.

Is there a way to isolate the VBO with other regular OF or GL texture/image? Is there anything I foget to turn off?

Here is the code in draw()

  
  
  
   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();  
  
    OFImage.draw(10,10,250,250);  // But this drops the frame rate after VBO  
  
  

hi,

more or less impossible to say what’s going on here based on this. you could try downloading a free trial of gDEBugger: http://www.gremedy.com/products.php

and see what that gives you…

is there any chance you can post a small example that shows this (ie, one that we can easily run). I’m curious, as there is very little that drawing an ofImage would do, but it’s useful to see it first hand to offer some feedback.

thanks!
zach