I create a integer texture and use PBO to update it,but I found the upload performance is only about 10% of regular texture(the texture element is normalized),why? Below is my texture create & upload code:
// Create :
glGenTextures(1,&m_texInteger);
glBindTexture(GL_TEXTURE_2D,m_texInteger);
glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_REPLACE);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);
glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA32UI_EXT,TWidth,THeight,0,GL_BGRA_INTEGER_EXT,GL_UNSIGNED_BYTE,0);
// Upload :
glBindBuffer(GL_PIXEL_UNPACK_BUFFER,m_pbObject);
BYTE * pDmaAddr = (BYTE*)glMapBuffer(GL_PIXEL_UNPACK_BUFFER,GL_WRITE_ONLY);
CopyMemory(pDmaAddr,m_pImageData,TWidthTHeight4); glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER); glBindTexture(GL_TEXTURE_2D,m_texInteger);
glTexSubImage2D(GL_TEXTURE_2D,0,0,0,TWidth,THeight,GL_BGRA_INTEGER_EXT,GL_UNSIGNED_BYTE,NULL);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER,0);
My card is GF8800GTS,and driver is 6.14.11.7519