   Texture transfer speed using PBOs
  I am trying to transfer textures to my graphics card as fast as possible using pixel buffer objects (PBOs). According to the pdf at http://developer.nvidia.com/object/fast_texture_transfers.htmlit should be possible to transfer textures to a Geforce 7800GT at 2239MB/s.I can however not get more than 958MB/s on a Geforce 7900GTX.Perhaps someone here could give me some pointers?Source code of my test program follows:-- Snip --#include <stdio.h>#include <time.h>#include <GL/glew.h>#include <GL/glut.h>#include "tga.h"double now() {return 1000.0*((double)clock()/(double)CLOCKS_PER_SEC);}unsigned long frames;double btime;double ftime;rgba8 *image;GLuint hPixelBuffer;GLuint hTexture;void display(void) {  void *pPixelData;  double t = now();  // print fps and bps once every second  if (t-ftime > 1000){    float fps = ((float)frames)/((t-ftime)/1000.0);    float bps = (fps*(float)(1280*720*4));    printf("   frames per second: %f\n", fps);    printf("megabytes per second: %f\n", bps/1000000);    frames = 0;    ftime = t;  }  // Upload image to graphics card  glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, hPixelBuffer);  pPixelData = glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_WRITE_ONLY);  memcpy(pPixelData, image->pixels, 1280*720*4);  glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB);  glBindTexture(GL_TEXTURE_2D, hTexture);  glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1280, 720, GL_BGRA, GL_UNSIGNED_BYTE, 0);  glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0);  // render image to screen  glClear(GL_COLOR_BUFFER_BIT);  glBegin(GL_QUADS);  glTexCoord2f (0.0, 0.0); glVertex2f(0.0, 0.0);  glTexCoord2f (1.0, 0.0); glVertex2f(1280.0, 0.0);  glTexCoord2f (1.0, 1.0); glVertex2f(1280.0, 720.0);  glTexCoord2f (0.0, 1.0); glVertex2f(0.0, 720.0);  glEnd();   glutSwapBuffers();  ++frames;}int main(int argc, char** argv){  glutInit(&argc, argv);  glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);  glutInitWindowSize(1280, 720);  glutCreateWindow("PBO Test");  glutDisplayFunc(display);  glutIdleFunc(display);  glewInit();  image = loadtga("images/Verde_Tronco.tga");  // create PBO  glGenBuffersARB(1, &hPixelBuffer);  glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, hPixelBuffer);  glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_EXT, 1280*720*4, NULL, GL_STREAM_DRAW_ARB);  glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0);  // create texture  glGenTextures(1, &hTexture);  glBindTexture(GL_TEXTURE_2D, hTexture);  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_LINEAR);  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_LINEAR);  glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 1280, 720, 0, GL_BGRA, GL_UNSIGNED_BYTE, 0);  // init opengl  glClearColor(0.3f, 0.3f, 0.3f, 1.0f);  glViewport(0, 0, 1280, 720);  glMatrixMode(GL_PROJECTION);  glLoadIdentity();  gluOrtho2D(0, 1280, 0, 720);  glEnable(GL_TEXTURE_2D);  frames = 0;  btime = ftime = now();  glutMainLoop();}-- Snip --   
  Okay, your code is doing a lot more than simply loading textures from system memory. 2MB/sec is probably what you can do sustained when it is the only thing you are doing. However, you also have included the overhead of rendering a frame and swapping it into the bargain. If you want to benchmark your code accurately, you should test it outside of a render loop, and only test the memory copy portion. Right now you are benchmarking both texture loading and barebones scene rendering at the same time.   