GL_TEXTURE_2D 和 GL_TEXTURE_EXTERNAL_OES 有什么区别 [英] What's the difference between GL_TEXTURE_2D and GL_TEXTURE_EXTERNAL_OES

查看:409
本文介绍了GL_TEXTURE_2D 和 GL_TEXTURE_EXTERNAL_OES 有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Android 开发中的 OpenGL ES 新手.我在研究过程中发现了两种质地:

I'm new to OpenGL ES in android development. I found two types of texture during my study:

  1. GL_TEXTURE_2D
  2. GL_TEXTURE_EXTERNAL_OES

有人告诉我它们彼此不兼容.

I was told that they are not compatible with each other.

我有两个问题:

  1. 它们之间有什么区别?它们是完全不同类型的纹理吗?
  2. GL_TEXTURE_EXTERNAL_OES 纹理是否必须是 YUV 格式?如果不是,是什么决定了数据格式?
  1. What's the difference between them? Are they completely different types of textures?
  2. Does GL_TEXTURE_EXTERNAL_OES texture has to be YUV format? If not, what decides the data format?

推荐答案

它们之间有什么区别?

What's the difference between them?

普通纹理完全由 OpenGL ES 定义、分配和管理.

Normal textures are defined, allocated, and managed entirely by OpenGL ES.

外部纹理在别处定义和分配,并以某种实现定义的方式导入 OpenGL ES.一种常见用途是导入 YUV 视频,因此外部采样器还必须能够处理色彩空间转换和非标准内存布局(例如多平面 YUV 表面).

External textures are defined and allocated elsewhere, and imported into OpenGL ES in some implementation-defined manner. One common use is for importing YUV video, so external samplers also have to be able to handle color-space conversion and non-standard memory layouts (e.g. multi-plane YUV surfaces).

GL_TEXTURE_EXTERNAL_OES 纹理必须是 YUV 格式吗?

Does GL_TEXTURE_EXTERNAL_OES texture has to be YUV format?

没有.系统中的一些外部实体定义了格式——它对应用程序不可见,颜色空间转换由驱动程序堆栈神奇地处理.具体支持哪些格式是实现定义的.

No. Some external entity in the system defines the format - it's invisible to the application, and color space conversion is magically handled by the driver stack. Exactly what formats are supported is implementation-defined.

这篇关于GL_TEXTURE_2D 和 GL_TEXTURE_EXTERNAL_OES 有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆