| Modifier and Type | Field and Description |
|---|---|
| private ColorModel | glAlphaColorModel
The colour model including alpha for the GL image |
| private ColorModel | glColorModel
The colour model for the GL image |
| private HashMap | table
The table of textures that have been loaded in this loader |
| private IntBuffer | textureIDBuffer
Scratch buffer for texture ID's |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private ByteBuffer | Returns: A buffer containing the dataThe image to convert to a texture bufferedImage, Texture The texture to store the data into texture)Convert the buffered image to a texture |
| private int | |
| private static int | Returns: The power of 2The target number fold)Get the closest greater power of 2 to the fold number |
| public Texture | Returns: The loaded textureThe location of the resource to load resourceName)Load a texture |
| public Texture | Returns: The loaded textureThe location of the resource to load resourceName, int The GL target to load the texture against target, int The pixel format of the screen dstPixelFormat, int The minimising filter minFilter, int The magnification filter magFilter)Load a texture into OpenGL from a image reference on disk. |
| private BufferedImage |
| glAlphaColorModel | back to summary |
|---|---|
| private ColorModel glAlphaColorModel The colour model including alpha for the GL image | |
| glColorModel | back to summary |
|---|---|
| private ColorModel glColorModel The colour model for the GL image | |
| table | back to summary |
|---|---|
| private HashMap<String, Texture> table The table of textures that have been loaded in this loader | |
| textureIDBuffer | back to summary |
|---|---|
| private IntBuffer textureIDBuffer Scratch buffer for texture ID's | |
| TextureLoader | back to summary |
|---|---|
| public TextureLoader() Create a new texture loader based on the game panel | |
| convertImageData | back to summary |
|---|---|
| private ByteBuffer convertImageData(BufferedImage bufferedImage, Texture texture) Convert the buffered image to a texture
| |
| createTextureID | back to summary |
|---|---|
| private int createTextureID() Create a new texture ID
| |
| get2Fold | back to summary |
|---|---|
| private static int get2Fold(int fold) Get the closest greater power of 2 to the fold number
| |
| getTexture | back to summary |
|---|---|
| public Texture getTexture(String resourceName) throws IOException Load a texture
| |
| getTexture | back to summary |
|---|---|
| public Texture getTexture(String resourceName, int target, int dstPixelFormat, int minFilter, int magFilter) throws IOException Load a texture into OpenGL from a image reference on disk.
| |
| loadImage | back to summary |
|---|---|
| private BufferedImage loadImage(String ref) throws IOException Load a given resource as a buffered image
| |