mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2025-12-01 12:11:20 +00:00
Make texture errors more clear - we failed looking for multiple extensions.
This commit is contained in:
@ -590,7 +590,22 @@ GLuint ShaderEngine::compilePresetShader(const PresentShaderType shaderType, Sha
|
|||||||
|
|
||||||
if (texDesc.first == NULL)
|
if (texDesc.first == NULL)
|
||||||
{
|
{
|
||||||
std::cerr << "Texture loading error for: " << sampler << std::endl;
|
std::string extensionList = "";
|
||||||
|
// prepare a list of extensions we looked for, so it's more clear what a texture is in error logs.
|
||||||
|
if (textureManager->extensions.size() >= 1) {
|
||||||
|
extensionList = " (";
|
||||||
|
for (size_t x = 0; x < textureManager->extensions.size(); x++)
|
||||||
|
{
|
||||||
|
if (x != (textureManager->extensions.size() - 1)) {
|
||||||
|
extensionList += textureManager->extensions[x] + ", ";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
extensionList += "or " + textureManager->extensions[x];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
extensionList += ")";
|
||||||
|
}
|
||||||
|
std::cerr << "Texture loading error for: " << sampler << extensionList << std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -20,13 +20,13 @@ class TextureManager
|
|||||||
void loadTextureDir(const std::string & dirname);
|
void loadTextureDir(const std::string & dirname);
|
||||||
TextureSamplerDesc loadTexture(const std::string name, const std::string imageUrl);
|
TextureSamplerDesc loadTexture(const std::string name, const std::string imageUrl);
|
||||||
void ExtractTextureSettings(const std::string qualifiedName, GLint &_wrap_mode, GLint &_filter_mode, std::string & name);
|
void ExtractTextureSettings(const std::string qualifiedName, GLint &_wrap_mode, GLint &_filter_mode, std::string & name);
|
||||||
std::vector<std::string> extensions;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TextureManager(std::string _presetsURL, const int texsizeX, const int texsizeY,
|
TextureManager(std::string _presetsURL, const int texsizeX, const int texsizeY,
|
||||||
std::string datadir = "");
|
std::string datadir = "");
|
||||||
~TextureManager();
|
~TextureManager();
|
||||||
|
|
||||||
|
std::vector<std::string> extensions;
|
||||||
void Clear();
|
void Clear();
|
||||||
void Preload();
|
void Preload();
|
||||||
TextureSamplerDesc tryLoadingTexture(const std::string name);
|
TextureSamplerDesc tryLoadingTexture(const std::string name);
|
||||||
|
|||||||
Reference in New Issue
Block a user