summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/glrender.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-04-02 22:05:50 +0000
committerKarl Berry <karl@freefriends.org>2019-04-02 22:05:50 +0000
commit23bb4b07bc1b1a4ade0d1004bfccc55d7333a2cc (patch)
tree2d67cd8966d05419ab638e015882bfd60cf8518c /Build/source/utils/asymptote/glrender.cc
parent5819f5bd557cdc4d5ca1c1424812ec533381ea12 (diff)
asy 2.49 sources
git-svn-id: svn://tug.org/texlive/trunk@50715 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/glrender.cc')
-rw-r--r--Build/source/utils/asymptote/glrender.cc16
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)