gpt4 book ai didi

java - 从 BufferedImage 创建 JOGL 纹理

转载 作者:行者123 更新时间:2023-11-30 07:36:55 24 4
gpt4 key购买 nike

在以前的 JOGL 版本中,我可以使用以下方便的函数从 BufferedImage 创建纹理:

public static Texture makeTextureFromBufferedImage(BufferedImage b) {
return TextureIO.newTexture(b,true);
}

但是现在在最新的 JOGL 版本中,TextureIO.newTexture 方法似乎不再接受 BufferedImage。

那么现在从 BufferedImage 创建纹理的推荐方法是什么?

最佳答案

为了保持简短:改用 AWTTextureIO。

关于java - 从 BufferedImage 创建 JOGL 纹理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3103942/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com