org.newdawn.slick.util
Class BufferedImageUtil
java.lang.Object
org.newdawn.slick.util.BufferedImageUtil
public class BufferedImageUtil
- extends java.lang.Object
This is a utility class that allows you to convert a BufferedImage into a
texture.
- Author:
- James Chambers (Jimmy), Jeremy Adams (elias_naur), Kevin Glass (kevglass)
|
Method Summary |
static Texture |
getTexture(java.lang.String resourceName,
java.awt.image.BufferedImage resourceImage)
Load a texture |
static Texture |
getTexture(java.lang.String resourceName,
java.awt.image.BufferedImage resourceimage,
int target,
int dstPixelFormat,
int minFilter,
int magFilter)
Load a texture into OpenGL from a BufferedImage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BufferedImageUtil
public BufferedImageUtil()
getTexture
public static Texture getTexture(java.lang.String resourceName,
java.awt.image.BufferedImage resourceImage)
throws java.io.IOException
- Load a texture
- Parameters:
resourceName - The location of the resource to loadresourceImage - The BufferedImage we are converting
- Returns:
- The loaded texture
- Throws:
java.io.IOException - Indicates a failure to access the resource
getTexture
public static Texture getTexture(java.lang.String resourceName,
java.awt.image.BufferedImage resourceimage,
int target,
int dstPixelFormat,
int minFilter,
int magFilter)
throws java.io.IOException
- Load a texture into OpenGL from a BufferedImage
- Parameters:
resourceName - The location of the resource to loadresourceimage - The BufferedImage we are convertingtarget - The GL target to load the texture againstdstPixelFormat - The pixel format of the screenminFilter - The minimising filtermagFilter - The magnification filter
- Returns:
- The loaded texture
- Throws:
java.io.IOException - Indicates a failure to access the resource
Copyright © 2006 New Dawn Software. All Rights Reserved.