public class GraphicsFactory
extends java.lang.Object
Constructor and Description |
---|
GraphicsFactory() |
Modifier and Type | Method and Description |
---|---|
static Graphics |
getGraphicsForImage(Image image)
Get a graphics context for a particular image
|
static void |
releaseGraphicsForImage(Image image)
Release any graphics context that is assocaited with the given image
|
static void |
setUseFBO(boolean useFBO)
Force FBO use on or off
|
static boolean |
usingFBO()
Check if we're using FBO for dynamic textures
|
static boolean |
usingPBuffer()
Check if we're using PBuffer for dynamic textures
|
public static void setUseFBO(boolean useFBO)
useFBO
- True if we should try and use FBO for offscreen imagespublic static boolean usingFBO()
public static boolean usingPBuffer()
public static Graphics getGraphicsForImage(Image image) throws SlickException
image
- The image for which to retrieve the graphics contextSlickException
- Indicates it wasn't possible to create a graphics context
given available hardware.public static void releaseGraphicsForImage(Image image) throws SlickException
image
- The image to releaseSlickException
- Indicates a failure to release the context