diff options
Diffstat (limited to 'Build/source/utils/asymptote/glrender.cc')
-rw-r--r-- | Build/source/utils/asymptote/glrender.cc | 16 |
1 files changed, 6 insertions, 10 deletions
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) |