久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Opengl ES 2.0:獲取紋理大小和其他信息

Opengl ES 2.0 : Get texture size and other info(Opengl ES 2.0:獲取紋理大小和其他信息)
本文介紹了Opengl ES 2.0:獲取紋理大小和其他信息的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

問題的上下文是 Android 環(huán)境中的 OpenGL ES 2.0.我有質(zhì)感.顯示或使用它沒有問題.

The context of the question is OpenGL ES 2.0 in the Android environment. I have a texture. No problem to display or use it.

有沒有一種方法可以從它的綁定id開始知道它的寬度和高度以及其他信息(如內(nèi)部格式)?

Is there a method to know its width and height and other info (like internal format) simply starting from its binding id?

我需要在不知道紋理大小的情況下將紋理保存到位圖.

I need to save texture to bitmap without knowing the texture size.

推薦答案

不在 ES 2.0 中.功能不存在實(shí)際上有點(diǎn)令人驚訝.可以獲取渲染緩沖區(qū)的大小,但不能獲取紋理的大小,這似乎不一致.

Not in ES 2.0. It's actually kind of surprising that the functionality is not there. You can get the size of a renderbuffer, but not the size of a texture, which seems inconsistent.

唯一可用的是您可以使用 glGetTexParameteriv() 獲得的值,即紋理的 FILTERWRAP 參數(shù).

The only thing available are the values you can get with glGetTexParameteriv(), which are the FILTER and WRAP parameters for the texture.

它仍然不在 ES 3.0 中.僅在 ES 3.1 中,添加了 glGetTexLevelParameteriv(),它使您可以訪問您正在尋找的所有值.例如獲取當(dāng)前綁定紋理的寬高:

It's still not in ES 3.0 either. Only in ES 3.1, glGetTexLevelParameteriv() was added, which gives you access to all the values you're looking for. For example to get the width and height of the currently bound texture:

int[] texDims = new int[2];
GLES31.glGetTexLevelParameteriv(GLES31.GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, texDims, 0);
GLES31.glGetTexLevelParameteriv(GLES31.GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, texDims, 1);

這篇關(guān)于Opengl ES 2.0:獲取紋理大小和其他信息的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環(huán)繞文本?)
MyBatis, how to get the auto generated key of an insert? [MySql](MyBatis,如何獲取插入的自動(dòng)生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數(shù)據(jù)庫(kù))
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對(duì)象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 亚洲三级黄色片 | 亚洲成人精品 | 免费观看a级片 | 80日本xxxxxxxxx96 国产成人在线免费视频 | 看黄色大片 | 天天干天天操天天干 | 精品久久久久久久久久久久久 | 免费av在线播放 | 黄色片国产 | 久久精品欧美一区二区三区不卡 | 欧美综合在线视频 | 精品免费在线观看 | 国产在线不卡视频 | 久久一区精品 | 日韩久久网 | 欧美日韩中文字幕在线观看 | 亚洲免费精品视频 | 就要干就要操 | 国产精品久久久国产盗摄 | 国产伊人网 | 激情六月婷婷 | 欧美黄色片网站 | 欧美日韩精品在线 | 在线看日韩 | 两性午夜视频 | 成年人毛片 | 久久91视频 | 中文字幕日韩高清 | 99久久国产视频 | 青青草国产成人av片免费 | 国产黄色大片 | 波多野结衣av在线播放 | 黄色三级视频在线观看 | 黄色大片在线播放 | 午夜影院免费 | 在线观看日韩 | 日韩精品一区二区三区免费视频 | 男女啪啪网站 | 日本国产视频 | 国产理论视频 | 国产一区二区三区免费 |