1
0
forked from 0ad/0ad

Adds a warning in case ShaderManager is trying to load an ARB shader with enabled GLSL.

This was SVN commit r25503.
This commit is contained in:
Vladislav Belov 2021-05-21 20:32:33 +00:00
parent 4215533ea9
commit b2d0bd9a81

View File

@ -32,6 +32,7 @@
#include "ps/XML/Xeromyces.h"
#include "ps/XML/XMLWriter.h"
#include "renderer/Renderer.h"
#include "renderer/RenderingOptions.h"
#define USE_SHADER_XML_VALIDATION 1
@ -165,7 +166,10 @@ bool CShaderManager::NewProgram(const char* name, const CShaderDefines& baseDefi
XMBElement Root = XeroFile.GetRoot();
bool isGLSL = (Root.GetAttributes().GetNamedItem(at_type) == "glsl");
const bool isGLSL = (Root.GetAttributes().GetNamedItem(at_type) == "glsl");
if (!isGLSL && g_RenderingOptions.GetPreferGLSL())
LOGWARNING("CShaderManager::NewProgram: '%s': trying to load a non-GLSL program with enabled GLSL", name);
VfsPath vertexFile;
VfsPath fragmentFile;
CShaderDefines defines = baseDefines;