How can I print a buffer in my stdout for debugging purposes? I'm currently a beginner working with OpenGL within XCode (for an iOS app) and have the below lines of code.
GLubyte *buffer = (GLubyte *)malloc(myDataLength);
glReadPixels(0, 0, 320, 480, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
I'd simply like to print to the console the buffer although when trying: fprintf(stderr, buffer);
I receive an error "No matching function for call to 'fprintf'.