openGL ES截屏
来源:互联网 发布:js实现加载的图片转动 编辑:程序博客网 时间:2024/06/06 01:35
先上截屏代码:
- (UIImage*)snapshotInternalOnIOS7AndLater
{
UIGraphicsBeginImageContextWithOptions(self.bounds.size, NO, 0.0);// Render our snapshot into the image context[self drawViewHierarchyInRect:self.bounds afterScreenUpdates:NO];// Grab the image from the contextUIImage *complexViewImage = UIGraphicsGetImageFromCurrentImageContext();// Finish using the contextUIGraphicsEndImageContext();return complexViewImage;
}
/*self是当前要截屏的部分
**/
我要做的是对一个用OpenGL ES渲染的播放器截屏,用正常的OpenGL截屏代码(比如这个:http://blog.csdn.net/meegomeego/article/details/8089433)在iPhone5s以上的设备上没问题,但是在iPhone5、4s及4上截屏出来的是黑屏,一直没找到原因(这个播放器是百度封装的.a库,看不到播放器的源码,所以debug无从搞起)。然后在github上找了一个开源的播放器(https://github.com/Bilibili/ijkplayer),在里面扒除了上面的截屏代码,可以用,但是我没搞懂OpenGL ES代码为什么在iPhone5上拿不到数据,望看到的大神帮忙解惑~
0 0
- openGL ES截屏
- OPENGL ES
- OpenGL ES
- OpenGL ES
- opengl es
- OpenGL ES
- OpenGL ES
- opengl es
- OpenGL ES
- OpenGL ES
- OpenGL ES
- opengl ES
- openGL ES
- opengl es
- OpenGL ES
- OpenGL ES
- OpenGL ES
- OpenGL ES
- STC12C5A60S2
- 关于qt的问题构造函数的问题
- Android Studio 模拟器中文显示乱码解决方案
- shell的数值计算,小数计算
- mysql基准测试 -benchmarks
- openGL ES截屏
- TCP之client.c和common.h
- 手动编译安装LAMP架构,并且实现nagios图形化监控(一)
- Java学习之路0727(十一)(正则表达式、线程)
- IOS-动画Animation
- 黑马程序员---函数的相关知识
- HTML5表格的介绍与使用
- 黑马程序员——自学总结(七)图形用户界面GUI
- 噩梦 游戏结束 检测血量执行动画