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; }
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; }