简体   繁体   English

从BufferedImage创建JOGL纹理

[英]Creating a JOGL texture from a BufferedImage

In previous versions of JOGL, I could create a Texture from a BufferedImage using the following handy function: 在JOGL的早期版本中,我可以使用以下便捷功能从BufferedImage创建一个Texture:

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

Now however in the latest JOGL release the TextureIO.newTexture method doesn't seem to accept a BufferedImage any more. 但是,现在在最新的JOGL版本中,TextureIO.newTexture方法似乎不再接受BufferedImage。

So what is now the recommended way to create a Texture from a BufferedImage? 那么,现在建议从BufferedImage创建纹理的方法是什么?

为了简短起见:请改用AWTTextureIO。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM