sinsro
sinsro

Reputation: 915

HTMLto texture on iPhone

Is there a way to grab the pixels from an UIWebView and render it to an opengl texture?

Upvotes: 0

Views: 436

Answers (1)

madmik3
madmik3

Reputation: 6983

I don't know what it takes to load an opengl texture. But this will convert the data from a view into a jpeg.

UIGraphicsBeginImageContext(self.bounds.size);
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

sorry for the half answer. hope someone can take it from here...

Upvotes: 1

Related Questions