/*Read values back*/
/*Set the target framebuffer to read*/
glReadBuffer(GL_FRONT);
/*Read the packet payload from framebuffer to PBO*/
glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, pboread);
glReadPixels(0,0,size,noOfpacket,GL_RED,GL_UNSIGNED_BYTE,0);
checkError("Readpixel");
printf("Data after roundtrip:\n");
/*Map the PBO to process the data by CPU*/
glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, pboread);
glBufferDataARB(GL_PIXEL_PACK_BUFFER_ARB,noOfpacket*size,result,GL_STREAM_READ_ARB);
for (i=0; i<noOfpacket*size; i++)
printf("%c",result[i]);
printf("\n\n");
glUnmapBufferARB(GL_PIXEL_PACK_BUFFER_ARB);