public class MrResources
extends java.lang.Object
Constructor and Description |
---|
MrResources() |
Modifier and Type | Method and Description |
---|---|
void |
addShaderProgram(MrShaderProgram program)
Adds a new shader program to resources
|
void |
addTexture(MrTexture texture)
Adds a new texture to resources
|
void |
addTextureBitmap(java.lang.String texName,
Bitmap bitmap)
Adds a new bitmap to resources
|
void |
freeResources()
Releases all elements in resources
|
MrShaderProgram |
getProgram(java.lang.String name)
Gets a certain shader program
|
java.util.HashMap<java.lang.String,MrShaderProgram> |
getPrograms()
Gets the loaded shader programs
|
MrTexture |
getTexture(java.lang.String name)
Gets a certain texture
|
java.util.Map<java.lang.String,Bitmap> |
getTextureBitmaps()
Gets the loaded bitmaps
|
java.util.HashMap<java.lang.String,MrTexture> |
getTextures()
Gets the loaded textures
|
public java.util.HashMap<java.lang.String,MrTexture> getTextures()
public MrTexture getTexture(java.lang.String name)
name
- texture namepublic void addTexture(MrTexture texture)
texture
- the new texturepublic MrShaderProgram getProgram(java.lang.String name)
name
- shader program namepublic java.util.HashMap<java.lang.String,MrShaderProgram> getPrograms()
public void addShaderProgram(MrShaderProgram program)
program
- shader program to be addedpublic java.util.Map<java.lang.String,Bitmap> getTextureBitmaps()
public void addTextureBitmap(java.lang.String texName, Bitmap bitmap)
texName
- bitmap filenamebitmap
- bitmappublic void freeResources()