summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/shaders.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-03-28 22:55:00 +0000
committerKarl Berry <karl@freefriends.org>2019-03-28 22:55:00 +0000
commitc980a94172da2abe5dc7cf3ea7d755b9e0dc5d19 (patch)
tree184e3a2d52714afe8727e4a526353acb0d3a8589 /Build/source/utils/asymptote/shaders.cc
parenta1d1540c2ab9ebd6f45819df58e3dbaf4cf6d167 (diff)
non-GL and C++ patch from bowman
git-svn-id: svn://tug.org/texlive/trunk@50636 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/shaders.cc')
-rw-r--r--Build/source/utils/asymptote/shaders.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/Build/source/utils/asymptote/shaders.cc b/Build/source/utils/asymptote/shaders.cc
index 5d7ea6ad6fb..dc8936fa447 100644
--- a/Build/source/utils/asymptote/shaders.cc
+++ b/Build/source/utils/asymptote/shaders.cc
@@ -46,8 +46,7 @@ GLuint createShaders(GLchar const* src, int shaderType)
}
GLuint createShaderFile(std::string file, int shaderType, size_t Nlights,
- size_t Nmaterials,
- std::unordered_set<std::string> compilerFlags)
+ size_t Nmaterials, bool explicitcolor)
{
std::ifstream shaderFile;
shaderFile.open(file);
@@ -59,10 +58,9 @@ GLuint createShaderFile(std::string file, int shaderType, size_t Nlights,
shaderSrc << "#extension GL_ARB_shading_language_packing : enable"
<< "\r\n";
- for(std::string const& flag : compilerFlags)
- {
- shaderSrc << "#define " << flag << "\r\n";
- }
+
+ if(explicitcolor)
+ shaderSrc << "#define EXPLICIT_COLOR" << "\r\n";
shaderSrc << "const int Nlights=" << Nlights << ";\r\n";
shaderSrc << "const int Nmaterials=" << Nmaterials << ";\r\n";