Class ResourcePool
java.lang.Object
dev.prozilla.pine.common.system.resource.ResourcePool
Represents a pool that manages resources efficiently,
by avoiding loading resources multiple times.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ResourcePool
public ResourcePool()
-
-
Method Details
-
loadImage
Loads an image from the resource pool or file system.- Parameters:
path
- Path of the image file- Returns:
- Image
- Throws:
RuntimeException
- If the image file fails to load.
-
loadTexture
Loads a texture from the resource pool or file system.- Parameters:
path
- Path of the texture's image file- Returns:
- Texture
- Throws:
RuntimeException
- If the image file fails to load.RuntimeException
- If OpenGL hasn't been initialized yet.
-
loadFont
-
loadFont
-
clear
public static void clear()Clears the resource pool.
-