 |
BARE2D
|
|
Go to the documentation of this file.
59 GLenum minMagFilter = GL_LINEAR,
60 unsigned int channels = 4,
61 GLenum format = GL_RGBA);
static void setAssetsPathPrefix(std::string prefix)
Changes the prefix that will be prepended to all paths when resources are loaded.
Essentially just a wrapper for the SDL TTF_Font type.
static Cache< std::string, LuaScript > * m_scripts
static Cache< std::string, Sound > * m_sounds
const char * vertShaderSource
static Cache< std::string, Texture > * m_textures
static std::string m_assetsPathPrefix
The texture struct holds very basic stuff - the filepath, width, height, and ID,.
static Sound loadSound(std::string &soundPath)
Loads a sound from the filepath given from the cache or from the file if the cache doesn't contain it...
static MutableTexture * createMutableTexture(std::string &textureName, unsigned int width, unsigned int height, GLenum minMagFilter=GL_LINEAR, unsigned int channels=4, GLenum format=GL_RGBA)
Creates a new mutable texture, or replaces one that exists with a new texture.
static ShaderProgram loadShadersFromSource(std::string &vertShaderSource, std::string &fragShaderSource)
Loads some shaders from their source. Does not cache.
static void clearCaches()
Clears the various caches. This is useful for debugging.
static LuaScript loadScript(std::string &scriptPath)
Loads a script from the filepath given from the cache or from the file if it's not already in the cac...
A child of Texture which allows (and gives helpful functions for) mutation.
const char * fragShaderSource
static MutableTexture * loadMutableTexture(std::string &textureName)
Gets a texture from the cache, or creates a new, empty texture.
This is a skeleton cache class. This can only be used by the ResourceManager or other classes who act...
static Cache< std::string, MutableTexture > * m_mutableTextures
static ShaderProgram loadShaders(std::string &vertShaderPath, std::string &fragShaderPath)
Loads some shaders. Combines both to give a full shader program. Does not cache.
static Cache< std::string, Music > * m_music
static Texture loadTexture(std::string &texturePath)
Loads a texture if it isn't already in the cache.
The ShaderProgram is a GLSL program which combines two shaders - the vertex shader and the fragment s...
static std::string getAssetsPathPrefix()
Returns the assets path prefix. Pretty simple.
static LuaScript loadScriptFromSource(std::string &scriptSource, std::string name)
Creates and caches a script from the given source code.
static Music loadMusic(std::string &musicPath)
Loads some music from the filepath given from the cache or from the file if the cache doesn't contain...
The resource manager manages resources. Groundbreaking news, I know. In short, the resource manager l...
static void setTexturePathPrefix(std::string prefix)
Changes the prefix that will be prepended to all texture paths when they're loaded.
static std::string m_texturePathPrefix
static Font loadFont(std::string &fontPath, int size)
Loads a font to the cache.
static Cache< std::string, Font > * m_fonts
This is the basic Lua script wrapper - it is what the end-user will create and add to the queue....