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

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

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

問題描述

問題的上下文是 Android 環境中的 OpenGL ES 2.0.我有質感.顯示或使用它沒有問題.

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開始知道它的寬度和高度以及其他信息(如內部格式)?

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 中.功能不存在實際上有點令人驚訝.可以獲取渲染緩沖區的大小,但不能獲取紋理的大小,這似乎不一致.

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 參數.

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(),它使您可以訪問您正在尋找的所有值.例如獲取當前綁定紋理的寬高:

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);

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

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

相關文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環繞文本?)
MyBatis, how to get the auto generated key of an insert? [MySql](MyBatis,如何獲取插入的自動生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數據庫)
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 91视频亚洲| 亚洲国产成人精品女人久久久 | 91香蕉| 特级毛片www | 超碰在线97国产 | 日韩视频区 | 狠狠久 | 色一级片 | 激情在线视频网站 | 亚洲国产精品一区二区久久 | 天天干com| 一级黄在线观看 | 国产精品久久久久久238 | 日本午夜网 | 免费在线观看成年人视频 | 在线a视频网站 | 日韩视频二区 | 黄色片亚洲 | 中文字幕在线观看一区 | 91免费观看视频 | 中文字幕视频在线免费 | 精品久久久久久18免费网站 | 91精品麻豆日日躁夜夜躁 | 精品91 | 日韩av啪啪网站大全免费观看 | 亚洲一区国产精品 | 亚洲精品视频免费 | 成人一区av | av网站免费在线观看 | 亚洲精品1 | 国产一级免费视频 | 一级黄色片免费在线观看 | 免费网站国产 | 久久久久国产精品 | 精品视频一区二区三区 | 老牛影视av一区二区在线观看 | 九九热在线视频 | 羞羞视频免费观看 | 综合久久综合久久 | 成人免费视频在线观看 | 91久久 |