Example #1
0
 Texture* GetTexture(std::string relative_path){
     Asset* assetClass = get_asset(relative_path);
     
     if (assetClass == NULL || assetClass->getType() != TEXTURE) return NULL;
     
     Texture* texture = static_cast<Texture *>(assetClass);
     
     if (texture) return texture;
     
     return NULL;
 }
Example #2
0
Shader* GetShader(std::string relative_path){
    Asset* assetClass = get_asset(relative_path);

    if (assetClass == NULL || assetClass->getType() != SHADER) return NULL;

    Shader* shader = static_cast<Shader *>(assetClass);

    if (shader) return shader;

    return NULL;
}