I’m currently working on an iOS project which is a sort of a client VNC. The server-client connection is successfully established. The program receives the screen image in RAW format and stocks it in a buffer.
My question is how can I draw the buffer in a UIView so that when de buffer is updated so does the view.
I’ve read the OpenGL ES Programming Guide for iOS
I suppose this is the solution of my problem but I’m really confused. Can someone gives me an example about how to render a buffer in a UIView ? Or if someone has a better solution ?
Finally I create a
CGDataProviderRefand a ‘CGImageRef’ every time when my buffer is updated, then with[imageView setImage:[UIImage imageWithCGImage:imageRef]];I redraw the image manually. I’m quite sure there’s better solutions, I’m open for all discussions.