开发者

HTMLto texture on iPhone

开发者 https://www.devze.com 2023-02-04 14:11 出处:网络
Is there a way to grab the pixels from an UIWebView and render it to an opengl开发者_运维知识库 texture?I don\'t know what it takes to load an opengl texture.But this will convert the data from a view

Is there a way to grab the pixels from an UIWebView and render it to an opengl开发者_运维知识库 texture?


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...

0

精彩评论

暂无评论...
验证码 换一张
取 消