From 23bb4b07bc1b1a4ade0d1004bfccc55d7333a2cc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 2 Apr 2019 22:05:50 +0000 Subject: asy 2.49 sources git-svn-id: svn://tug.org/texlive/trunk@50715 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/utils/asymptote/glrender.cc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'Build/source/utils/asymptote/glrender.cc') diff --git a/Build/source/utils/asymptote/glrender.cc b/Build/source/utils/asymptote/glrender.cc index ed626bf9bfe..d8e1a60f698 100644 --- a/Build/source/utils/asymptote/glrender.cc +++ b/Build/source/utils/asymptote/glrender.cc @@ -1263,7 +1263,9 @@ void init() int argc=cmd.size(); // glutInitContextVersion(4,3); +#ifndef __APPLE__ glutInitContextProfile(GLUT_CORE_PROFILE); +#endif //glutInitContextFlags(GLUT_FORWARD_COMPATIBLE); glutInit(&argc,argv); @@ -1497,7 +1499,6 @@ void glrender(const string& prefix, const picture *pic, const string& format, #ifdef HAVE_LIBGLUT unsigned int displaymode=GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH; - string buttonnames[]={"left","middle","right"}; #endif camp::clearMaterialBuffer(); @@ -1527,7 +1528,6 @@ void glrender(const string& prefix, const picture *pic, const string& format, displaymode |= GLUT_MULTISAMPLE; glutInitDisplayMode(displaymode); - ostringstream buf; int samples; #ifdef FREEGLUT @@ -1648,14 +1648,10 @@ void glrender(const string& prefix, const picture *pic, const string& format, namespace camp { -std::string getMaterialIndex(size_t const& index, - std::string const& fieldName) -{ - return "materials["+std::to_string(index)+"]."+fieldName; -} - -std::string getLightIndex(size_t const& index, std::string const& fieldName) { - return "lights["+std::to_string(index)+"]."+fieldName; +string getLightIndex(size_t const& index, string const& fieldName) { + ostringstream buf; + buf << "lights[" << index << "]." << fieldName; + return Strdup(buf.str()); } void setUniforms(GLint shader) -- cgit v1.2.3