mikera
mikera

Reputation: 106401

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:

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.

So what is now the recommended way to create a Texture from a BufferedImage?

Upvotes: 2

Views: 1627

Answers (1)

andys
andys

Reputation: 71

To keep it short: Use AWTTextureIO instead.

Upvotes: 4

Related Questions