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

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

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

問題描述

問題的上下文是 Android 環(huán)境中的 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 中.功能不存在實際上有點令人驚訝.可以獲取渲染緩沖區(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(),它使您可以訪問您正在尋找的所有值.例如獲取當前綁定紋理的寬高:

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模板網(wǎng)!

【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(liá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,如何獲取插入的自動生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數(shù)據(jù)庫)
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 精品综合| 久久久久久久夜 | 色接久久 | 狠狠躁夜夜躁人人爽天天高潮 | 欧美日韩综合 | 欧美一区二区三区在线免费观看 | 午夜看片网站 | 成人午夜网| 精品影院 | 午夜精品一区二区三区免费视频 | 国产精品一区二区在线免费观看 | 毛片网站免费观看 | 国产露脸国语对白在线 | 欧美视频福利 | av网站在线播放 | 欧美日韩一 | 久久久国产一区 | 第四色狠狠 | 国产一二区在线 | 青青草综合 | 国产激情在线播放 | 911精品国产 | 在线中文视频 | 国产电影一区二区 | 亚洲精品日韩欧美 | 欧美久久不卡 | 国产午夜精品一区二区三区 | 午夜资源| 国产精品成人在线 | 国产高清久久久 | 欧美精品一区二区三区在线播放 | 一区二区在线 | 黄网免费看 | 人人干人人艹 | 亚洲一区二区av | 日本精品免费在线观看 | 亚洲色欲色欲www | 日日夜夜免费精品视频 | 精品成人 | 国产精品免费一区二区 | 狠狠干影院 |