texture是被创建来填充Image对象的,Texture和Image的关系就好像是本地的BitmapData和Bitmap的关系一样。Texture类包含如下的apis:

•  base : The Stage3D texture object the texture is based on.
•  dispose : Disposes the underlying texture data.
•  empty : Returns a Texture object out of dimensions (width and height).
•  frame : The texture frame (see class description).
•  fromBitmap : Returns a Texture object out of a Bitmap object. This Bitmap object can be embedded or loaded
dynamically.
•  fromBitmapData : Returns a Texture object out of a BitmapData object.
•  fromAtfData : Allows the use of a compressed texture using the ATF (Adobe Texture Format). Compressed
textures allows you to save a lot of memory especially on constrained environments like mobile devices.
•  fromTexture : Allows the use of a texture and returns a new texture.
•  height : The height of the texture in pixels.
•  mipmapping : Indicates if the texture contains mip maps.
•  premultipliedAlpha : Indicates if the alpha values are premultiplied into the RGB values.
•  repeat : Indicates if the texture should repeat like a wallpaper or stretch the outermost pixels.
•  width : The width of the texture in pixels.

你的纹理可以使用不同的图片格式,下面是它支持的文件格式列表:

•  PNG : As alpha channel is often required, PNG is one of the most common file format used for textures.
•  JPEG : The classic JPEG format can also be used. Remember that on the GPU the image will be decompressed,
so using JPEG will not limit the memory usage and you will not be able to use transparency in your textures.
•  JPEG-XR : JPEG XR (abbr. for JPEG extended range[4]) is a still-image compression standard and file format
for continuous tone photographic images, based on technology originally developed and patented by Microsoft
under the name HD Photo (formerly Windows Media Photo). It supports both lossy and lossless compression,
and is the preferred image format for Ecma-388 Open XML Paper Specification documents.
•  ATF : Adobe Texture Format. This is the best file format for the best compression. ATF files are primarily a
file container to store lossy texture data. It achieves its lossy compression through to the use of two common
techniques: JPEG-XR1 compression and block based compression. JPEG-XR compression provide a
competitive method to save storage space and network bandwidth. Block based compression provides a way to
reduce texture memory usage on the client, at a fixed ratio of 1:8 compared to RGBA textures. ATF supports
three types of block based compression: DXT12, ETC13 and PVRTC4.

下面让我们来更深入的了解一下纹理的概念,并揭开gpu处理图片的本质-mip映射(什么是mip映射呢?看链接http://zhidao.baidu.com/question/14496010)。mip映射是一个很重要并且容易弄懂的概念。将一个texture缩小成不同的版本就是mipmap。

转载于:https://www.cnblogs.com/klh5211314/p/3158696.html

starling教程-纹理(Texture)相关推荐

  1. 【Unity3D】纹理贴图 ( 纹理 Texture 简介 | 为 3D 模型设置纹理贴图 )

    文章目录 一.纹理 Texture 简介 二.为 3D 模型设置纹理贴图 一.纹理 Texture 简介 上一篇博客 [Unity3D]材质 Material ( 材质简介 | 创建材质 | 设置材质 ...

  2. OpenGL入门(四)之纹理Texture

    本系列文章为Learn OpenGL个人学习总结! OpenGL入门(一)之认识OpenGL和创建Window OpenGL入门(二)之渲染管线pipeline,VAO.VBO和EBO OpenGL入 ...

  3. 二维纹理 Texture 2D

    二维纹理 Texture 2D 原文链接http://www.ceeger.com/Manual/Textures.html Textures bring your Meshes, Particles ...

  4. 纹理 Texture

    [Toc] 1. 纹理的理论 纹理是一个2D图片(甚至也有1D和3D的纹理),它可以用来添加物体的细节:可以想象纹理是一张绘有砖块的纸,无缝折叠贴合到你的3D的房子上,这样你的房子看起来就像有砖墙外表 ...

  5. Qt-OpenGL-03 纹理Texture

    写在开头:文章是基于纹理 - LearnOpenGL CN 教程的学习记录,强烈建议在网站上先弄清楚原理再看此文章.以Qt-GL窗口代替GLFW的写法,Qt库中一些类代替教程中的类,一起入坑. 效果图 ...

  6. 纹理(Texture)与渲染(Render)

    视频OpenGL渲染与SDL渲染:不同视频的编码与解码.OpenGL更好的显示视频的方式也是通过纹理(Texture). > 纹理(Texture)和表面(Surface)的区别与联系:  1. ...

  7. ECCV / TNNLS 20 - 如何在异常检测中利用“结构structure - 纹理texture”一致性【P-Net,MemSTC-Net】

    文章目录 前言 P-Net MEMSTC-Net 总结 前言 不管是医学图像还是工业图像领域,异常检测都是非常重要的一个研究方向(在训练时只有正常样本,测试时需要模型判断输入样本是否存在异常).存在一 ...

  8. 滤镜之纹理Texture特效

    很多图像或者视频上叠加上一些特定的纹理,那么这些纹理是怎么产生的呢?这里牵涉到一个叫做柏林噪声函数的概念,具体的可以参考: http://wenku.baidu.com/view/a6280c2bbd ...

  9. 【OpenGL】OpenGL入门之纹理(Texture)

    目录 纹理 纹理环绕方式 纹理过滤 多级渐远纹理(Mipmap) 加载与创建纹理 stb_image.h 生成纹理 应用纹理 纹理单元 参考 纹理   在此之前,我们已经可以为每个顶点添加颜色来增加图 ...

最新文章

  1. 数据库逻辑删除的sql语句_通过数据库的眼睛查询sql的逻辑流程
  2. 优化网站设计系列文章总结和导读
  3. [转]数据库连接方式读取不到Excel数据值的解决方法
  4. 读书笔记《Redis入门指南》
  5. FastReport 2021版中文手册PDF下载
  6. 三星S3 939/9300 android 4.3 如何打开开发者模式
  7. win7无法查看win10工作组计算机,解决:win7系统工作组计算机无法访问我的计算机(图文)...
  8. python 拆分excel单元格内容_Excel拆分单元格与把一个单元格内容拆分到多个单元格...
  9. 计算机毕业设计java+ssm田园乐农家院团建平台_农家乐网站
  10. 初识Java+JDK的安装与环境变量的配置+IDEA的安装
  11. Ajax异步配合数据字典完成下拉选框
  12. 解决耳机插在主机上没有声音的问题
  13. python kfold交叉验证_KFold交叉验证
  14. 如何评价 Richard Stallman?
  15. Python如何在函数内部使用全局变量
  16. iReport属性为空时报表显示空白
  17. 物流数据可视化大屏(智慧物流)
  18. shell脚本提取一个文件中的合法email地址
  19. 日常用语--打电话(整理)
  20. arduino实战 2——利用arduino做一个人体传感器

热门文章

  1. 微服务网关 Kong 科普
  2. 如果你没有考上985,没有考上211……
  3. Consul入门02 - 运行Consul代理
  4. JVM:四种引用总结
  5. linux:su认证失败
  6. 利用计算机进入,1、在第四代计算机期间内,计算机的应用逐步进入到()
  7. 2019年Q3:全球超大规模数据中心数量增至504个
  8. 如果机房的线路老化了要怎么做才对?
  9. oracle供需平衡,OracleR12_MRP_功能介绍_V2.ppt
  10. 成功解决ValueError: DataFrame.dtypes for label must be int, float or bool