constant中的initTexture
来源:互联网 发布:身份证号脱敏算法 编辑:程序博客网 时间:2024/06/15 10:46
public static int initTexture(int drawbleId, Resources resources){int[] textures= new int[1];GLES20.glGenTextures(1, textures,0);int textureId=textures[0];GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, textureId);GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER,GLES20.GL_LINEAR);GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER,GLES20.GL_LINEAR);GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_REPEAT);GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_REPEAT);InputStream is=resources.openRawResource(drawbleId);Bitmap bitmapTmp;try{bitmapTmp=BitmapFactory.decodeStream(is);}finally{try{ is.close(); }catch(Exception e){e.printStackTrace();}}GLUtils.texImage2D(GLES20.GL_TEXTURE_2D,0,bitmapTmp,0);bitmapTmp.recycle();return textureId;}
0 0
- constant中的initTexture
- struts2中的constant
- struts2中的constant
- struts2中的constant
- struts2中的constant详解
- struts2中的constant详解
- struts2中的 常量 constant
- struts2 中的constant
- Struts 2中的constant
- struts中的constant详解
- struts中的constant详解
- Struts2中的constant标记
- struts2中的constant简介
- Struts 2中的constant
- struts2 中的constant
- Struts 2中的constant
- Struts 2中的constant
- struts2中的constant
- LIST
- 数学模板
- Unicode、ANSI相互转换
- HDU3549Flow Problem(模板题)
- ubuntu14.10下java1.7安装
- constant中的initTexture
- http协议中get与post区别详解
- thinkphp_3.2.3实现 Rewrite 模式的配置方法
- 输入法框架
- 关于MVC中Layout母版页文件
- Linux日志清除
- 树莓派玩转WIN10之安装篇
- Integer Game(UVA11489)3的倍数
- 文本过滤