(0)在类的成员函数里,定义一个int textureId,作为纹理的id;
(1)在onsurfacecreated相关初始化的函数里,创建一张纹理
1.1 glGenTexture申请一个id
1.2 bind texture
1.3 glTexImage()分配一张空纹理
1.4 set texture parameter 设置纹理相关参数
(2)在onDrawFrame等回调函数里
2.1 bind texture帮顶纹理
2.2 glTexSubImage更新纹理,用你每帧截取的画面
2.3 绘制
(3)在onsurfacedestroyed相关函数,释放资源。
仅供参考。
http://www.oschina.net/question/4873_28327 不知道 你是不是要的这种效果
Photoshop|
Dreamweaver|
SVG|
WebGL|
Visual Studio|
PowerDesigner|
Eclipse|
Git|
Apache Ant|
Atom|
Composer|
CodeSmith|
Flex|
Gradle|
Maven|
Sublime Text3|
SVN|
Tableau|
Vim|
Chrome开发者工具|
OpenGL|
Unity|
Direct3D|
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....