Hi, Dear All!

I've now stuck on a point of dealing with pbo object.

I've written the following code,

Code :
GLubyte data[width*height];
 
glGenBuffers(1,&pixelPackBuffer);
glBindBuffer(GL_PIXEL_PACK_BUFFER,pixelPackBuffer);
glBufferData(GL_PIXEL_PACK_BUFFER,width*height,data,GL_STATIC_READ);
glReadPixels(0,0,width,height,GL_STENCIL_INDEX,GL_UNSIGNED_BYTE,BUFFER_OFFSET(0));

but when I insert a breakpoint to view the content of the array data, found nothing was read. Any idea?
Thanks in advance!