用户登录
用户注册

分享至

opengl es纹理

  • 作者: 湘菜大师傅
  • 来源: 51数据库
  • 2020-10-02
(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 不知道 你是不是要的这种效果
软件
前端设计
程序设计
Java相关