本例和上例Android ApiDemos示例解析(200):Graphics->OpenGL ES->Textured Triangle 非常类似,所不同的是调用图像(Texture)的方法不同。
本例介绍如何使用ETC1 压缩格式的图像,一种方式是从资源文件中读取ETC1格式的图像作为三角形的材质(本例使用res.raw 中的androids.pkm文件),一种是通过代码动态创建ETC1格式的图像。
android.opengl 包中的 ETC1, ETCUtil, ETCUtil.ETC1Texture 用来支持ETC1格式的压缩格式图像,简单的讲,可以把android.pkm 当做android.png ,所不同的是两种图像压缩方法不同。
使用ETC1 图像作为Texture的基本方法如下:
InputStream input = getResources().openRawResource(R.raw.androids);
...
ETC1Util.loadTexture(GLES10.GL_TEXTURE_2D, 0, 0,
GLES10.GL_RGB, GLES10.GL_UNSIGNED_SHORT_5_6_5, input);
分享到:
相关推荐
elasticsearch-2.2.1 elasticsearch-2.2.1 elasticsearch-2.2.1
--$(find darknet_ros)/launch/yolo_v4.launch" />--> <node name="img_test" pkg="img_test" type="target_ROI" output="screen"> <!--功能选择,,value=0 发布compress还原后的图像,value=1制作数据集模式--> ...
$memcache_obj = new Memcache; /* connect to memcached server */ ...$memcache_obj->set('var_key', 'some really big variable', MEMCACHE_COMPRESSED, 50); echo $memcache_obj->get('var_key'); ?>
3-郑志升-3-FlinkAsia企业实践分论坛-B站-_compressed1
A Novel and Efficient Mixed-Signal Compressed Sensing for Wide-Band Cognitive Radio
The RISC-V Compressed Instruction Set ManualThis draft specification may change
All code has been built and tested on iOS 7, Android 4.3, Windows (OpenGL ES 3.0 Emulation), and Ubuntu Linux, and the authors demonstrate how to build OpenGL ES code for each platform. Coverage ...
jquery-1.2-Compressed.rar
jquery插件,web开发js,jquery
Position footer -> Verbatim bits, Aligned offset bits .......15 Match length -> Length header, Length footer ........16 Length header, Position slot ?? Length/Position header...16 Encoding a match...
基于matlab实现高斯BP和压缩传感Gaussian-BP-und-Compressed-Sensing.rar
signed_foomatic-db-compressed-ppds_20200401-1_all.deb
C. Andrew Segall, Rafael Molina, andAggelos K.Katsaggelos
thickbox 3.1源码 不是一行的 thickbox-compressed.js
mix algorithm source code, a good algorithm inside compressed sensing
基于学习的压缩感知红外图像超分辨率方法,赵耀,隋修宝,本文提出了一种基于学习的压缩感知红外图像超分辨率成像方法。首先,我们利用Toeplitz矩阵作为重建模型的感知矩阵。和传统方法比较�
The Exploration and Practice of Apache Flink in Agricultural Bank of ChinaImpact
Trends_DM_2022_Final_Compressed
if($memcache->set('key1',"xian",MEMCACHE_COMPRESSED,60)){ echo 'sucess!'; }//存值,其中xian字符串,也可以为数组,对象,但不能为资源 $val = $memcache->get('key1');//查询获取值 echo $val; $...